mirror of
https://github.com/wled/WLED.git
synced 2025-07-19 16:56:35 +00:00
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?
|
bool doublePress = buttonWaitTime[b]; //did we have a short press before?
|
||||||
buttonWaitTime[b] = 0;
|
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);
|
WLED::instance().initAP(true);
|
||||||
} else if (!buttonLongPressed[b]) { //short press
|
} else if (!buttonLongPressed[b]) { //short press
|
||||||
//NOTE: this interferes with double click handling in usermods so it is commented out
|
//NOTE: this interferes with double click handling in usermods so it is commented out
|
||||||
|
Loading…
x
Reference in New Issue
Block a user