a bug in STMPE610 touch button API:
btn::justReleased works faulty
tft: HX8357
cpu: Adafruit Feather M4
IDE: 1.8.8
GFX-lib: version=1.4.10
HX8357-lib: version=1.1.4
touching a ts button is detected, but ts::justReleased does not detect lifting the touch, and then a 2nd touch outside the button is required before the ts button can detect a touch again.
The issue was described and confirmed here:
https://forums.adafruit.com/viewtopic.php?f=47&t=151012
Serial.print() log of arbitrary actions:
at start, its
X = -12 Y = 328 Pressure = 0
( stays to ifinity)
pressing anywhere in the middle of the TFT
X = 196 Y = 215 Pressure = 29
( stays to ifinity)
touching the button
X = 459 Y = 22 Pressure = 33
button shows up inverted, last tft.print: "just pressed"
then releasing it again: still the same
X = 459 Y = 22 Pressure = 33
button still shows up inverted, still last tft.print: "just pressed"
still after a couple of seconds, still no touch any more, constantly
(while button always shows up inverted, last tft.print: "just pressed")
X = 459 Y = 22 Pressure = 33
this does not vanish, stays to ifinity
until I again press somewhere in the middle of the TFT
X = 92 Y = 177 Pressure = 28
(now button not inverted but again normal color, last tft.print: "just releas(ed) ")
this again stays to ifinity
X = 92 Y = 177 Pressure = 28
(moved from GFX repo, issue https://github.com/adafruit/Adafruit-GFX-Library/issues/216#issue-440046947 )
a bug in STMPE610 touch button API: btn::justReleased works faulty tft: HX8357 cpu: Adafruit Feather M4 IDE: 1.8.8 GFX-lib: version=1.4.10 HX8357-lib: version=1.1.4
touching a ts button is detected, but ts::justReleased does not detect lifting the touch, and then a 2nd touch outside the button is required before the ts button can detect a touch again. The issue was described and confirmed here: https://forums.adafruit.com/viewtopic.php?f=47&t=151012
simple examples:
Serial.print() log of arbitrary actions: at start, its X = -12 Y = 328 Pressure = 0 ( stays to ifinity)
pressing anywhere in the middle of the TFT
X = 196 Y = 215 Pressure = 29 ( stays to ifinity)
touching the button X = 459 Y = 22 Pressure = 33 button shows up inverted, last tft.print: "just pressed"
then releasing it again: still the same X = 459 Y = 22 Pressure = 33 button still shows up inverted, still last tft.print: "just pressed"
still after a couple of seconds, still no touch any more, constantly (while button always shows up inverted, last tft.print: "just pressed") X = 459 Y = 22 Pressure = 33 this does not vanish, stays to ifinity
until I again press somewhere in the middle of the TFT X = 92 Y = 177 Pressure = 28 (now button not inverted but again normal color, last tft.print: "just releas(ed) ")
this again stays to ifinity X = 92 Y = 177 Pressure = 28