[feat](trx-rs): expose WFM stereo denoise toggle
Add a server-side toggle for the multiband stereo denoiser so it can be enabled or disabled at runtime without restarting the server. Backend (trx-backend-soapysdr): - Add `denoise_enabled: bool` to `WfmStereoDecoder`; gate multiband blend behind it (falls back to uniform single-band blend when off) - Add `set_denoise_enabled()` method on `WfmStereoDecoder` - Propagate `wfm_denoise: bool` through `ChannelDsp`, `SdrPipeline`, and `SoapySdrRig`; add `set_wfm_denoise()` at each layer - Include `wfm_denoise` in `filter_state()` so it flows into snapshots Protocol / core (trx-core, trx-protocol, trx-server): - Add `SetWfmDenoise(bool)` to `RigCommand` and `ClientCommand` - Add default `set_wfm_denoise()` trait method to `RigCat` - Handle `SetWfmDenoise` in `rig_task.rs` and update `RigFilterState` - Add `wfm_denoise: bool` (default `true`) to `RigFilterState` Frontend (trx-frontend-http): - Add `POST /toggle_wfm_denoise` endpoint - Add "Denoise On/Off" button next to the stereo/mono audio picker - Sync button state from SSE filter snapshot (`update.filter.wfm_denoise`) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -1252,6 +1252,12 @@ function render(update) {
|
||||
if (wfmDeemphasisEl && typeof update.filter.wfm_deemphasis_us === "number") {
|
||||
wfmDeemphasisEl.value = String(update.filter.wfm_deemphasis_us);
|
||||
}
|
||||
if (wfmDenoiseBtn && typeof update.filter.wfm_denoise === "boolean") {
|
||||
const on = update.filter.wfm_denoise;
|
||||
wfmDenoiseBtn.textContent = on ? "On" : "Off";
|
||||
wfmDenoiseBtn.style.borderColor = on ? "" : "var(--accent-warn, #f0a500)";
|
||||
wfmDenoiseBtn.style.color = on ? "" : "var(--accent-warn, #f0a500)";
|
||||
}
|
||||
}
|
||||
if (update.status && update.status.freq && typeof update.status.freq.hz === "number") {
|
||||
applyLocalTunedFrequency(update.status.freq.hz, true);
|
||||
@@ -2546,6 +2552,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 wfmDenoiseBtn = document.getElementById("wfm-denoise-btn");
|
||||
|
||||
// Hide audio row if audio is not configured on the server
|
||||
fetch("/audio", { method: "GET" }).then((r) => {
|
||||
@@ -2587,6 +2594,11 @@ if (wfmDeemphasisEl) {
|
||||
postPath(`/set_wfm_deemphasis?us=${encodeURIComponent(wfmDeemphasisEl.value)}`).catch(() => {});
|
||||
});
|
||||
}
|
||||
if (wfmDenoiseBtn) {
|
||||
wfmDenoiseBtn.addEventListener("click", () => {
|
||||
postPath("/toggle_wfm_denoise").catch(() => {});
|
||||
});
|
||||
}
|
||||
|
||||
function updateWfmControls() {
|
||||
if (!wfmControlsCol) return;
|
||||
|
||||
Reference in New Issue
Block a user