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

@@ -11,7 +11,7 @@ public:
void setBacklight(bool on) override;
void render(const ScreenState& state) override;
TouchEvent readTouch() override;
HoldState updateHold(unsigned long holdMs) override;
HoldState updateHold(const TouchEvent& evt, unsigned long holdMs) override;
int width() override {
// Use TFT_eSPI's dimensions after rotation - it's more reliable
return _tft.width();
@@ -43,6 +43,7 @@ private:
// Touch hint for alert - progressive fill from bottom
bool _alertTouchDown = false;
bool _alertNeedsRedraw = false; // force redraw after touch release
uint32_t _alertTouchStartMs = 0;
bool _lastAlertPhase = false; // tracks bright/dark phase for 2-color alert
static constexpr uint32_t ALERT_FILL_DURATION_MS = 3000;