Skip to content

Commit f172579

Browse files
committed
Switch and Pushbutton: add comment re logic.
1 parent 6f73087 commit f172579

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

v3/primitives/pushbutton.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,5 @@ async def buttoncheck(self):
104104
self._ld.stop() # Avoid interpreting a second click as a long push
105105
self._dblran = False
106106
# Ignore state changes until switch has settled
107+
# See https://github.com/peterhinch/micropython-async/issues/69
107108
await asyncio.sleep_ms(Pushbutton.debounce_ms)

v3/primitives/switch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ async def switchcheck(self):
3939
elif state == 1 and self._open_func:
4040
launch(self._open_func, self._open_args)
4141
# Ignore further state changes until switch has settled
42+
# See https://github.com/peterhinch/micropython-async/issues/69
4243
await asyncio.sleep_ms(Switch.debounce_ms)

0 commit comments

Comments
 (0)