feat(esp32-s3-lcd-43): add touch test harness and coordinate transformation
This commit is contained in:
@@ -18,6 +18,9 @@ public:
|
||||
int width() override;
|
||||
int height() override;
|
||||
|
||||
// Transform touch coordinates (handles rotated touch panels)
|
||||
void transformTouch(int* x, int* y) override;
|
||||
|
||||
// Dashboard tile mapping
|
||||
int dashboardTouch(int x, int y);
|
||||
|
||||
@@ -25,6 +28,9 @@ public:
|
||||
static DisplayDriverGFX& instance();
|
||||
|
||||
private:
|
||||
// Test harness: parse serial commands to inject synthetic touches
|
||||
bool parseTestTouch(int* outX, int* outY, bool* outPressed);
|
||||
|
||||
// Helper rendering functions
|
||||
void drawBoot(const ScreenState& state);
|
||||
void drawAlert(const ScreenState& state);
|
||||
@@ -34,6 +40,9 @@ private:
|
||||
TouchEvent _lastTouch = { false, false, 0, 0, -1, -1 };
|
||||
unsigned long _pressStartMs = 0;
|
||||
bool _isHolding = false;
|
||||
unsigned long _lastReleaseMs = 0;
|
||||
bool _touchBounced = false;
|
||||
bool _testMode = false;
|
||||
|
||||
// Screen tracking
|
||||
ScreenID _lastScreen = ScreenID::BOOT;
|
||||
|
||||
Reference in New Issue
Block a user