Update evdevDriver.py
This commit is contained in:
parent
637a9c3c51
commit
e30a703491
@ -66,15 +66,13 @@ class driver(inputDriver):
|
||||
monitor.start()
|
||||
while active.value:
|
||||
validDevices = []
|
||||
action, device = monitor.poll(1)
|
||||
device = monitor.poll(1)
|
||||
while device:
|
||||
try:
|
||||
if not '/sys/devices/virtual/input/' in device.sys_path:
|
||||
if device.device_node:
|
||||
if device.sys_name.startswith('event'):
|
||||
if action == 'add':
|
||||
validDevices.append(str(device.device_node))
|
||||
action, device = monitor.poll(0.1)
|
||||
device = monitor.poll(0.1)
|
||||
except:
|
||||
pass
|
||||
if validDevices:
|
||||
|
Loading…
Reference in New Issue
Block a user