From 3e5eff6d646f0f117a41c307873803db5a3f0ece Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 24 Aug 2022 22:50:15 -0400 Subject: [PATCH] fixed create mode file --- cubesatsim/cubesatsim.ino | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 0208c3b5..b34e3200 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -4185,10 +4185,7 @@ void read_mode() { char buff[32]; File mode_file = LittleFS.open("/.mode", "r"); if (!mode_file) { - Serial.println("Creating mode file"); - mode_file = LittleFS.open("/.mode", "w+"); - mode_file.write(mode); - mode_file.close(); + write_mode(); } else { if (mode_file.read((uint8_t *)buff, 31)) { Serial.println("Reading mode from .mode file");