From 936b5cccc72dfb8a82b309a85b59be3a23b7c3d1 Mon Sep 17 00:00:00 2001 From: Bodmer Date: Fri, 22 Dec 2017 00:02:31 +0000 Subject: [PATCH] Add default touch detect threshold --- TFT_eSPI.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TFT_eSPI.h b/TFT_eSPI.h index c291c92..8b521f8 100644 --- a/TFT_eSPI.h +++ b/TFT_eSPI.h @@ -484,7 +484,7 @@ class TFT_eSPI : public Print { uint32_t lastColor = 0xFFFF; // These are associated with the Touch Screen handlers - uint8_t validTouch(uint16_t *x, uint16_t *y, uint16_t threshold); + uint8_t validTouch(uint16_t *x, uint16_t *y, uint16_t threshold = 600); // Initialise with example calibration values so processor does not crash if setTouch() not called in setup() uint16_t touchCalibration_x0 = 300, touchCalibration_x1 = 3600, touchCalibration_y0 = 300, touchCalibration_y1 = 3600; uint8_t touchCalibration_rotate = 1, touchCalibration_invert_x = 2, touchCalibration_invert_y = 0;