[feat](trx-server): dispatch SetSdrLnaGain in rig_task
Handle RigCommand::SetSdrLnaGain by calling set_sdr_lna_gain on the rig and refreshing filter state, matching the pattern used by SetSdrGain and SetSdrAgc. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
@@ -563,6 +563,14 @@ async fn process_command(
|
||||
let _ = ctx.state_tx.send(ctx.state.clone());
|
||||
return snapshot_from(ctx.state);
|
||||
}
|
||||
RigCommand::SetSdrLnaGain(gain_db) => {
|
||||
if let Err(e) = ctx.rig.set_sdr_lna_gain(gain_db).await {
|
||||
return Err(RigError::communication(format!("set_sdr_lna_gain: {e}")));
|
||||
}
|
||||
ctx.state.filter = ctx.rig.filter_state();
|
||||
let _ = ctx.state_tx.send(ctx.state.clone());
|
||||
return snapshot_from(ctx.state);
|
||||
}
|
||||
RigCommand::SetSdrAgc(enabled) => {
|
||||
if let Err(e) = ctx.rig.set_sdr_agc(enabled).await {
|
||||
return Err(RigError::communication(format!("set_sdr_agc: {e}")));
|
||||
|
||||
Reference in New Issue
Block a user