Inky Frame: Return latched SR state in read() regardless of debounce.

patch/inky_build
Phil Howard 2022-12-19 15:33:56 +00:00
rodzic 2ea5de97df
commit e5bfe76970
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -31,6 +31,10 @@ class Button:
self._last_value = None
def read(self):
if self.startup_state:
self.startup_state = False
return True
value = self.raw()
if value != self._last_value and time.ticks_ms() - self._changed > self._debounce_time:
self._last_value = value