From a76cc88dc2cae630eb7793eb7b14cb223f9ddd8d Mon Sep 17 00:00:00 2001 From: WillyJL Date: Sat, 20 Sep 2025 18:53:30 +0200 Subject: [PATCH] Rename RotaryEncoderImpl to TLoraPagerRotaryEncoder --- ...ryEncoderImpl.cpp => TLoraPagerRotaryEncoder.cpp} | 12 ++++++------ ...RotaryEncoderImpl.h => TLoraPagerRotaryEncoder.h} | 8 ++++---- src/modules/Modules.cpp | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) rename src/input/{RotaryEncoderImpl.cpp => TLoraPagerRotaryEncoder.cpp} (89%) rename src/input/{RotaryEncoderImpl.h => TLoraPagerRotaryEncoder.h} (73%) diff --git a/src/input/RotaryEncoderImpl.cpp b/src/input/TLoraPagerRotaryEncoder.cpp similarity index 89% rename from src/input/RotaryEncoderImpl.cpp rename to src/input/TLoraPagerRotaryEncoder.cpp index 213dd4faa..1b99defee 100644 --- a/src/input/RotaryEncoderImpl.cpp +++ b/src/input/TLoraPagerRotaryEncoder.cpp @@ -1,19 +1,19 @@ #ifdef T_LORA_PAGER -#include "RotaryEncoderImpl.h" +#include "TLoraPagerRotaryEncoder.h" #include "InputBroker.h" #include "RotaryEncoder.h" #define ORIGIN_NAME "RotaryEncoder" -RotaryEncoderImpl *rotaryEncoderImpl; +TLoraPagerRotaryEncoder *tLoraPagerRotaryEncoder; -RotaryEncoderImpl::RotaryEncoderImpl() +TLoraPagerRotaryEncoder::TLoraPagerRotaryEncoder() { rotary = nullptr; } -bool RotaryEncoderImpl::init() +bool TLoraPagerRotaryEncoder::init() { if (!moduleConfig.canned_message.updown1_enabled || moduleConfig.canned_message.inputbroker_pin_a == 0 || moduleConfig.canned_message.inputbroker_pin_b == 0) { @@ -41,7 +41,7 @@ bool RotaryEncoderImpl::init() return true; } -void RotaryEncoderImpl::pollOnce() +void TLoraPagerRotaryEncoder::pollOnce() { InputEvent e{ORIGIN_NAME, INPUT_BROKER_NONE, 0, 0, 0}; @@ -71,6 +71,6 @@ void RotaryEncoderImpl::pollOnce() } } -RotaryEncoderImpl *RotaryEncoderImpl::interruptInstance; +TLoraPagerRotaryEncoder *TLoraPagerRotaryEncoder::interruptInstance; #endif \ No newline at end of file diff --git a/src/input/RotaryEncoderImpl.h b/src/input/TLoraPagerRotaryEncoder.h similarity index 73% rename from src/input/RotaryEncoderImpl.h rename to src/input/TLoraPagerRotaryEncoder.h index af70d1bf4..d5e2edf4e 100644 --- a/src/input/RotaryEncoderImpl.h +++ b/src/input/TLoraPagerRotaryEncoder.h @@ -10,15 +10,15 @@ class RotaryEncoder; -class RotaryEncoderImpl : public InputPollable +class TLoraPagerRotaryEncoder : public InputPollable { public: - RotaryEncoderImpl(); + TLoraPagerRotaryEncoder(); bool init(void); virtual void pollOnce() override; protected: - static RotaryEncoderImpl *interruptInstance; + static TLoraPagerRotaryEncoder *interruptInstance; input_broker_event eventCw = INPUT_BROKER_NONE; input_broker_event eventCcw = INPUT_BROKER_NONE; @@ -27,6 +27,6 @@ class RotaryEncoderImpl : public InputPollable RotaryEncoder *rotary; }; -extern RotaryEncoderImpl *rotaryEncoderImpl; +extern TLoraPagerRotaryEncoder *tLoraPagerRotaryEncoder; #endif diff --git a/src/modules/Modules.cpp b/src/modules/Modules.cpp index abafce070..35e509b83 100644 --- a/src/modules/Modules.cpp +++ b/src/modules/Modules.cpp @@ -4,7 +4,7 @@ #include "input/ExpressLRSFiveWay.h" #include "input/InputBroker.h" #ifdef T_LORA_PAGER -#include "input/RotaryEncoderImpl.h" +#include "input/TLoraPagerRotaryEncoder.h" #endif #include "input/RotaryEncoderInterruptImpl1.h" #include "input/SerialKeyboardImpl.h" @@ -185,10 +185,10 @@ void setupModules() } #ifdef T_LORA_PAGER // use a special FSM based rotary encoder version for T-LoRa Pager - rotaryEncoderImpl = new RotaryEncoderImpl(); - if (!rotaryEncoderImpl->init()) { - delete rotaryEncoderImpl; - rotaryEncoderImpl = nullptr; + tLoraPagerRotaryEncoder = new TLoraPagerRotaryEncoder(); + if (!tLoraPagerRotaryEncoder->init()) { + delete tLoraPagerRotaryEncoder; + tLoraPagerRotaryEncoder = nullptr; } #else upDownInterruptImpl1 = new UpDownInterruptImpl1();