Merge pull request #648 from mc-hamster/master

#647 - Fix for admin mode being forced on boards without hardware pullup
1.2-legacy
Jm Casler 2021-01-18 10:56:13 -08:00 zatwierdzone przez GitHub
commit 39d14fedc2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -303,17 +303,20 @@ void setup()
digitalWrite(RESET_OLED, 1);
#endif
#ifdef BUTTON_PIN
#ifndef NO_ESP32
// If BUTTON_PIN is held down during the startup process,
// force the device to go into a SoftAP mode.
bool forceSoftAP = 0;
#ifdef BUTTON_PIN
#ifndef NO_ESP32
pinMode(BUTTON_PIN, INPUT);
#ifdef BUTTON_NEED_PULLUP
gpio_pullup_en((gpio_num_t)BUTTON_PIN);
#endif
// BUTTON_PIN is pulled high by a 12k resistor.
if (!digitalRead(BUTTON_PIN)) {
forceSoftAP = 1;
DEBUG_MSG("-------------------- Setting forceSoftAP = 1\n");
DEBUG_MSG("Setting forceSoftAP = 1\n");
}
#endif
@ -513,7 +516,6 @@ void setup()
}
#endif
#ifndef NO_ESP32
// Initialize Wifi
initWifi(forceSoftAP);