mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-13 23:45:25 +00:00
Delete firmware file if exists after factory reset
This commit is contained in:
parent
48bd352619
commit
0590ec375d
@ -258,7 +258,9 @@ void setup() {
|
||||
if(hasFs) {
|
||||
bool flashed = false;
|
||||
if(LittleFS.exists(FILE_FIRMWARE)) {
|
||||
if (gpioConfig.apPin == 0xFF || digitalRead(gpioConfig.apPin) == HIGH) {
|
||||
if (!config.hasConfig()) {
|
||||
debugI("Device has no config, yet a firmware file exists, deleting file.");
|
||||
} else if (gpioConfig.apPin == 0xFF || digitalRead(gpioConfig.apPin) == HIGH) {
|
||||
if(Debug.isActive(RemoteDebug::INFO)) debugI("Found firmware");
|
||||
#if defined(ESP8266)
|
||||
WiFi.setSleepMode(WIFI_LIGHT_SLEEP);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user