From 68696180686d00bbc35a1299f787a944d426e99f Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 22 May 2021 13:24:07 +0200 Subject: eval-clock-cw-tx LED is CW beep --- sw/eval-clock-cw-tx/src/main.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sw/eval-clock-cw-tx/src/main.rs b/sw/eval-clock-cw-tx/src/main.rs index e2e5f61..716d184 100644 --- a/sw/eval-clock-cw-tx/src/main.rs +++ b/sw/eval-clock-cw-tx/src/main.rs @@ -331,7 +331,6 @@ fn TIM2() { SequenceState::Rx => { shared.ptt_out.set_low().unwrap(); shared.seq_switch.set_low().unwrap(); - shared.led.set_high().unwrap(); if ptt { if shared.state.mode == Mode::FeldHell { SequenceState::Switching(SequenceMode::FeldHell) @@ -347,7 +346,6 @@ fn TIM2() { SequenceState::Switching(m) => { shared.ptt_out.set_low().unwrap(); shared.seq_switch.set_high().unwrap(); - shared.led.set_low().unwrap(); if ptt { SequenceState::Tx(m) } @@ -358,7 +356,6 @@ fn TIM2() { SequenceState::Tx(m) => { shared.ptt_out.set_high().unwrap(); shared.seq_switch.set_high().unwrap(); - shared.led.set_low().unwrap(); if ptt { SequenceState::Tx(m) } @@ -373,22 +370,19 @@ fn TIM2() { if cw_beep { shared.cw_pwm.on(); shared.cw_key_out_n.set_low().unwrap(); + shared.led.set_low().unwrap(); } else { shared.cw_pwm.off(); shared.cw_key_out_n.set_high().unwrap(); + shared.led.set_high().unwrap(); } }, SequenceState::Tx(SequenceMode::FeldHell) => { - // cw_key_out_n is handled by TIM4 ISR in usb.rs - if cw_beep { - shared.cw_pwm.on(); - } - else { - shared.cw_pwm.off(); - } + shared.led.set_low().unwrap(); }, _ => { + shared.led.set_high().unwrap(); shared.cw_pwm.off(); shared.cw_key_out_n.set_high().unwrap(); }, -- cgit v1.2.3