prevent flickering during OTA
I've almost toasted my wiring due to uncontrolled LED flickering during OTA. So here is the fix - it prevents any strip updates when OTA is ongoing.
This commit is contained in:
@@ -336,6 +336,8 @@ void initServer()
|
||||
if(!index){
|
||||
DEBUG_PRINTLN(F("OTA Update Start"));
|
||||
WLED::instance().disableWatchdog();
|
||||
OTAisRunning = true; // WLEDMM flicker fixer
|
||||
strip.fill(BLACK);
|
||||
usermods.onUpdateBegin(true); // notify usermods that update is about to begin (some may require task de-init)
|
||||
lastEditTime = millis(); // make sure PIN does not lock during update
|
||||
#ifdef ESP8266
|
||||
@@ -352,6 +354,7 @@ void initServer()
|
||||
usermods.onUpdateBegin(false); // notify usermods that update has failed (some may require task init)
|
||||
WLED::instance().enableWatchdog();
|
||||
}
|
||||
OTAisRunning = false; // WLEDMM flicker fixer
|
||||
}
|
||||
});
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user