aboutsummaryrefslogtreecommitdiffstats
path: root/sw/eval-clock-cw-tx/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2021-05-22 13:24:07 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2021-05-22 13:24:07 +0200
commit68696180686d00bbc35a1299f787a944d426e99f (patch)
treefba3c760f76c27fa07bb0682d88abb04f1ae1302 /sw/eval-clock-cw-tx/src
parent31245568b5afc255d4287e9a6dea8fe62259e36c (diff)
downloadpicardy-68696180686d00bbc35a1299f787a944d426e99f.tar.gz
picardy-68696180686d00bbc35a1299f787a944d426e99f.tar.bz2
picardy-68696180686d00bbc35a1299f787a944d426e99f.zip
eval-clock-cw-tx LED is CW beep
Diffstat (limited to 'sw/eval-clock-cw-tx/src')
-rw-r--r--sw/eval-clock-cw-tx/src/main.rs14
1 files 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();
},