diff --git a/src/fenrirscreenreader/core/fenrirManager.py b/src/fenrirscreenreader/core/fenrirManager.py index 16bc845a..0c0c8d5d 100644 --- a/src/fenrirscreenreader/core/fenrirManager.py +++ b/src/fenrirscreenreader/core/fenrirManager.py @@ -52,7 +52,7 @@ class fenrirManager(): self.environment['runtime']['eventManager'].startMainEventLoop() self.shutdown() def handleInput(self, event): - #startTime = time.time + #startTime = time.time() self.environment['runtime']['debug'].writeDebugOut('DEBUG INPUT fenrirMan:' + str(event),debug.debugLevel.INFO) if not event['Data']: event['Data'] = self.environment['runtime']['inputManager'].getInputEvent() diff --git a/src/fenrirscreenreader/inputDriver/evdevDriver.py b/src/fenrirscreenreader/inputDriver/evdevDriver.py index 99a972dc..d3332c9d 100644 --- a/src/fenrirscreenreader/inputDriver/evdevDriver.py +++ b/src/fenrirscreenreader/inputDriver/evdevDriver.py @@ -60,17 +60,19 @@ class driver(inputDriver): def plugInputDeviceWatchdogUdev(self,active , eventQueue): context = pyudev.Context() monitor = pyudev.Monitor.from_netlink(context) - monitor.filter_by(subsystem='input') + 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.5): - time.sleep(0.2) + while monitor.poll(0.2): + time.sleep(0.1) eventQueue.put({"Type":fenrirEventType.PlugInputDevice,"Data":None}) return time.time() def plugInputDeviceWatchdogTimer(self, active): - time.sleep(2.5) + time.sleep(10) return time.time() def inputWatchdog(self,active , eventQueue):