From e04fec33f079db4c5d42aa412f7b670784ec1b68 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 13 Mar 2023 23:14:32 +0100 Subject: Add WSPR TX to eval-clock-cw-tx --- sw/eval-clock-cw-tx/src/state.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sw/eval-clock-cw-tx/src/state.rs') diff --git a/sw/eval-clock-cw-tx/src/state.rs b/sw/eval-clock-cw-tx/src/state.rs index 44c64d2..4016a51 100644 --- a/sw/eval-clock-cw-tx/src/state.rs +++ b/sw/eval-clock-cw-tx/src/state.rs @@ -1,4 +1,4 @@ -const INITIAL_VFO : u32 = 10_100_000; +const INITIAL_VFO : u32 = 10_140_000; // Defines which parameter is changed by the encoder #[derive(Clone, Copy, PartialEq, Eq)] @@ -23,12 +23,14 @@ pub enum CWMode { pub enum Mode { CW(CWMode), FeldHell, + WSPR, } #[derive(PartialEq, Eq, Clone, Copy)] pub enum SequenceMode { CW, FeldHell, + WSPR, } #[derive(Clone, PartialEq, Eq)] @@ -48,19 +50,23 @@ pub struct State { pub sequence_state : SequenceState, pub update_disp_counter : u8, pub cw_wpm : u32, + pub wspr_freq_offset_centihz : u32, + pub wspr_freq_offset_updated : bool, } impl State { pub fn new() -> Self { State { ui_sel : UISelection::VFO, - mode : Mode::CW(CWMode::StraightKey), + mode : Mode::WSPR, vfo_sel : VFOSelection::A, vfo_a : INITIAL_VFO, vfo_b : INITIAL_VFO, sequence_state : SequenceState::Rx, update_disp_counter : 0, cw_wpm : 14, + wspr_freq_offset_centihz : 0, + wspr_freq_offset_updated : false, } } @@ -88,6 +94,7 @@ impl State { } } + pub fn allow_feldhell_keying(&self) -> bool { self.sequence_state == SequenceState::Tx(SequenceMode::FeldHell) } -- cgit v1.2.3