mirror of
https://github.com/thelsing/knx.git
synced 2025-08-17 13:47:28 +02:00
debouncing prog button
This commit is contained in:
parent
893df4779a
commit
084b98d6b9
@ -17,10 +17,13 @@ Bau57B0 bau(platform);
|
||||
|
||||
#ifndef __linux__
|
||||
KnxFacade knx(bau);
|
||||
|
||||
uint32_t buttonTimestamp=0;
|
||||
void buttonUp()
|
||||
{
|
||||
knx.progMode(!knx.progMode());
|
||||
if (millis() - buttonTimestamp > 500){
|
||||
knx.progMode(!knx.progMode());
|
||||
buttonTimestamp = millis();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user