mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
no wifi disconnect until reboot on ssid cleared
This commit is contained in:
@@ -46,6 +46,7 @@ PButton::PButton() {
|
||||
longPressHappened_ = false; // whether or not the hold event happened already
|
||||
vLongPressHappened_ = false; // whether or not the long hold event happened already
|
||||
buttonBusy_ = false; // idle
|
||||
pin_ = 255; // undefined
|
||||
}
|
||||
|
||||
bool PButton::init(uint8_t pin, bool pullMode) {
|
||||
@@ -83,7 +84,7 @@ void PButton::onVLongPress(uint16_t t, buttonEventHandler handler) {
|
||||
}
|
||||
|
||||
bool PButton::check(void) {
|
||||
if (!enabled_) {
|
||||
if (!enabled_ || pin_ == 255) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user