mirror of
https://github.com/thelsing/knx.git
synced 2025-08-17 13:47:28 +02:00
debounce progbutton
This commit is contained in:
parent
7aa4343c6a
commit
1b026f3d4d
@ -14,9 +14,15 @@ KnxFacade<Esp32Platform, Bau57B0> knx;
|
||||
#define ICACHE_RAM_ATTR
|
||||
#endif
|
||||
|
||||
#ifndef __linux__
|
||||
uint32_t lastpressed=0;
|
||||
#endif
|
||||
ICACHE_RAM_ATTR void buttonUp()
|
||||
{
|
||||
#ifndef __linux__
|
||||
knx._toogleProgMode = true;
|
||||
if (millis() - lastpressed > 200){
|
||||
knx._toogleProgMode = true;
|
||||
lastpressed = millis();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user