mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
serial is off for upgrades, on for new installs
This commit is contained in:
@@ -831,6 +831,8 @@ bool MyESP::_fs_loadConfig() {
|
||||
File configFile = SPIFFS.open("/config.json", "r");
|
||||
if (!configFile) {
|
||||
myDebug_P(PSTR("[FS] Failed to open config file"));
|
||||
// file does not exist, so assume its the first install. Set serial to on
|
||||
_use_serial = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -874,7 +876,7 @@ bool MyESP::_fs_loadConfig() {
|
||||
if (json.containsKey("use_serial")) {
|
||||
_use_serial = (bool)json["use_serial"];
|
||||
} else {
|
||||
_use_serial = true; // if first time, set serial
|
||||
_use_serial = false; // if first time, set serial to off
|
||||
ok = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user