mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +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");
|
File configFile = SPIFFS.open("/config.json", "r");
|
||||||
if (!configFile) {
|
if (!configFile) {
|
||||||
myDebug_P(PSTR("[FS] Failed to open config file"));
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -874,7 +876,7 @@ bool MyESP::_fs_loadConfig() {
|
|||||||
if (json.containsKey("use_serial")) {
|
if (json.containsKey("use_serial")) {
|
||||||
_use_serial = (bool)json["use_serial"];
|
_use_serial = (bool)json["use_serial"];
|
||||||
} else {
|
} else {
|
||||||
_use_serial = true; // if first time, set serial
|
_use_serial = false; // if first time, set serial to off
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user