[feat](trx-rs): expose WFM stereo denoise toggle in UI

Wire the StereoDenoise processor through the full stack:
- Add SetWfmDenoise command variant and RigCat trait method (trx-core)
- Add wfm_denoise field to RigFilterState with default true
- Add protocol command and bidirectional mapping (trx-protocol)
- Add rig_task command handler (trx-server)
- Implement set_wfm_denoise in SoapySdrRig backend
- Add /set_wfm_denoise API endpoint (trx-frontend-http)
- Add denoise checkbox in WFM controls with SSE sync and
  localStorage persistence

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-01 13:29:02 +01:00
parent 46bc96ddf2
commit 64bb9a0d42
12 changed files with 83 additions and 0 deletions
@@ -1373,6 +1373,12 @@ function render(update) {
saveSetting("wfmAudioMode", nextMode);
}
}
if (wfmDenoiseEl && typeof update.filter.wfm_denoise === "boolean") {
if (wfmDenoiseEl.checked !== update.filter.wfm_denoise) {
wfmDenoiseEl.checked = update.filter.wfm_denoise;
saveSetting("wfmDenoise", update.filter.wfm_denoise ? "true" : "false");
}
}
if (wfmStFlagEl && typeof update.filter.wfm_stereo_detected === "boolean") {
const detected = update.filter.wfm_stereo_detected;
wfmStFlagEl.textContent = detected ? "ST" : "MO";
@@ -2680,6 +2686,7 @@ const audioRow = document.getElementById("audio-row");
const wfmControlsCol = document.getElementById("wfm-controls-col");
const wfmDeemphasisEl = document.getElementById("wfm-deemphasis");
const wfmAudioModeEl = document.getElementById("wfm-audio-mode");
const wfmDenoiseEl = document.getElementById("wfm-denoise");
const sdrGainControlsEl = document.getElementById("sdr-gain-controls");
const sdrGainEl = document.getElementById("sdr-gain-db");
const sdrGainSetBtn = document.getElementById("sdr-gain-set");
@@ -2748,6 +2755,14 @@ if (wfmAudioModeEl) {
postPath(`/set_wfm_stereo?enabled=${enabled ? "true" : "false"}`).catch(() => {});
});
}
if (wfmDenoiseEl) {
wfmDenoiseEl.checked = loadSetting("wfmDenoise", "true") === "true";
wfmDenoiseEl.addEventListener("change", () => {
const enabled = wfmDenoiseEl.checked;
saveSetting("wfmDenoise", enabled ? "true" : "false");
postPath(`/set_wfm_denoise?enabled=${enabled ? "true" : "false"}`).catch(() => {});
});
}
if (wfmDeemphasisEl) {
wfmDeemphasisEl.addEventListener("change", () => {
postPath(`/set_wfm_deemphasis?us=${encodeURIComponent(wfmDeemphasisEl.value)}`).catch(() => {});
@@ -172,6 +172,10 @@
<option value="mono">Mono</option>
</select>
</label>
<label class="wfm-control">
<span class="wfm-control-label">Denoise</span>
<input type="checkbox" id="wfm-denoise" checked />
</label>
<div class="wfm-gain-group" id="sdr-gain-controls">
<label class="wfm-control">
<span class="wfm-control-label">RF Gain</span>