Update evdevDriver.py
This commit is contained in:
parent
0082898119
commit
6a10d7b50c
@ -65,18 +65,18 @@ class driver(inputDriver):
|
|||||||
monitor.filter_by(subsystem='input')
|
monitor.filter_by(subsystem='input')
|
||||||
monitor.start()
|
monitor.start()
|
||||||
while active.value:
|
while active.value:
|
||||||
validDevice = False
|
validDevices = []
|
||||||
device = monitor.poll(1)
|
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:
|
||||||
validDevice = True
|
validDevices.append(str(device.device_path))
|
||||||
device = monitor.poll(0.5)
|
device = monitor.poll(0.2)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if validDevice:
|
if validDevices:
|
||||||
eventQueue.put({"Type":fenrirEventType.PlugInputDevice,"Data":None})
|
eventQueue.put({"Type":fenrirEventType.PlugInputDevice,"Data":validDevices})
|
||||||
return time.time()
|
return time.time()
|
||||||
def plugInputDeviceWatchdogTimer(self, active):
|
def plugInputDeviceWatchdogTimer(self, active):
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
return time.time()
|
return time.time()
|
||||||
|
Loading…
Reference in New Issue
Block a user