From 6635ba991e784386b55400d8ed1ee4c2b29648ca Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Sat, 13 Jul 2019 18:21:13 +0200 Subject: [PATCH] Button logic changed --- src/button.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/button.cpp b/src/button.cpp index 1765928e..6e52173e 100644 --- a/src/button.cpp +++ b/src/button.cpp @@ -28,19 +28,12 @@ void button_init(int pin) { #ifdef HAS_MATRIX_DISPLAY refreshTheMatrixDisplay(true); // switch to next display page #endif - -#if (!defined HAS_DISPLAY) && (!defined HAS_MATRIX_DISPLAY) - payload.reset(); - payload.addButton(0x01); - SendPayload(BUTTONPORT, prio_normal); -#endif }); b->setOnHolding([]() { -#if (HAS_LORA) - cfg.adrmode = !cfg.adrmode; - LMIC_setAdrMode(cfg.adrmode); -#endif + payload.reset(); + payload.addButton(0x01); + SendPayload(BUTTONPORT, prio_normal); }); // attach interrupt to the button