From 7cd1e9a1abd2593c49e4669955a710e302dc0ff3 Mon Sep 17 00:00:00 2001 From: Northern Man Date: Thu, 1 Oct 2020 14:10:12 -0400 Subject: [PATCH] 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 --- main/main.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/main.ino b/main/main.ino index c2194dc..46dd76b 100644 --- a/main/main.ino +++ b/main/main.ino @@ -859,7 +859,7 @@ void saveConfigCallback() { shouldSaveConfig = true; } -# if TRIGGER_GPIO +# ifdef TRIGGER_GPIO void checkButton() { // code from tzapu/wifimanager examples // check for button press if (digitalRead(TRIGGER_GPIO) == LOW) { @@ -900,7 +900,7 @@ void eraseAndRestart() { } void setup_wifimanager(bool reset_settings) { -# if TRIGGER_GPIO +# ifdef TRIGGER_GPIO pinMode(TRIGGER_GPIO, INPUT_PULLUP); # endif delay(10);