detach interrupt then restart button isr

pico-format
alanbjohnston 3 years ago committed by GitHub
parent 3b67b85b14
commit 601b739298
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -305,8 +305,10 @@ void loop() {
// check to see if the mode has changed // check to see if the mode has changed
if (mode != new_mode) { if (mode != new_mode) {
Serial.println("Changing mode"); Serial.println("Changing mode");
if (mode == SSTV) if (mode == SSTV) {
ITimer1.detachInterrupt();
start_button_isr(); // restart button isr start_button_isr(); // restart button isr
}
mode = new_mode; // change modes if button pressed mode = new_mode; // change modes if button pressed
write_mode(); write_mode();
if (new_mode != CW) if (new_mode != CW)

Loading…
Cancel
Save

Powered by TurnKey Linux.