I’ve found on Macros - WLED Project that, “Button 0 has two, built-in functions. 1. Hold it down for >6 seconds and the Wi-Fi settings will be reset to default. 2. Hold it down for >12 seconds and flash memory is erased.”
Is there a way to disable both of those long press behaviors on button 0? Or to increase the number of seconds before the >6 seconds reset and >12 seconds memory erase happens?
\button.cpp
#define WLED_DEBOUNCE_THRESHOLD 50 // only consider button input of at least 50ms as valid (debouncing)
#define WLED_LONG_PRESS 600 // long press if button is released after held for at least 600ms
#define WLED_DOUBLE_PRESS 350 // double press if another press within 350ms after a short press
#define WLED_LONG_REPEATED_ACTION 300 // how often a repeated action (e.g. dimming) is fired on long press on button IDs >0
#define WLED_LONG_AP 5000 // how long button 0 needs to be held to activate WLED-AP
#define WLED_LONG_FACTORY_RESET 10000 // how long button 0 needs to be held to trigger a factory reset
There is no way to disable these two functions from GUI but you can assign GPIO to button 1 (or 2, etc) and you won’t be able to reset your ESP.
1 Like