Button logic changed

This commit is contained in:
Verkehrsrot 2019-07-13 18:21:13 +02:00
parent fbe0cf3b2e
commit 6635ba991e

View File

@ -28,19 +28,12 @@ void button_init(int pin) {
#ifdef HAS_MATRIX_DISPLAY #ifdef HAS_MATRIX_DISPLAY
refreshTheMatrixDisplay(true); // switch to next display page refreshTheMatrixDisplay(true); // switch to next display page
#endif #endif
#if (!defined HAS_DISPLAY) && (!defined HAS_MATRIX_DISPLAY)
payload.reset();
payload.addButton(0x01);
SendPayload(BUTTONPORT, prio_normal);
#endif
}); });
b->setOnHolding([]() { b->setOnHolding([]() {
#if (HAS_LORA) payload.reset();
cfg.adrmode = !cfg.adrmode; payload.addButton(0x01);
LMIC_setAdrMode(cfg.adrmode); SendPayload(BUTTONPORT, prio_normal);
#endif
}); });
// attach interrupt to the button // attach interrupt to the button