mirror of
https://github.com/thelsing/knx.git
synced 2026-02-23 13:50:35 +01:00
Better handling of buttonUp() across platforms
This commit is contained in:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user