feat(Display): Improve touch handling and visual feedback
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user