From f610bf7db3f139bd940ca53928e45a8e81a0af1c Mon Sep 17 00:00:00 2001 From: Stanislaw Grams Date: Mon, 9 Feb 2026 19:54:32 +0100 Subject: [PATCH] [fix](trx-frontend-http): update decode status on mode change Co-authored-by: Codex Signed-off-by: Stanislaw Grams --- .../trx-frontend/trx-frontend-http/assets/web/app.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js index 2ca326e..8afc95b 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js @@ -245,6 +245,15 @@ function render(update) { const mode = normalizeMode(update.status.mode); modeEl.value = mode ? mode.toUpperCase() : ""; } + const modeUpper = update.status && update.status.mode ? normalizeMode(update.status.mode).toUpperCase() : ""; + const aprsStatus = document.getElementById("aprs-status"); + const cwStatus = document.getElementById("cw-status"); + if (aprsStatus && modeUpper !== "PKT" && aprsStatus.textContent === "Receiving") { + aprsStatus.textContent = "Connected, listening for packets"; + } + if (cwStatus && modeUpper !== "CW" && modeUpper !== "CWR" && cwStatus.textContent === "Receiving") { + cwStatus.textContent = "Connected, listening for packets"; + } if (update.status && typeof update.status.tx_en === "boolean") { lastTxEn = update.status.tx_en; pttBtn.textContent = update.status.tx_en ? "PTT On" : "PTT Off";