mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-16 12:53:23 +00:00
ft6336: ignore bogus touch events
At least one ft6336 device reports all 255 values from the first read after reset or poweron, even after waiting the specified 300ms reset delay. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-1
@@ -80,7 +80,8 @@ func (d *Device) Read() []byte {
|
|||||||
func (d *Device) ReadTouchPoint() touch.Point {
|
func (d *Device) ReadTouchPoint() touch.Point {
|
||||||
d.Read()
|
d.Read()
|
||||||
z := 0xFFFFF
|
z := 0xFFFFF
|
||||||
if d.buf[0] == 0 {
|
switch d.buf[0] {
|
||||||
|
case 0, 255:
|
||||||
z = 0
|
z = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user