mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 02:02:23 +00:00
* initial commit * preset rotary1 encoder * define TAB+ESC * haptic feedback * allow switch off haptic feedback * enable audio amplifier * include PR4684 * fix for tft target * add ES8311 audio codec * fix KB scan duplicate * display workaround to avoid debris * fix debris on display * keyboard backlight * enable screen options * fsm based bounce-free rotary encoder implementation * use fsm RotaryEncoder only for T-Lora Pager * change inputbroker default config to allow using rotary wheel for screens AND menues --------- Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com> Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
29 lines
724 B
C++
29 lines
724 B
C++
#pragma once
|
|
|
|
// This is a non-interrupt version of RotaryEncoder which is based on a debounce inherent FSM table (see RotaryEncoder library)
|
|
|
|
#include "InputBroker.h"
|
|
#include "concurrency/OSThread.h"
|
|
#include "mesh/NodeDB.h"
|
|
|
|
class RotaryEncoder;
|
|
|
|
class RotaryEncoderImpl : public Observable<const InputEvent *>, public concurrency::OSThread
|
|
{
|
|
public:
|
|
RotaryEncoderImpl();
|
|
bool init(void);
|
|
|
|
protected:
|
|
virtual int32_t runOnce() override;
|
|
|
|
input_broker_event eventCw = INPUT_BROKER_NONE;
|
|
input_broker_event eventCcw = INPUT_BROKER_NONE;
|
|
input_broker_event eventPressed = INPUT_BROKER_NONE;
|
|
|
|
RotaryEncoder *rotary;
|
|
const char *originName;
|
|
};
|
|
|
|
extern RotaryEncoderImpl *rotaryEncoderImpl;
|