From 92e051eb5dc0f4dd31d753e2ca1c5fc9820cf756 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 14:58:12 -0500 Subject: [PATCH] added sleep after reboot --- cubesatsim/cubesatsim.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index b5a2a40a..0f3cd462 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -348,6 +348,8 @@ void loop() { */ watchdog_reboot (0, SRAM_END, 10); // restart Pico + sleep(20.0); + if (new_mode != CW) transmit_callsign(callsign); sleep(0.5); @@ -4317,7 +4319,9 @@ void prompt_for_input() { case PROMPT_FORMAT: LittleFS.format(); Serial.println("Reboot or power cycle to restart the CubeSatSim"); - while (1) ; // infinite loop + // while (1) ; // infinite loop + watchdog_reboot (0, SRAM_END, 10); // restart Pico + sleep(20.0); break; case PROMPT_PAYLOAD: