From aab7f0cebf8fec91e08b2871bf3929616390b9c7 Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Wed, 22 Sep 2021 14:59:22 +0200 Subject: [PATCH] Small adjustments to #213 --- src/drv/old/hasp_drv_analogTouch.h | 4 ---- src/drv/old/hasp_drv_touch.cpp | 2 +- src/drv/touch/touch_driver.h | 8 +------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/drv/old/hasp_drv_analogTouch.h b/src/drv/old/hasp_drv_analogTouch.h index 5ca176b4..2af85c08 100644 --- a/src/drv/old/hasp_drv_analogTouch.h +++ b/src/drv/old/hasp_drv_analogTouch.h @@ -2,7 +2,6 @@ // as oversampling to avoid 'bouncing' // (c) ladyada / adafruit // Code under MIT License -// Code under MIT License #ifndef _ADAFRUIT_TOUCHSCREEN_H_ #define _ADAFRUIT_TOUCHSCREEN_H_ @@ -81,8 +80,6 @@ TSPoint TouchScreen::getPoint(void) int samples[NUMSAMPLES]; uint8_t i; - valid = 1; - pinMode(_yp, INPUT); pinMode(_ym, INPUT); pinMode(_xp, OUTPUT); @@ -107,7 +104,6 @@ TSPoint TouchScreen::getPoint(void) digitalWrite(_yp, HIGH); for(i = 0; i < NUMSAMPLES; i++) { - samples[i] = analogRead(aXM); } diff --git a/src/drv/old/hasp_drv_touch.cpp b/src/drv/old/hasp_drv_touch.cpp index 540c4e6e..4a27534d 100644 --- a/src/drv/old/hasp_drv_touch.cpp +++ b/src/drv/old/hasp_drv_touch.cpp @@ -99,7 +99,7 @@ static inline bool drv_touchpad_getXY(int16_t* touchX, int16_t* touchY) // touched = GT911_getXY(&normal_x, &normal_y, true); #elif TOUCH_DRIVER == 0xADC // Analog Digital Touch Conroller - touched = Touch_getXY(&normal_x, &normal_y, false); + // touched = Touch_getXY(&normal_x, &normal_y, false); #elif TOUCH_DRIVER == 5206 // WARNING : this library is slooow !! use 6336 instead diff --git a/src/drv/touch/touch_driver.h b/src/drv/touch/touch_driver.h index 2da354f0..04e71b16 100644 --- a/src/drv/touch/touch_driver.h +++ b/src/drv/touch/touch_driver.h @@ -63,7 +63,7 @@ class BaseTouch { #elif TOUCH_DRIVER == 911 #warning Building for GT911 #include "touch_driver_gt911.h" -#elif TOUCH_DRIVER == 404 +#elif TOUCH_DRIVER == 0xADC #warning Building for analog touch #include "touch_driver_analog.h" #else @@ -76,9 +76,3 @@ extern dev::BaseTouch haspTouch; // #elif TOUCH_DRIVER == 0x2046B // touched = XPT2046_getXY(&normal_x, &normal_y, true); - -// #elif TOUCH_DRIVER == 911 -// touched = GT911_getXY(&normal_x, &normal_y, true); - -// #elif TOUCH_DRIVER == 0xADC // Analog Digital Touch Conroller -// touched = Touch_getXY(&normal_x, &normal_y, false);