fix(doorbell-touch): add touch debug logging and missing TFT_MISO pin

This commit is contained in:
2026-02-17 22:51:32 -08:00
parent cbe7efe883
commit 17c44d9b08
4 changed files with 17 additions and 3 deletions

View File

@@ -11,6 +11,10 @@ void DisplayDriverTFT::begin() {
Serial.printf("[GFX] Display OK: %dx%d\n", DISPLAY_WIDTH, DISPLAY_HEIGHT);
// Debug: check if touch controller is responding
uint16_t z = _tft.getTouchRawZ();
Serial.printf("[TOUCH] Raw Z=%d (non-zero = controller detected)\n", z);
drawBoot();
digitalWrite(PIN_LCD_BL, HIGH);
@@ -118,10 +122,12 @@ void DisplayDriverTFT::drawDashboard(const ScreenState& st) {
TouchEvent DisplayDriverTFT::readTouch() {
TouchEvent evt;
uint16_t tx, ty;
if(_tft.getTouch(&tx, &ty)) {
uint8_t touched = _tft.getTouch(&tx, &ty, 100);
if(touched) {
evt.pressed = true;
evt.x = tx;
evt.y = ty;
Serial.printf("[TOUCH] x=%d, y=%d\n", tx, ty);
}
return evt;
}