Update evdevDriver.py
This commit is contained in:
parent
37a7e22154
commit
528f39768c
@ -48,19 +48,19 @@ class driver(inputDriver):
|
|||||||
self.env['runtime']['inputManager'].setShortcutType('KEY')
|
self.env['runtime']['inputManager'].setShortcutType('KEY')
|
||||||
global _evdevAvailable
|
global _evdevAvailable
|
||||||
global _udevAvailable
|
global _udevAvailable
|
||||||
self._initialized = _evdevAvailable and _udevAvailable
|
global _evdevAvailableError
|
||||||
if not self._initialized:
|
global _udevAvailableError
|
||||||
global _evdevAvailableError
|
if not _udevAvailable:
|
||||||
global _udevAvailableError
|
self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _udevAvailableError, debug.debugLevel.ERROR)
|
||||||
if not _udevAvailable:
|
if not _evdevAvailable:
|
||||||
self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _udevAvailableError, debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _evdevAvailableError, debug.debugLevel.ERROR)
|
||||||
if not _evdevAvailable:
|
return
|
||||||
self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _evdevAvailableError, debug.debugLevel.ERROR)
|
|
||||||
return
|
|
||||||
|
|
||||||
if _udevAvailable:
|
if _udevAvailable:
|
||||||
self.env['runtime']['processManager'].addCustomEventThread(self.plugInputDeviceWatchdogUdev)
|
self.env['runtime']['processManager'].addCustomEventThread(self.plugInputDeviceWatchdogUdev)
|
||||||
self.env['runtime']['processManager'].addCustomEventThread(self.inputWatchdog)
|
self.env['runtime']['processManager'].addCustomEventThread(self.inputWatchdog)
|
||||||
|
self._initialized = True
|
||||||
|
|
||||||
def plugInputDeviceWatchdogUdev(self,active , eventQueue):
|
def plugInputDeviceWatchdogUdev(self,active , eventQueue):
|
||||||
context = pyudev.Context()
|
context = pyudev.Context()
|
||||||
monitor = pyudev.Monitor.from_netlink(context)
|
monitor = pyudev.Monitor.from_netlink(context)
|
||||||
|
Loading…
Reference in New Issue
Block a user