mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
Debounce prog button (#34)
* bugfix, print not allowed in constructor * Update tpuart_data_link_layer.cpp - start confirm timout only after last byte was sent - increase BYTE_TIMEOUT * debounce progbutton
This commit is contained in:
parent
afd07d10cb
commit
4a877cc1b5
@ -14,9 +14,15 @@ KnxFacade<Esp32Platform, Bau57B0> knx;
|
|||||||
#define ICACHE_RAM_ATTR
|
#define ICACHE_RAM_ATTR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __linux__
|
||||||
|
uint32_t lastpressed=0;
|
||||||
|
#endif
|
||||||
ICACHE_RAM_ATTR void buttonUp()
|
ICACHE_RAM_ATTR void buttonUp()
|
||||||
{
|
{
|
||||||
#ifndef __linux__
|
#ifndef __linux__
|
||||||
|
if (millis() - lastpressed > 200){
|
||||||
knx._toogleProgMode = true;
|
knx._toogleProgMode = true;
|
||||||
|
lastpressed = millis();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user