We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44de299 commit 0270af5Copy full SHA for 0270af5
v3/primitives/pushbutton.py
@@ -1,6 +1,6 @@
1
# pushbutton.py
2
3
-# Copyright (c) 2018-2022 Peter Hinch
+# Copyright (c) 2018-2023 Peter Hinch
4
# Released under the MIT License (MIT) - see LICENSE file
5
6
import uasyncio as asyncio
@@ -48,7 +48,9 @@ def _check(self, state):
48
if state: # Button pressed: launch pressed func
49
if self._tf:
50
launch(self._tf, self._ta)
51
- if self._ld: # There's a long func: start long press delay
+ # If there's a long func: start long press delay if no double click running
52
+ # (case where a short click is rapidly followed by a long one, iss 101).
53
+ if self._ld and not (self._df and self._dd()):
54
self._ld.trigger(Pushbutton.long_press_ms)
55
if self._df:
56
if self._dd(): # Second click: timer running
0 commit comments