[fix](trx-frontend): retune center on bookmark tune
Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -239,10 +239,23 @@ async function bmDelete(id) {
|
|||||||
|
|
||||||
async function bmApply(bm) {
|
async function bmApply(bm) {
|
||||||
try {
|
try {
|
||||||
await postPath("/set_freq?hz=" + bm.freq_hz);
|
|
||||||
await postPath("/set_mode?mode=" + encodeURIComponent(bm.mode));
|
await postPath("/set_mode?mode=" + encodeURIComponent(bm.mode));
|
||||||
|
if (typeof modeEl !== "undefined" && modeEl) {
|
||||||
|
modeEl.value = String(bm.mode || "").toUpperCase();
|
||||||
|
}
|
||||||
if (bm.bandwidth_hz) {
|
if (bm.bandwidth_hz) {
|
||||||
await postPath("/set_bandwidth?hz=" + bm.bandwidth_hz);
|
await postPath("/set_bandwidth?hz=" + bm.bandwidth_hz);
|
||||||
|
if (typeof currentBandwidthHz !== "undefined") {
|
||||||
|
currentBandwidthHz = bm.bandwidth_hz;
|
||||||
|
}
|
||||||
|
if (typeof syncBandwidthInput === "function") {
|
||||||
|
syncBandwidthInput(bm.bandwidth_hz);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (typeof setRigFrequency === "function") {
|
||||||
|
await setRigFrequency(bm.freq_hz);
|
||||||
|
} else {
|
||||||
|
await postPath("/set_freq?hz=" + bm.freq_hz);
|
||||||
}
|
}
|
||||||
// Toggle decoders when in DIG mode
|
// Toggle decoders when in DIG mode
|
||||||
if (bm.mode === "DIG" && Array.isArray(bm.decoders)) {
|
if (bm.mode === "DIG" && Array.isArray(bm.decoders)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user