From fb715860fb9a81d2aa218a2e10bbcdca6dff7850 Mon Sep 17 00:00:00 2001 From: Stanislaw Grams Date: Sun, 15 Mar 2026 19:24:57 +0100 Subject: [PATCH] [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 Signed-off-by: Stanislaw Grams --- src/trx-protocol/src/mapping.rs | 2 ++ src/trx-protocol/src/types.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/trx-protocol/src/mapping.rs b/src/trx-protocol/src/mapping.rs index 3a1f2b9..3c8199a 100644 --- a/src/trx-protocol/src/mapping.rs +++ b/src/trx-protocol/src/mapping.rs @@ -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, diff --git a/src/trx-protocol/src/types.rs b/src/trx-protocol/src/types.rs index 3992829..efc1239 100644 --- a/src/trx-protocol/src/types.rs +++ b/src/trx-protocol/src/types.rs @@ -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 },