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