diff --git a/src/trx-core/src/rig/command.rs b/src/trx-core/src/rig/command.rs index ebdfaf8..74cb99f 100644 --- a/src/trx-core/src/rig/command.rs +++ b/src/trx-core/src/rig/command.rs @@ -41,6 +41,7 @@ pub enum RigCommand { SetBandwidth(u32), SetFirTaps(u32), SetSdrGain(f64), + SetSdrLnaGain(f64), SetSdrAgc(bool), SetSdrSquelch { enabled: bool, threshold_db: f64 }, SetWfmDeemphasis(u32), diff --git a/src/trx-core/src/rig/controller/handlers.rs b/src/trx-core/src/rig/controller/handlers.rs index 3dd7f1b..0461975 100644 --- a/src/trx-core/src/rig/controller/handlers.rs +++ b/src/trx-core/src/rig/controller/handlers.rs @@ -523,6 +523,7 @@ pub fn command_from_rig_command(cmd: RigCommand) -> Box { | RigCommand::SetBandwidth(_) | RigCommand::SetFirTaps(_) | RigCommand::SetSdrGain(_) + | RigCommand::SetSdrLnaGain(_) | RigCommand::SetSdrAgc(_) | RigCommand::SetSdrSquelch { .. } | RigCommand::SetWfmDeemphasis(_) diff --git a/src/trx-core/src/rig/mod.rs b/src/trx-core/src/rig/mod.rs index b466c13..11d80f2 100644 --- a/src/trx-core/src/rig/mod.rs +++ b/src/trx-core/src/rig/mod.rs @@ -190,6 +190,16 @@ pub trait RigCat: Rig + Send { ))) } + fn set_sdr_lna_gain<'a>( + &'a mut self, + _gain_db: f64, + ) -> Pin> + Send + 'a>> { + Box::pin(std::future::ready(Err( + Box::new(response::RigError::not_supported("set_sdr_lna_gain")) + as Box, + ))) + } + fn set_sdr_agc<'a>( &'a mut self, _enabled: bool, diff --git a/src/trx-core/src/rig/state.rs b/src/trx-core/src/rig/state.rs index 0ac71cc..b872ee1 100644 --- a/src/trx-core/src/rig/state.rs +++ b/src/trx-core/src/rig/state.rs @@ -313,6 +313,8 @@ pub struct RigFilterState { #[serde(default, skip_serializing_if = "Option::is_none")] pub sdr_gain_db: Option, #[serde(default, skip_serializing_if = "Option::is_none")] + pub sdr_lna_gain_db: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] pub sdr_agc_enabled: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub sdr_squelch_enabled: Option,