From a2d071d5482d9a5a9b0f7341adbdb541f4f0ff37 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 27 Nov 2022 11:07:49 -0500 Subject: [PATCH] move mode check --- cubesatsim/cubesatsim.ino | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 73d15640..7f95cb32 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -319,7 +319,7 @@ void loop() { prompt_for_input(); prompt = false; } - +*/ // check to see if the mode has changed if (mode != new_mode) { Serial.println("Changing mode"); @@ -336,7 +336,7 @@ void loop() { config_radio(); sampleTime = (unsigned int) millis(); } -*/ +/**/ // Calculate loop time if (debug_mode) { Serial.print("\nLoop time: "); @@ -3259,23 +3259,7 @@ void loop1() { process_bootsel(); Serial.println("l4"); - - // check to see if the mode has changed - if (mode != new_mode) { - Serial.println("Changing mode"); -/// 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) - transmit_callsign(callsign); - sleep(0.5); - config_telem(); - config_radio(); - sampleTime = (unsigned int) millis(); - } + Serial.println("l5"); // sleep(1.0); // delay(1000);