From d45189798c160cee329b7c59636b0caf538244f6 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 31 Jan 2024 23:18:07 +0100 Subject: DART-70: get VOX and CW working --- sw/dart-70/src/ui.rs | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'sw/dart-70/src/ui.rs') diff --git a/sw/dart-70/src/ui.rs b/sw/dart-70/src/ui.rs index f607b2b..9db2988 100644 --- a/sw/dart-70/src/ui.rs +++ b/sw/dart-70/src/ui.rs @@ -31,7 +31,7 @@ use stm32f1xx_hal::{ gpio::gpioa::*, gpio::gpiob::*, gpio::gpioc::*, - gpio::{Input, PullUp, Floating}, + gpio::{Input, Floating}, }; use embedded_hal::blocking::delay::{DelayMs, DelayUs}; @@ -104,7 +104,6 @@ pub struct UI { btn_enc : PC15>, mic_ptt : PA3>, - _vox_ptt_n : PA0>, previous_button_state : ButtonState, } @@ -112,7 +111,6 @@ pub struct UI { impl UI { pub fn new( mic_ptt: PA3>, - vox_ptt_n: PA0>, btn0: PB1>, btn1: PB0>, btn2: PB12>, @@ -126,7 +124,6 @@ impl UI { btn3, btn_enc, mic_ptt, - _vox_ptt_n: vox_ptt_n, previous_button_state: ButtonState::default(), } } @@ -189,8 +186,9 @@ impl UI { (UISelection::Mode, Mode::USB) => (UISelection::Mode, Mode::LSB), (UISelection::Mode, Mode::LSB) => (UISelection::Mode, Mode::CW(CWMode::StraightKey)), (UISelection::Mode, Mode::CW(CWMode::StraightKey)) => (UISelection::Mode, Mode::CW(CWMode::Iambic)), - (UISelection::Mode, Mode::CW(CWMode::Iambic)) => (UISelection::Mode, Mode::USB), - (UISelection::Mode, Mode::CustomShift(_)) => (UISelection::Mode, Mode::USB), + (UISelection::Mode, Mode::CW(CWMode::Iambic)) => (UISelection::Mode, Mode::DIG), + (UISelection::Mode, Mode::CustomShift(_)) => (UISelection::Mode, Mode::DIG), + (UISelection::Mode, Mode::DIG) => (UISelection::Mode, Mode::USB), (_, f) => (UISelection::Mode, f), }; @@ -322,7 +320,20 @@ pub fn update_disp + DelayMs "Rx", + SequenceState::MutingSpkr => "Ms", + SequenceState::SwitchingSSB => "Ss", + SequenceState::TxSSB => "Ts", + SequenceState::SwitchingCW => "Sc", + SequenceState::TxCW => "Tc", + SequenceState::SwitchingDIG => "Sd", + SequenceState::TxDIG => "Td", + }).unwrap(); + */ } lcd.set_cursor_pos(0, delay).unwrap(); @@ -348,6 +359,7 @@ pub fn update_disp + DelayMs "IFs", Mode::CW(CWMode::StraightKey) => "CWs", Mode::CW(CWMode::Iambic) => "CWp", + Mode::DIG => "DIG", }; write!(string, "{} 1/2", mode).unwrap(); -- cgit v1.2.3