diff --git a/src/trx-protocol/src/codec.rs b/src/trx-protocol/src/codec.rs index 72c1c15..d1adcd8 100644 --- a/src/trx-protocol/src/codec.rs +++ b/src/trx-protocol/src/codec.rs @@ -310,10 +310,12 @@ mod tests { fir_taps: 64, cw_center_hz: 700, sdr_gain_db: Some(12.0), + sdr_squelch_enabled: None, + sdr_squelch_threshold_db: None, wfm_deemphasis_us: 75, wfm_stereo: true, wfm_stereo_detected: false, - wfm_denoise: true, + wfm_denoise: trx_core::WfmDenoiseLevel::Auto, }), ..minimal_snapshot() }) @@ -350,10 +352,12 @@ mod tests { fir_taps: 128, cw_center_hz: 700, sdr_gain_db: Some(18.0), + sdr_squelch_enabled: None, + sdr_squelch_threshold_db: None, wfm_deemphasis_us: 50, wfm_stereo: true, wfm_stereo_detected: true, - wfm_denoise: true, + wfm_denoise: trx_core::WfmDenoiseLevel::Auto, }), ..minimal_snapshot() }; diff --git a/src/trx-protocol/src/mapping.rs b/src/trx-protocol/src/mapping.rs index 68b24e8..641b54b 100644 --- a/src/trx-protocol/src/mapping.rs +++ b/src/trx-protocol/src/mapping.rs @@ -49,6 +49,13 @@ pub fn client_command_to_rig(cmd: ClientCommand) -> RigCommand { ClientCommand::SetBandwidth { bandwidth_hz } => RigCommand::SetBandwidth(bandwidth_hz), ClientCommand::SetFirTaps { taps } => RigCommand::SetFirTaps(taps), ClientCommand::SetSdrGain { gain_db } => RigCommand::SetSdrGain(gain_db), + ClientCommand::SetSdrSquelch { + enabled, + threshold_db, + } => RigCommand::SetSdrSquelch { + enabled, + threshold_db, + }, ClientCommand::SetWfmDeemphasis { deemphasis_us } => { RigCommand::SetWfmDeemphasis(deemphasis_us) } @@ -96,6 +103,13 @@ pub fn rig_command_to_client(cmd: RigCommand) -> ClientCommand { RigCommand::SetBandwidth(bandwidth_hz) => ClientCommand::SetBandwidth { bandwidth_hz }, RigCommand::SetFirTaps(taps) => ClientCommand::SetFirTaps { taps }, RigCommand::SetSdrGain(gain_db) => ClientCommand::SetSdrGain { gain_db }, + RigCommand::SetSdrSquelch { + enabled, + threshold_db, + } => ClientCommand::SetSdrSquelch { + enabled, + threshold_db, + }, RigCommand::SetWfmDeemphasis(deemphasis_us) => { ClientCommand::SetWfmDeemphasis { deemphasis_us } } diff --git a/src/trx-protocol/src/types.rs b/src/trx-protocol/src/types.rs index 09e61a2..307580d 100644 --- a/src/trx-protocol/src/types.rs +++ b/src/trx-protocol/src/types.rs @@ -40,6 +40,7 @@ pub enum ClientCommand { SetBandwidth { bandwidth_hz: u32 }, SetFirTaps { taps: u32 }, SetSdrGain { gain_db: f64 }, + SetSdrSquelch { enabled: bool, threshold_db: f64 }, SetWfmDeemphasis { deemphasis_us: u32 }, SetWfmStereo { enabled: bool }, SetWfmDenoise { level: WfmDenoiseLevel },