[fix](trx-backend-soapysdr,trx-frontend-http): make wfm mono mode real

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-02-28 20:25:04 +01:00
parent b7c1da138b
commit 244f91d97b
13 changed files with 105 additions and 6 deletions
+1
View File
@@ -34,6 +34,7 @@ pub enum RigCommand {
SetBandwidth(u32),
SetFirTaps(u32),
SetWfmDeemphasis(u32),
SetWfmStereo(bool),
SetWfmDenoise(bool),
GetSpectrum,
}
@@ -517,6 +517,7 @@ pub fn command_from_rig_command(cmd: RigCommand) -> Box<dyn RigCommandHandler> {
| RigCommand::SetBandwidth(_)
| RigCommand::SetFirTaps(_)
| RigCommand::SetWfmDeemphasis(_)
| RigCommand::SetWfmStereo(_)
| RigCommand::SetWfmDenoise(_)
| RigCommand::GetSpectrum => Box::new(GetSnapshotCommand),
}
+10
View File
@@ -175,6 +175,16 @@ pub trait RigCat: Rig + Send {
)))
}
fn set_wfm_stereo<'a>(
&'a mut self,
_enabled: bool,
) -> Pin<Box<dyn Future<Output = DynResult<()>> + Send + 'a>> {
Box::pin(std::future::ready(Err(
Box::new(response::RigError::not_supported("set_wfm_stereo"))
as Box<dyn std::error::Error + Send + Sync>,
)))
}
/// Return the current filter state if this backend supports filter controls.
fn filter_state(&self) -> Option<state::RigFilterState> {
None
+6
View File
@@ -271,6 +271,8 @@ pub struct RigFilterState {
pub cw_center_hz: u32,
#[serde(default = "default_wfm_deemphasis_us")]
pub wfm_deemphasis_us: u32,
#[serde(default = "default_wfm_stereo")]
pub wfm_stereo: bool,
#[serde(default = "default_wfm_denoise")]
pub wfm_denoise: bool,
}
@@ -283,6 +285,10 @@ fn default_wfm_denoise() -> bool {
true
}
fn default_wfm_stereo() -> bool {
true
}
/// Spectrum data from SDR backends (FFT magnitude over the full capture bandwidth).
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SpectrumData {