From 6bf350a6e9f785609b0f82bea3328998fde57ac4 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Mon, 21 Sep 2020 20:12:38 +0100 Subject: [PATCH] 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 Fixes: #65 Signed-off-by: Daniel Thompson --- wasp/drivers/cst816s.py | 1 + 1 file changed, 1 insertion(+) 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.