mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-03 11:31:53 +08:00
read multiply events
This commit is contained in:
@@ -103,7 +103,9 @@ class AioPinsReader(threading.Thread):
|
||||
ev_lines = lines.event_wait(1)
|
||||
if ev_lines:
|
||||
for ev_line in ev_lines:
|
||||
event = ev_line.event_read()
|
||||
events = ev_line.event_read_multiply()
|
||||
if events:
|
||||
event = events[-1]
|
||||
if event.type == gpiod.LineEvent.RISING_EDGE:
|
||||
value = True
|
||||
elif event.type == gpiod.LineEvent.FALLING_EDGE:
|
||||
|
||||
Reference in New Issue
Block a user