The reset button function does not work if TRIGGER_GPIO = 0 (#770)
After a bit of a challenge getting the config correct, determined that the reset button option doesn't work on a ESP32 due to the definition logic
This commit is contained in:
1 parent
1780458683
commit
7cd1e9a1ab
1 file changed
+2
-2
+2
-2
@@ -859,7 +859,7 @@ void saveConfigCallback() {
|
|||||||
shouldSaveConfig = true;
|
shouldSaveConfig = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
# if TRIGGER_GPIO
|
# ifdef TRIGGER_GPIO
|
||||||
void checkButton() { // code from tzapu/wifimanager examples
|
void checkButton() { // code from tzapu/wifimanager examples
|
||||||
// check for button press
|
// check for button press
|
||||||
if (digitalRead(TRIGGER_GPIO) == LOW) {
|
if (digitalRead(TRIGGER_GPIO) == LOW) {
|
||||||
@@ -900,7 +900,7 @@ void eraseAndRestart() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setup_wifimanager(bool reset_settings) {
|
void setup_wifimanager(bool reset_settings) {
|
||||||
# if TRIGGER_GPIO
|
# ifdef TRIGGER_GPIO
|
||||||
pinMode(TRIGGER_GPIO, INPUT_PULLUP);
|
pinMode(TRIGGER_GPIO, INPUT_PULLUP);
|
||||||
# endif
|
# endif
|
||||||
delay(10);
|
delay(10);
|
||||||
|
|||||||
Reference in new issue
Block a user