[feat](trx-rs): add cw auto/manual controls

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
2026-02-09 20:50:31 +01:00
parent dfc0f220e8
commit 0daf9e27ae
15 changed files with 249 additions and 16 deletions
+3
View File
@@ -23,6 +23,9 @@ pub enum ClientCommand {
SetTxLimit { limit: u8 },
SetAprsDecodeEnabled { enabled: bool },
SetCwDecodeEnabled { enabled: bool },
SetCwAuto { enabled: bool },
SetCwWpm { wpm: u32 },
SetCwToneHz { tone_hz: u32 },
ResetAprsDecoder,
ResetCwDecoder,
}
+3
View File
@@ -21,6 +21,9 @@ pub enum RigCommand {
Unlock,
SetAprsDecodeEnabled(bool),
SetCwDecodeEnabled(bool),
SetCwAuto(bool),
SetCwWpm(u32),
SetCwToneHz(u32),
ResetAprsDecoder,
ResetCwDecoder,
}
+15
View File
@@ -27,6 +27,12 @@ pub struct RigState {
pub aprs_decode_enabled: bool,
#[serde(default)]
pub cw_decode_enabled: bool,
#[serde(default)]
pub cw_auto: bool,
#[serde(default)]
pub cw_wpm: u32,
#[serde(default)]
pub cw_tone_hz: u32,
#[serde(default, skip_serializing)]
pub aprs_decode_reset_seq: u64,
#[serde(default, skip_serializing)]
@@ -78,6 +84,9 @@ impl RigState {
server_longitude: self.server_longitude,
aprs_decode_enabled: self.aprs_decode_enabled,
cw_decode_enabled: self.cw_decode_enabled,
cw_auto: self.cw_auto,
cw_wpm: self.cw_wpm,
cw_tone_hz: self.cw_tone_hz,
})
}
@@ -124,4 +133,10 @@ pub struct RigSnapshot {
pub aprs_decode_enabled: bool,
#[serde(default)]
pub cw_decode_enabled: bool,
#[serde(default)]
pub cw_auto: bool,
#[serde(default)]
pub cw_wpm: u32,
#[serde(default)]
pub cw_tone_hz: u32,
}