feat(touch): add continuous touch polling and debug logging
This commit is contained in:
@@ -10,15 +10,18 @@ void DisplayDriverTFT::begin() {
|
||||
_tft.fillScreen(TFT_BLACK);
|
||||
|
||||
Serial.printf("[GFX] Display OK: %dx%d\n", DISPLAY_WIDTH, DISPLAY_HEIGHT);
|
||||
Serial.flush();
|
||||
|
||||
// Debug: check if touch controller is responding
|
||||
uint16_t z = _tft.getTouchRawZ();
|
||||
Serial.printf("[TOUCH] Raw Z=%d (non-zero = controller detected)\n", z);
|
||||
Serial.flush();
|
||||
|
||||
drawBoot();
|
||||
|
||||
digitalWrite(PIN_LCD_BL, HIGH);
|
||||
Serial.println("[GFX] Backlight ON");
|
||||
Serial.flush();
|
||||
}
|
||||
|
||||
void DisplayDriverTFT::setBacklight(bool on) { digitalWrite(PIN_LCD_BL, on ? HIGH : LOW); }
|
||||
@@ -132,6 +135,10 @@ TouchEvent DisplayDriverTFT::readTouch() {
|
||||
return evt;
|
||||
}
|
||||
|
||||
uint16_t DisplayDriverTFT::getRawTouchZ() {
|
||||
return _tft.getTouchRawZ();
|
||||
}
|
||||
|
||||
int DisplayDriverTFT::dashboardTouch(int x, int y) {
|
||||
// 2x2 grid, accounting for 30px header
|
||||
if(y < 30)
|
||||
|
||||
Reference in New Issue
Block a user