From 25eec2a7a81047575cd0544a808b4769e5f51098 Mon Sep 17 00:00:00 2001 From: Stanislaw Grams Date: Sun, 8 Feb 2026 23:09:40 +0100 Subject: [PATCH] [feat](trx-client): map decoder commands in remote client Initialize decoder state fields and map new RigCommand/ClientCommand variants through the remote client TCP bridge. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Stanislaw Grams --- src/trx-client/src/main.rs | 4 ++++ src/trx-client/src/remote_client.rs | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/trx-client/src/main.rs b/src/trx-client/src/main.rs index d199a6d..018859f 100644 --- a/src/trx-client/src/main.rs +++ b/src/trx-client/src/main.rs @@ -272,6 +272,10 @@ async fn async_init() -> DynResult { server_version: None, server_latitude: None, server_longitude: None, + aprs_decode_enabled: false, + cw_decode_enabled: false, + aprs_decode_reset_seq: 0, + cw_decode_reset_seq: 0, }; let (state_tx, state_rx) = watch::channel(initial_state); diff --git a/src/trx-client/src/remote_client.rs b/src/trx-client/src/remote_client.rs index 5194c49..6fa0891 100644 --- a/src/trx-client/src/remote_client.rs +++ b/src/trx-client/src/remote_client.rs @@ -146,6 +146,10 @@ fn map_rig_command(cmd: trx_core::RigCommand) -> ClientCommand { trx_core::RigCommand::SetTxLimit(limit) => ClientCommand::SetTxLimit { limit }, trx_core::RigCommand::Lock => ClientCommand::Lock, trx_core::RigCommand::Unlock => ClientCommand::Unlock, + trx_core::RigCommand::SetAprsDecodeEnabled(enabled) => ClientCommand::SetAprsDecodeEnabled { enabled }, + trx_core::RigCommand::SetCwDecodeEnabled(enabled) => ClientCommand::SetCwDecodeEnabled { enabled }, + trx_core::RigCommand::ResetAprsDecoder => ClientCommand::ResetAprsDecoder, + trx_core::RigCommand::ResetCwDecoder => ClientCommand::ResetCwDecoder, } } @@ -184,6 +188,10 @@ pub fn state_from_snapshot(snapshot: trx_core::RigSnapshot) -> RigState { server_version: snapshot.server_version, server_latitude: snapshot.server_latitude, server_longitude: snapshot.server_longitude, + aprs_decode_enabled: snapshot.aprs_decode_enabled, + cw_decode_enabled: snapshot.cw_decode_enabled, + aprs_decode_reset_seq: 0, + cw_decode_reset_seq: 0, } }