From 88203fb04372becc8f8ed21c1127f1fe81bf973e Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Mon, 2 Mar 2026 19:09:49 +0100 Subject: [PATCH] [fix](trx-frontend): retune center on bookmark tune Co-authored-by: OpenAI Codex Signed-off-by: Stan Grams --- .../assets/web/plugins/bookmarks.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js index b6307e1..1cda0fa 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js @@ -239,10 +239,23 @@ async function bmDelete(id) { async function bmApply(bm) { try { - await postPath("/set_freq?hz=" + bm.freq_hz); await postPath("/set_mode?mode=" + encodeURIComponent(bm.mode)); + if (typeof modeEl !== "undefined" && modeEl) { + modeEl.value = String(bm.mode || "").toUpperCase(); + } if (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 if (bm.mode === "DIG" && Array.isArray(bm.decoders)) {