summaryrefslogtreecommitdiff
path: root/wasp/drivers
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-09-21 19:12:38 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-09-21 19:12:38 (GMT)
commit6bf350a6e9f785609b0f82bea3328998fde57ac4 (patch)
treee38929bc1fb25cde0d5a8b28ef0cfe674395e0a6 /wasp/drivers
parent6890a5250283300180130e496a7e0b35e435da07 (diff)
drivers: cst816s: Clear the event buffer during a wake up
Currently with CST816S controllers (but not CST716S controllers) then a swipe delivered whilst the device is asleep will sometimes be processed after we wake it up. That's never likely to be useful. Fix this by explicitly clearing the event buffer as part of the wakeup sequence. Reported-by: Siroj42 <siroj42@users.noreply.github.com> Fixes: #65 Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/drivers')
-rw-r--r--wasp/drivers/cst816s.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/wasp/drivers/cst816s.py b/wasp/drivers/cst816s.py
index 0273ea9..314a63e 100644
--- a/wasp/drivers/cst816s.py
+++ b/wasp/drivers/cst816s.py
@@ -83,6 +83,7 @@ class CST816S:
Just reset the chip in order to wake it up
"""
self._reset()
+ self.event[0] = 0
def sleep(self):
"""Put touch controller chip on sleep mode to save power.