From 7f9b25dd8e9c88f779a16069080b8b6b4b63a37d Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 24 Aug 2022 22:46:42 -0400 Subject: [PATCH] Update cubesatsim.ino --- cubesatsim/cubesatsim.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index b6704e5b..0208c3b5 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -4182,6 +4182,7 @@ void program_radio() { void read_mode() { + char buff[32]; File mode_file = LittleFS.open("/.mode", "r"); if (!mode_file) { Serial.println("Creating mode file"); @@ -4201,8 +4202,7 @@ void write_mode() { char buff[32]; Serial.println("Writing .mode file"); - File mode_file = LittleFS.open("/.mode", "w+"); - + File mode_file = LittleFS.open("/.mode", "w+"); sprintf(buff, "%d", mode); Serial.println("Writing string");