[feat](trx-protocol): add SetSdrLnaGain client command

Map ClientCommand::SetSdrLnaGain { gain_db } to and from
RigCommand::SetSdrLnaGain in both directions.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
2026-03-15 19:24:57 +01:00
parent db71ca0950
commit fb715860fb
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -57,6 +57,7 @@ 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::SetSdrLnaGain { gain_db } => RigCommand::SetSdrLnaGain(gain_db),
ClientCommand::SetSdrAgc { enabled } => RigCommand::SetSdrAgc(enabled),
ClientCommand::SetSdrSquelch {
enabled,
@@ -120,6 +121,7 @@ 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::SetSdrLnaGain(gain_db) => ClientCommand::SetSdrLnaGain { gain_db },
RigCommand::SetSdrAgc(enabled) => ClientCommand::SetSdrAgc { enabled },
RigCommand::SetSdrSquelch {
enabled,
+1
View File
@@ -46,6 +46,7 @@ pub enum ClientCommand {
SetBandwidth { bandwidth_hz: u32 },
SetFirTaps { taps: u32 },
SetSdrGain { gain_db: f64 },
SetSdrLnaGain { gain_db: f64 },
SetSdrAgc { enabled: bool },
SetSdrSquelch { enabled: bool, threshold_db: f64 },
SetWfmDeemphasis { deemphasis_us: u32 },