From 7b75049f4fcc669f185f8318e17dfe2811a7a4eb Mon Sep 17 00:00:00 2001 From: Stanislaw Grams Date: Thu, 12 Feb 2026 23:18:36 +0100 Subject: [PATCH] [feat](trx-frontend-http): add dedicated WSPR plugin tab Expose a WSPR subtab in the Plugins view with its own controls and message list, wire a dedicated wspr.js asset endpoint, and route WSPR decode events to the new panel. This makes WSPR visible in the HTTP frontend instead of reusing the FT8 panel for WSPR messages. Co-authored-by: Codex Signed-off-by: Stanislaw Grams --- .../trx-frontend-http/assets/web/app.js | 12 ++++ .../trx-frontend-http/assets/web/index.html | 23 ++++++++ .../assets/web/plugins/ft8.js | 12 ---- .../assets/web/plugins/wspr.js | 57 +++++++++++++++++++ .../trx-frontend/trx-frontend-http/src/api.rs | 11 ++++ .../trx-frontend-http/src/status.rs | 1 + 6 files changed, 104 insertions(+), 12 deletions(-) create mode 100644 src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/wspr.js 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 149c382..fcb6262 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 @@ -253,6 +253,7 @@ function render(update) { const aprsStatus = document.getElementById("aprs-status"); const cwStatus = document.getElementById("cw-status"); const ft8Status = document.getElementById("ft8-status"); + const wsprStatus = document.getElementById("wspr-status"); if (aprsStatus && modeUpper !== "PKT" && aprsStatus.textContent === "Receiving") { aprsStatus.textContent = "Connected, listening for packets"; } @@ -263,6 +264,10 @@ function render(update) { if (ft8Status && (!ft8Enabled || (modeUpper !== "DIG" && modeUpper !== "USB")) && ft8Status.textContent === "Receiving") { ft8Status.textContent = "Connected, listening for packets"; } + const wsprEnabled = !!update.wspr_decode_enabled; + if (wsprStatus && (!wsprEnabled || (modeUpper !== "DIG" && modeUpper !== "USB")) && wsprStatus.textContent === "Receiving") { + wsprStatus.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"; @@ -283,6 +288,13 @@ function render(update) { ft8ToggleBtn.style.borderColor = ft8On ? "#00d17f" : ""; ft8ToggleBtn.style.color = ft8On ? "#00d17f" : ""; } + const wsprToggleBtn = document.getElementById("wspr-decode-toggle-btn"); + if (wsprToggleBtn) { + const wsprOn = !!update.wspr_decode_enabled; + wsprToggleBtn.textContent = wsprOn ? "Disable WSPR" : "Enable WSPR"; + wsprToggleBtn.style.borderColor = wsprOn ? "#00d17f" : ""; + wsprToggleBtn.style.color = wsprOn ? "#00d17f" : ""; + } const cwAutoEl = document.getElementById("cw-auto"); const cwWpmEl = document.getElementById("cw-wpm"); const cwToneEl = document.getElementById("cw-tone"); diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html index 5e7b800..d61fa4c 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html @@ -125,6 +125,7 @@ +
@@ -146,6 +147,12 @@ Decodes FT8 messages from RX audio (DIG/USB only, toggle required).
+
+ WSPR Decoder +
+ Decodes WSPR messages from RX audio (DIG/USB only, toggle required). +
+
+