Better handling of buttonUp() across platforms

This commit is contained in:
Nanosonde
2020-11-03 09:40:16 +01:00
parent 9692a1a317
commit 197ea94ab8
3 changed files with 32 additions and 15 deletions

View File

@@ -5,6 +5,17 @@
KnxFacade<CC1310Platform, Bau27B0> *pKnx = nullptr;
void buttonUp()
{
static uint32_t lastpressed=0;
if (millis() - lastpressed > 200)
{
KnxFacade<CC1310Platform, Bau27B0> &knx = *pKnx;
knx._toogleProgMode = true;
lastpressed = millis();
}
}
void setup()
{
pKnx = new KnxFacade<CC1310Platform, Bau27B0>;