[feat](trx-rs): add WFM RDS and playback controls

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-02-27 23:57:46 +01:00
parent f77d0b0bb1
commit fffc4c6b90
21 changed files with 659 additions and 21 deletions
+3
View File
@@ -297,6 +297,7 @@ mod tests {
bandwidth_hz: 3000,
fir_taps: 64,
cw_center_hz: 700,
wfm_deemphasis_us: 75,
}),
..minimal_snapshot()
})
@@ -332,6 +333,7 @@ mod tests {
bandwidth_hz: 12000,
fir_taps: 128,
cw_center_hz: 700,
wfm_deemphasis_us: 50,
}),
..minimal_snapshot()
};
@@ -340,6 +342,7 @@ mod tests {
let f = decoded.filter.expect("filter should round-trip");
assert_eq!(f.bandwidth_hz, 12000);
assert_eq!(f.fir_taps, 128);
assert_eq!(f.wfm_deemphasis_us, 50);
}
fn minimal_snapshot() -> trx_core::rig::state::RigSnapshot {
+6
View File
@@ -48,6 +48,9 @@ pub fn client_command_to_rig(cmd: ClientCommand) -> RigCommand {
ClientCommand::ResetWsprDecoder => RigCommand::ResetWsprDecoder,
ClientCommand::SetBandwidth { bandwidth_hz } => RigCommand::SetBandwidth(bandwidth_hz),
ClientCommand::SetFirTaps { taps } => RigCommand::SetFirTaps(taps),
ClientCommand::SetWfmDeemphasis { deemphasis_us } => {
RigCommand::SetWfmDeemphasis(deemphasis_us)
}
ClientCommand::GetSpectrum => RigCommand::GetSpectrum,
}
}
@@ -89,6 +92,9 @@ pub fn rig_command_to_client(cmd: RigCommand) -> ClientCommand {
RigCommand::ResetWsprDecoder => ClientCommand::ResetWsprDecoder,
RigCommand::SetBandwidth(bandwidth_hz) => ClientCommand::SetBandwidth { bandwidth_hz },
RigCommand::SetFirTaps(taps) => ClientCommand::SetFirTaps { taps },
RigCommand::SetWfmDeemphasis(deemphasis_us) => {
ClientCommand::SetWfmDeemphasis { deemphasis_us }
}
RigCommand::GetSpectrum => ClientCommand::GetSpectrum,
}
}
+1
View File
@@ -38,6 +38,7 @@ pub enum ClientCommand {
ResetWsprDecoder,
SetBandwidth { bandwidth_hz: u32 },
SetFirTaps { taps: u32 },
SetWfmDeemphasis { deemphasis_us: u32 },
GetSpectrum,
}