refactor: replace feature globals with typed services
This commit is contained in:
@@ -343,15 +343,13 @@ function bmApply(bm) {
|
||||
bridge.scheduleSpectrumDraw();
|
||||
}
|
||||
const tunePromise = (async () => {
|
||||
if (typeof bridge.vchanTakeSchedulerControl === "function") {
|
||||
await bridge.vchanTakeSchedulerControl();
|
||||
}
|
||||
const onVirtual = typeof bridge.vchanInterceptMode === "function" && await bridge.vchanInterceptMode(bm.mode);
|
||||
await bridge.trx?.modules?.vchan?.takeSchedulerControl();
|
||||
const onVirtual = await bridge.trx?.modules?.vchan?.interceptMode(bm.mode) ?? false;
|
||||
if (!onVirtual) {
|
||||
await bridge.postPath("/set_mode?mode=" + encodeURIComponent(bm.mode));
|
||||
}
|
||||
if (bm.bandwidth_hz) {
|
||||
const bwHandledByVchan = typeof bridge.vchanInterceptBandwidth === "function" && await bridge.vchanInterceptBandwidth(bm.bandwidth_hz);
|
||||
const bwHandledByVchan = await bridge.trx?.modules?.vchan?.interceptBandwidth(bm.bandwidth_hz) ?? false;
|
||||
if (!bwHandledByVchan) {
|
||||
await bridge.postPath(`/set_bandwidth?hz=${bm.bandwidth_hz}`);
|
||||
}
|
||||
@@ -414,7 +412,10 @@ bridge.trx.modules.bookmarks = {
|
||||
invalidateColors() {
|
||||
bmOverlayRevision += 1;
|
||||
},
|
||||
apply: bmApply
|
||||
apply: bmApply,
|
||||
formatFrequency: bmFmtFreq,
|
||||
fetch: bmFetch,
|
||||
populateScopePicker: bmPopulateScopePicker
|
||||
};
|
||||
function bmUpdateSelectionUi() {
|
||||
const count = bmSelected.size;
|
||||
|
||||
Reference in New Issue
Block a user