mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
Revert "Rename RotaryEncoderImpl to TLoraPagerRotaryEncoder"
This reverts commit a76cc88dc2.
This commit is contained in:
@@ -1,19 +1,19 @@
|
|||||||
#ifdef T_LORA_PAGER
|
#ifdef T_LORA_PAGER
|
||||||
|
|
||||||
#include "TLoraPagerRotaryEncoder.h"
|
#include "RotaryEncoderImpl.h"
|
||||||
#include "InputBroker.h"
|
#include "InputBroker.h"
|
||||||
#include "RotaryEncoder.h"
|
#include "RotaryEncoder.h"
|
||||||
|
|
||||||
#define ORIGIN_NAME "RotaryEncoder"
|
#define ORIGIN_NAME "RotaryEncoder"
|
||||||
|
|
||||||
TLoraPagerRotaryEncoder *tLoraPagerRotaryEncoder;
|
RotaryEncoderImpl *rotaryEncoderImpl;
|
||||||
|
|
||||||
TLoraPagerRotaryEncoder::TLoraPagerRotaryEncoder()
|
RotaryEncoderImpl::RotaryEncoderImpl()
|
||||||
{
|
{
|
||||||
rotary = nullptr;
|
rotary = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TLoraPagerRotaryEncoder::init()
|
bool RotaryEncoderImpl::init()
|
||||||
{
|
{
|
||||||
if (!moduleConfig.canned_message.updown1_enabled || moduleConfig.canned_message.inputbroker_pin_a == 0 ||
|
if (!moduleConfig.canned_message.updown1_enabled || moduleConfig.canned_message.inputbroker_pin_a == 0 ||
|
||||||
moduleConfig.canned_message.inputbroker_pin_b == 0) {
|
moduleConfig.canned_message.inputbroker_pin_b == 0) {
|
||||||
@@ -41,7 +41,7 @@ bool TLoraPagerRotaryEncoder::init()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TLoraPagerRotaryEncoder::pollOnce()
|
void RotaryEncoderImpl::pollOnce()
|
||||||
{
|
{
|
||||||
InputEvent e{ORIGIN_NAME, INPUT_BROKER_NONE, 0, 0, 0};
|
InputEvent e{ORIGIN_NAME, INPUT_BROKER_NONE, 0, 0, 0};
|
||||||
|
|
||||||
@@ -71,6 +71,6 @@ void TLoraPagerRotaryEncoder::pollOnce()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TLoraPagerRotaryEncoder *TLoraPagerRotaryEncoder::interruptInstance;
|
RotaryEncoderImpl *RotaryEncoderImpl::interruptInstance;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -10,15 +10,15 @@
|
|||||||
|
|
||||||
class RotaryEncoder;
|
class RotaryEncoder;
|
||||||
|
|
||||||
class TLoraPagerRotaryEncoder : public InputPollable
|
class RotaryEncoderImpl : public InputPollable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TLoraPagerRotaryEncoder();
|
RotaryEncoderImpl();
|
||||||
bool init(void);
|
bool init(void);
|
||||||
virtual void pollOnce() override;
|
virtual void pollOnce() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static TLoraPagerRotaryEncoder *interruptInstance;
|
static RotaryEncoderImpl *interruptInstance;
|
||||||
|
|
||||||
input_broker_event eventCw = INPUT_BROKER_NONE;
|
input_broker_event eventCw = INPUT_BROKER_NONE;
|
||||||
input_broker_event eventCcw = INPUT_BROKER_NONE;
|
input_broker_event eventCcw = INPUT_BROKER_NONE;
|
||||||
@@ -27,6 +27,6 @@ class TLoraPagerRotaryEncoder : public InputPollable
|
|||||||
RotaryEncoder *rotary;
|
RotaryEncoder *rotary;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern TLoraPagerRotaryEncoder *tLoraPagerRotaryEncoder;
|
extern RotaryEncoderImpl *rotaryEncoderImpl;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "input/ExpressLRSFiveWay.h"
|
#include "input/ExpressLRSFiveWay.h"
|
||||||
#include "input/InputBroker.h"
|
#include "input/InputBroker.h"
|
||||||
#ifdef T_LORA_PAGER
|
#ifdef T_LORA_PAGER
|
||||||
#include "input/TLoraPagerRotaryEncoder.h"
|
#include "input/RotaryEncoderImpl.h"
|
||||||
#endif
|
#endif
|
||||||
#include "input/RotaryEncoderInterruptImpl1.h"
|
#include "input/RotaryEncoderInterruptImpl1.h"
|
||||||
#include "input/SerialKeyboardImpl.h"
|
#include "input/SerialKeyboardImpl.h"
|
||||||
@@ -185,10 +185,10 @@ void setupModules()
|
|||||||
}
|
}
|
||||||
#ifdef T_LORA_PAGER
|
#ifdef T_LORA_PAGER
|
||||||
// use a special FSM based rotary encoder version for T-LoRa Pager
|
// use a special FSM based rotary encoder version for T-LoRa Pager
|
||||||
tLoraPagerRotaryEncoder = new TLoraPagerRotaryEncoder();
|
rotaryEncoderImpl = new RotaryEncoderImpl();
|
||||||
if (!tLoraPagerRotaryEncoder->init()) {
|
if (!rotaryEncoderImpl->init()) {
|
||||||
delete tLoraPagerRotaryEncoder;
|
delete rotaryEncoderImpl;
|
||||||
tLoraPagerRotaryEncoder = nullptr;
|
rotaryEncoderImpl = nullptr;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
upDownInterruptImpl1 = new UpDownInterruptImpl1();
|
upDownInterruptImpl1 = new UpDownInterruptImpl1();
|
||||||
|
|||||||
Reference in New Issue
Block a user