From 0dc6761fa0a045a19b4d3b45e309c9d7f1441f56 Mon Sep 17 00:00:00 2001 From: Stanislaw Grams Date: Mon, 16 Mar 2026 23:17:01 +0100 Subject: [PATCH] [refactor](trx-core): remove SetFirTaps command and fir_taps from state Drop the SetFirTaps RigCommand variant, remove the set_fir_taps default trait method from Rig, and remove the fir_taps field from RigFilterState. Tap count is now derived automatically from audio bandwidth in the DSP layer rather than being a user-facing control. Co-authored-by: Claude Sonnet 4.6 Signed-off-by: Stanislaw Grams --- src/trx-core/src/rig/command.rs | 1 - src/trx-core/src/rig/controller/handlers.rs | 1 - src/trx-core/src/rig/mod.rs | 12 +----------- src/trx-core/src/rig/state.rs | 1 - 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/trx-core/src/rig/command.rs b/src/trx-core/src/rig/command.rs index 74cb99f..1f55a05 100644 --- a/src/trx-core/src/rig/command.rs +++ b/src/trx-core/src/rig/command.rs @@ -39,7 +39,6 @@ pub enum RigCommand { ResetFt2Decoder, ResetWsprDecoder, SetBandwidth(u32), - SetFirTaps(u32), SetSdrGain(f64), SetSdrLnaGain(f64), SetSdrAgc(bool), diff --git a/src/trx-core/src/rig/controller/handlers.rs b/src/trx-core/src/rig/controller/handlers.rs index 0461975..8711774 100644 --- a/src/trx-core/src/rig/controller/handlers.rs +++ b/src/trx-core/src/rig/controller/handlers.rs @@ -521,7 +521,6 @@ pub fn command_from_rig_command(cmd: RigCommand) -> Box { | RigCommand::ResetFt2Decoder | RigCommand::ResetWsprDecoder | RigCommand::SetBandwidth(_) - | RigCommand::SetFirTaps(_) | RigCommand::SetSdrGain(_) | RigCommand::SetSdrLnaGain(_) | RigCommand::SetSdrAgc(_) diff --git a/src/trx-core/src/rig/mod.rs b/src/trx-core/src/rig/mod.rs index 11d80f2..efd229f 100644 --- a/src/trx-core/src/rig/mod.rs +++ b/src/trx-core/src/rig/mod.rs @@ -57,7 +57,7 @@ pub struct RigCapabilities { pub tx_limit: bool, /// Backend supports toggle_vfo. pub vfo_switch: bool, - /// Backend supports runtime filter adjustment (bandwidth, FIR taps). + /// Backend supports runtime filter adjustment (bandwidth). pub filter_controls: bool, /// Backend returns a meaningful RX signal strength value. pub signal_meter: bool, @@ -160,16 +160,6 @@ pub trait RigCat: Rig + Send { ))) } - fn set_fir_taps<'a>( - &'a mut self, - _taps: u32, - ) -> Pin> + Send + 'a>> { - Box::pin(std::future::ready(Err( - Box::new(response::RigError::not_supported("set_fir_taps")) - as Box, - ))) - } - fn set_wfm_deemphasis<'a>( &'a mut self, _deemphasis_us: u32, diff --git a/src/trx-core/src/rig/state.rs b/src/trx-core/src/rig/state.rs index b872ee1..ac5db85 100644 --- a/src/trx-core/src/rig/state.rs +++ b/src/trx-core/src/rig/state.rs @@ -308,7 +308,6 @@ impl RigState { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct RigFilterState { pub bandwidth_hz: u32, - pub fir_taps: u32, pub cw_center_hz: u32, #[serde(default, skip_serializing_if = "Option::is_none")] pub sdr_gain_db: Option,