Skip to content

Commit 97d1ece

Browse files
authored
Merge pull request peterhinch#91 from sandyscott/master
ESwitch: Fix bug where switch state was inverted.
2 parents 2236d12 + e572a95 commit 97d1ece

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

v3/primitives/events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ async def _poll(self, dt): # Poll the button
7272
while True:
7373
if (s := self._pin() ^ self._lopen) != self._state: # 15μs
7474
self._state = s
75-
self._of() if s else self._cf()
75+
self._cf() if s else self._of()
7676
await asyncio.sleep_ms(dt) # Wait out bounce
7777

7878
def _of(self):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy