Revert "improve device detection"

This reverts commit f32de79204.
This commit is contained in:
chrys
2018-04-11 02:00:26 +02:00
parent f32de79204
commit 190b3e04ab
4 changed files with 7 additions and 5 deletions

View File

@ -52,7 +52,6 @@ class driver(inputDriver):
global _evdevAvailableError
self.env['runtime']['debug'].writeDebugOut('InputDriver: ' + _evdevAvailableError,debug.debugLevel.ERROR)
return
self.updateInputDevices()
if _udevAvailable:
self.env['runtime']['processManager'].addCustomEventThread(self.plugInputDeviceWatchdogUdev)
else:
@ -62,12 +61,14 @@ class driver(inputDriver):
context = pyudev.Context()
monitor = pyudev.Monitor.from_netlink(context)
monitor.filter_by(subsystem='input')
# wait until start process finished
time.sleep(8)
monitor.start()
while active.value:
devices = monitor.poll(2)
if devices:
while monitor.poll(0.2):
time.sleep(0.2)
time.sleep(0.1)
eventQueue.put({"Type":fenrirEventType.PlugInputDevice,"Data":None})
return time.time()
def plugInputDeviceWatchdogTimer(self, active):