fix problem on startup
This commit is contained in:
parent
a636d8020e
commit
88a10882f2
@ -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()
|
||||
|
@ -61,16 +61,18 @@ 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.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):
|
||||
|
Loading…
Reference in New Issue
Block a user