mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-13 15:11:20 +10:00
* add hwid for auto-detection * fix: heltec-wireless-tracker USB serial * T-Deck support * trunk fmt * set FRAMERATE to 1 * fix some defines * trunk fmt * corrected vendor link * T-Deck: support keyboard, trackball & touch screen * T-Watch add touchscreen defs, remove getTouch * fix warnings * getTouch uint16 -> int16 * fix touch x,y * fix I2C port * CannedMsgModule: use entire display height * trunk fmt * fix I2C issue for T-Watch * allow dest selection in canned mode * fix: allow dest selection in canned mode * use tft.setBrightness() to poweroff display * Increased t-watch framerate and added back haptic feedback * add da ref * Move to touched * improved sensitivity and accuracy of touch events * use double tap to send canned message * fix warning * trunk fmt * Remove extra hapticFeedback() --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
31 lines
1.2 KiB
C++
31 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "InputBroker.h"
|
|
#include "mesh/NodeDB.h"
|
|
|
|
class TrackballInterruptBase : public Observable<const InputEvent *>
|
|
{
|
|
public:
|
|
explicit TrackballInterruptBase(const char *name);
|
|
void init(uint8_t pinDown, uint8_t pinUp, uint8_t pinLeft, uint8_t pinRight, uint8_t pinPress, char eventDown, char eventUp,
|
|
char eventLeft, char eventRight, char eventPressed, void (*onIntDown)(), void (*onIntUp)(), void (*onIntLeft)(),
|
|
void (*onIntRight)(), void (*onIntPress)());
|
|
void intPressHandler();
|
|
void intDownHandler();
|
|
void intUpHandler();
|
|
void intLeftHandler();
|
|
void intRightHandler();
|
|
|
|
private:
|
|
uint8_t _pinDown = 0;
|
|
uint8_t _pinUp = 0;
|
|
uint8_t _pinLeft = 0;
|
|
uint8_t _pinRight = 0;
|
|
char _eventDown = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE;
|
|
char _eventUp = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE;
|
|
char _eventLeft = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE;
|
|
char _eventRight = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE;
|
|
char _eventPressed = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE;
|
|
const char *_originName;
|
|
};
|