From 64f5af5f8325af6e1930121115c93f9209ef939a Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sat, 19 Nov 2022 17:59:32 -0500 Subject: [PATCH] added PROMPT_FORMAT --- cubesatsim/cubesatsim.ino | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 724d2e53..31d76544 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -4052,10 +4052,7 @@ void serial_input() { case 'F': Serial.println("Formatting flash memory"); - LittleFS.format(); - Serial.println("Reboot or power cycle to restart the CubeSatSim"); - while (1) ; // infinite loop - + prompt = PROMPT_FORMAT; break; case 'f': Serial.println("Change to FSK mode"); @@ -4283,6 +4280,12 @@ void prompt_for_input() { read_ina219(); break; + case PROMPT_FORMAT: + LittleFS.format(); + Serial.println("Reboot or power cycle to restart the CubeSatSim"); + while (1) ; // infinite loop + break; + case PROMPT_PAYLOAD: Serial.println("Resetting the Payload"); payload_command = PAYLOAD_RESET;