From ec29100a88915cb33bfa1d9b430bf67e3b1cc786 Mon Sep 17 00:00:00 2001
From: Markus <974709+Links2004@users.noreply.github.com>
Date: Fri, 19 Sep 2025 02:25:58 +0200
Subject: [PATCH 1/2] Allow Left / Right Events for selection and improve
encoder responsives (#8016)
* Allow Left / Right Events for selection and improve encoder responsives
* add define for ROTARY_DELAY
---
src/configuration.h | 7 +++++++
src/graphics/draw/NotificationRenderer.cpp | 12 ++++++++----
src/input/RotaryEncoderInterruptBase.cpp | 2 +-
src/modules/CannedMessageModule.cpp | 4 ++--
4 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/src/configuration.h b/src/configuration.h
index 81632c89e..1b386ec17 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -262,6 +262,13 @@ along with this program. If not, see .
#define VEXT_ON_VALUE LOW
#endif
+// -----------------------------------------------------------------------------
+// Rotary encoder
+// -----------------------------------------------------------------------------
+#ifndef ROTARY_DELAY
+#define ROTARY_DELAY 5
+#endif
+
// -----------------------------------------------------------------------------
// GPS
// -----------------------------------------------------------------------------
diff --git a/src/graphics/draw/NotificationRenderer.cpp b/src/graphics/draw/NotificationRenderer.cpp
index c2bd1ba66..710609f60 100644
--- a/src/graphics/draw/NotificationRenderer.cpp
+++ b/src/graphics/draw/NotificationRenderer.cpp
@@ -216,9 +216,11 @@ void NotificationRenderer::drawNodePicker(OLEDDisplay *display, OLEDDisplayUiSta
}
// Handle input
- if (inEvent.inputEvent == INPUT_BROKER_UP || inEvent.inputEvent == INPUT_BROKER_ALT_PRESS) {
+ if (inEvent.inputEvent == INPUT_BROKER_UP || inEvent.inputEvent == INPUT_BROKER_LEFT ||
+ inEvent.inputEvent == INPUT_BROKER_ALT_PRESS) {
curSelected--;
- } else if (inEvent.inputEvent == INPUT_BROKER_DOWN || inEvent.inputEvent == INPUT_BROKER_USER_PRESS) {
+ } else if (inEvent.inputEvent == INPUT_BROKER_DOWN || inEvent.inputEvent == INPUT_BROKER_RIGHT ||
+ inEvent.inputEvent == INPUT_BROKER_USER_PRESS) {
curSelected++;
} else if (inEvent.inputEvent == INPUT_BROKER_SELECT) {
alertBannerCallback(selectedNodenum);
@@ -333,9 +335,11 @@ void NotificationRenderer::drawAlertBannerOverlay(OLEDDisplay *display, OLEDDisp
// Handle input
if (alertBannerOptions > 0) {
- if (inEvent.inputEvent == INPUT_BROKER_UP || inEvent.inputEvent == INPUT_BROKER_ALT_PRESS) {
+ if (inEvent.inputEvent == INPUT_BROKER_UP || inEvent.inputEvent == INPUT_BROKER_LEFT ||
+ inEvent.inputEvent == INPUT_BROKER_ALT_PRESS) {
curSelected--;
- } else if (inEvent.inputEvent == INPUT_BROKER_DOWN || inEvent.inputEvent == INPUT_BROKER_USER_PRESS) {
+ } else if (inEvent.inputEvent == INPUT_BROKER_DOWN || inEvent.inputEvent == INPUT_BROKER_RIGHT ||
+ inEvent.inputEvent == INPUT_BROKER_USER_PRESS) {
curSelected++;
} else if (inEvent.inputEvent == INPUT_BROKER_SELECT) {
if (optionsEnumPtr != nullptr) {
diff --git a/src/input/RotaryEncoderInterruptBase.cpp b/src/input/RotaryEncoderInterruptBase.cpp
index 3511a990a..598353f98 100644
--- a/src/input/RotaryEncoderInterruptBase.cpp
+++ b/src/input/RotaryEncoderInterruptBase.cpp
@@ -120,7 +120,7 @@ RotaryEncoderInterruptBaseStateType RotaryEncoderInterruptBase::intHandler(bool
// Logic to prevent bouncing.
newState = ROTARY_EVENT_CLEARED;
}
- setIntervalFromNow(50); // TODO: this modifies a non-volatile variable!
+ setIntervalFromNow(ROTARY_DELAY); // TODO: this modifies a non-volatile variable!
return newState;
}
diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp
index 2fc0bf4a6..1af1dd7d3 100644
--- a/src/modules/CannedMessageModule.cpp
+++ b/src/modules/CannedMessageModule.cpp
@@ -394,14 +394,14 @@ bool CannedMessageModule::isUpEvent(const InputEvent *event)
return event->inputEvent == INPUT_BROKER_UP ||
((runState == CANNED_MESSAGE_RUN_STATE_ACTIVE || runState == CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER ||
runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION) &&
- event->inputEvent == INPUT_BROKER_ALT_PRESS);
+ (event->inputEvent == INPUT_BROKER_LEFT || event->inputEvent == INPUT_BROKER_ALT_PRESS));
}
bool CannedMessageModule::isDownEvent(const InputEvent *event)
{
return event->inputEvent == INPUT_BROKER_DOWN ||
((runState == CANNED_MESSAGE_RUN_STATE_ACTIVE || runState == CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER ||
runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION) &&
- event->inputEvent == INPUT_BROKER_USER_PRESS);
+ (event->inputEvent == INPUT_BROKER_RIGHT || event->inputEvent == INPUT_BROKER_USER_PRESS));
}
bool CannedMessageModule::isSelectEvent(const InputEvent *event)
{
From 9345bdcb224c4e42dd75470a1631a6e9ca03dddc Mon Sep 17 00:00:00 2001
From: WillyJL
Date: Sat, 13 Sep 2025 13:50:02 +0200
Subject: [PATCH 2/2] T-Lora Pager: Support LR1121 and SX1280 models (#7956)
* T-Lora Pager: Support LR1121 and SX1280 models
* Remove ifdefs
---
variants/esp32s3/tlora-pager/rfswitch.h | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/variants/esp32s3/tlora-pager/rfswitch.h b/variants/esp32s3/tlora-pager/rfswitch.h
index 337346ec5..0fba5a305 100644
--- a/variants/esp32s3/tlora-pager/rfswitch.h
+++ b/variants/esp32s3/tlora-pager/rfswitch.h
@@ -4,12 +4,8 @@ static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11
static const Module::RfSwitchMode_t rfswitch_table[] = {
// mode DIO5 DIO6
- {LR11x0::MODE_STBY, {LOW, LOW}},
- {LR11x0::MODE_RX, {LOW, HIGH}},
- {LR11x0::MODE_TX, {HIGH, LOW}},
- {LR11x0::MODE_TX_HP, {HIGH, LOW}},
- {LR11x0::MODE_TX_HF, {LOW, LOW}},
- {LR11x0::MODE_GNSS, {LOW, LOW}},
- {LR11x0::MODE_WIFI, {LOW, LOW}},
- END_OF_MODE_TABLE,
+ {LR11x0::MODE_STBY, {LOW, LOW}}, {LR11x0::MODE_RX, {LOW, HIGH}},
+ {LR11x0::MODE_TX, {HIGH, LOW}}, {LR11x0::MODE_TX_HP, {HIGH, LOW}},
+ {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},
+ {LR11x0::MODE_WIFI, {LOW, LOW}}, END_OF_MODE_TABLE,
};
\ No newline at end of file