feat(Display): Improve touch handling and visual feedback

This commit is contained in:
2026-02-20 04:10:39 -08:00
parent 688b1905e5
commit 72636f9ecf
10 changed files with 43 additions and 18 deletions

View File

@@ -298,11 +298,10 @@ int DisplayDriverTFT::dashboardTouch(int x, int y) {
return row * 2 + col; // 0, 1, 2, or 3
}
HoldState DisplayDriverTFT::updateHold(unsigned long holdMs) {
HoldState DisplayDriverTFT::updateHold(const TouchEvent& evt, unsigned long holdMs) {
HoldState h;
TouchEvent t = readTouch();
if(t.pressed) {
if(evt.pressed) {
if(!_holdActive) {
_holdActive = true;
_holdStartMs = millis();

View File

@@ -12,7 +12,7 @@ public:
void render(const ScreenState& state) override;
TouchEvent readTouch() override;
int dashboardTouch(int x, int y);
HoldState updateHold(unsigned long holdMs) override;
HoldState updateHold(const TouchEvent& evt, unsigned long holdMs) override;
int width() override { return DISPLAY_WIDTH; }
int height() override { return DISPLAY_HEIGHT; }