Per default don't use TRIGGER_GPIO (#633)
and move SLEEP_BUTTON definition to config_M5 as it is only used for the moment with M5 stack and stickc boards
This commit is contained in:
1 parent
ae342f4a32
commit
afa3010033
4 files changed
+16
-12
No files matched your search
+6
-1
@@ -774,6 +774,7 @@ void saveConfigCallback() {
|
||||
shouldSaveConfig = true;
|
||||
}
|
||||
|
||||
# if TRIGGER_GPIO
|
||||
void checkButton() { // code from tzapu/wifimanager examples
|
||||
// check for button press
|
||||
if (digitalRead(TRIGGER_GPIO) == LOW) {
|
||||
@@ -791,6 +792,9 @@ void checkButton() { // code from tzapu/wifimanager examples
|
||||
}
|
||||
}
|
||||
}
|
||||
# else
|
||||
void checkButton() {}
|
||||
# endif
|
||||
|
||||
void eraseAndRestart() {
|
||||
# if defined(ESP8266)
|
||||
@@ -811,8 +815,9 @@ void eraseAndRestart() {
|
||||
}
|
||||
|
||||
void setup_wifimanager(bool reset_settings) {
|
||||
# if TRIGGER_GPIO
|
||||
pinMode(TRIGGER_GPIO, INPUT_PULLUP);
|
||||
|
||||
# endif
|
||||
delay(10);
|
||||
WiFi.mode(WIFI_STA);
|
||||
if (!wifiProtocol) forceWifiProtocol();
|
||||
|
||||
Reference in new issue
Block a user