From 601b739298b8c234044e2e7f9b98bcc7767f2bad Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 20 Nov 2022 09:58:20 -0500 Subject: [PATCH] detach interrupt then restart button isr --- cubesatsim/cubesatsim.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index daf77215..9f7ef41d 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -305,8 +305,10 @@ void loop() { // check to see if the mode has changed if (mode != new_mode) { Serial.println("Changing mode"); - if (mode == SSTV) + if (mode == SSTV) { + ITimer1.detachInterrupt(); start_button_isr(); // restart button isr + } mode = new_mode; // change modes if button pressed write_mode(); if (new_mode != CW)