Factory reset on very long press.
This commit is contained in:
parent
24a5f7a38e
commit
34865f797f
@ -254,7 +254,11 @@ void handleButton()
|
||||
bool doublePress = buttonWaitTime[b]; //did we have a short press before?
|
||||
buttonWaitTime[b] = 0;
|
||||
|
||||
if (b == 0 && dur > WLED_LONG_AP) { //long press on button 0 (when released)
|
||||
if (b == 0 && dur > 2*WLED_LONG_AP) { //very long press on button 0 (when released)
|
||||
WLED_FS.format();
|
||||
clearEEPROM();
|
||||
doReboot = true;
|
||||
} else if (b == 0 && dur > WLED_LONG_AP) { //long press on button 0 (when released)
|
||||
WLED::instance().initAP(true);
|
||||
} else if (!buttonLongPressed[b]) { //short press
|
||||
//NOTE: this interferes with double click handling in usermods so it is commented out
|
||||
|
Loading…
Reference in New Issue
Block a user