encoder.py: improve tracking of detents.

pull/16/head
Peter Hinch 2022-04-21 17:55:12 +01:00
rodzic 29ec451ad8
commit 834ec5503c
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -3,6 +3,12 @@
# Copyright (c) 2021-2022 Peter Hinch
# Released under the MIT License (MIT) - see LICENSE file
# Thanks are due to @ilium007 for identifying the issue of tracking detents,
# https://github.com/peterhinch/micropython-async/issues/82.
# Also to Mike Teachman (@miketeachman) for design discussions and testing
# against a state table design
# https://github.com/miketeachman/micropython-rotary/blob/master/rotary.py
import uasyncio as asyncio
from machine import Pin