refactor(AGENTS.md): update docs for simplified build commands and board config
This commit is contained in:
@@ -259,6 +259,7 @@ void DisplayDriverTFT::drawDashboard(const ScreenState& st) {
|
||||
|
||||
// Get tile layouts from library helper
|
||||
int tileCount = display.calculateDashboardLayouts(STYLE_HEADER_HEIGHT, STYLE_TILE_GAP);
|
||||
display.setHeaderHeight(STYLE_HEADER_HEIGHT);
|
||||
const TileLayout* layouts = display.getTileLayouts();
|
||||
|
||||
const char* tileLabels[] = { "Alert", "Silent", "Status", "Reboot" };
|
||||
@@ -377,6 +378,14 @@ TouchEvent DisplayDriverTFT::readTouch() {
|
||||
uint16_t tx, ty;
|
||||
uint8_t touched = _tft.getTouch(&tx, &ty, 100);
|
||||
|
||||
// Filter out invalid coordinates (touch panel can return garbage on release)
|
||||
// Check against actual display dimensions (320x480 for this board)
|
||||
bool validCoords = !(tx > 320 || ty > 480);
|
||||
if(touched && !validCoords) {
|
||||
touched = 0;
|
||||
return evt;
|
||||
}
|
||||
|
||||
// Debug: log touch state changes
|
||||
if(touched != _touchWasPressed) {
|
||||
Serial.printf("[TOUCH] raw touched=%d wasPressed=%d (x=%d,y=%d)\n", touched,
|
||||
|
||||
Reference in New Issue
Block a user