Make the 4-way on the L1 work on press instead of release (#7108)

This commit is contained in:
Jonathan Bennett
2025-06-22 20:57:39 -05:00
committed by GitHub
parent 0808f5215f
commit 012f88e56f
4 changed files with 47 additions and 19 deletions

View File

@@ -3,6 +3,10 @@
#include "InputBroker.h"
#include "mesh/NodeDB.h"
#ifndef TB_DIRECTION
#define TB_DIRECTION RISING
#endif
class TrackballInterruptBase : public Observable<const InputEvent *>, public concurrency::OSThread
{
public:
@@ -16,6 +20,7 @@ class TrackballInterruptBase : public Observable<const InputEvent *>, public con
void intUpHandler();
void intLeftHandler();
void intRightHandler();
uint32_t lastTime = 0;
virtual int32_t runOnce() override;
@@ -28,14 +33,15 @@ class TrackballInterruptBase : public Observable<const InputEvent *>, public con
TB_ACTION_LEFT,
TB_ACTION_RIGHT
};
volatile TrackballInterruptBaseActionType action = TB_ACTION_NONE;
private:
uint8_t _pinDown = 0;
uint8_t _pinUp = 0;
uint8_t _pinLeft = 0;
uint8_t _pinRight = 0;
uint8_t _pinPress = 0;
volatile TrackballInterruptBaseActionType action = TB_ACTION_NONE;
private:
input_broker_event _eventDown = INPUT_BROKER_NONE;
input_broker_event _eventUp = INPUT_BROKER_NONE;
input_broker_event _eventLeft = INPUT_BROKER_NONE;