fix device detection
This commit is contained in:
parent
5b5536444d
commit
fd63321554
@ -71,18 +71,21 @@ class driver(inputDriver):
|
|||||||
while device:
|
while device:
|
||||||
self.env['runtime']['debug'].writeDebugOut('plugInputDeviceWatchdogUdev:' + str(device), debug.debugLevel.INFO)
|
self.env['runtime']['debug'].writeDebugOut('plugInputDeviceWatchdogUdev:' + str(device), debug.debugLevel.INFO)
|
||||||
try:
|
try:
|
||||||
if currDevice.name.upper() in ['','SPEAKUP','FENRIR-UINPUT']:
|
try:
|
||||||
|
if device.name.upper() in ['','SPEAKUP','FENRIR-UINPUT']:
|
||||||
ignorePlug = True
|
ignorePlug = True
|
||||||
if currDevice.phys.upper() in ['','SPEAKUP','FENRIR-UINPUT']:
|
if device.phys.upper() in ['','SPEAKUP','FENRIR-UINPUT']:
|
||||||
ignorePlug = True
|
ignorePlug = True
|
||||||
if 'BRLTTY' in currDevice.name.upper():
|
if 'BRLTTY' in device.name.upper():
|
||||||
ignorePlug = True
|
ignorePlug = True
|
||||||
|
except Exception as e:
|
||||||
|
self.env['runtime']['debug'].writeDebugOut("plugInputDeviceWatchdogUdev CHECK NAME CRASH: " + str(e),debug.debugLevel.ERROR)
|
||||||
if not ignorePlug:
|
if not ignorePlug:
|
||||||
virtual = '/sys/devices/virtual/input/' in device.sys_path
|
virtual = '/sys/devices/virtual/input/' in device.sys_path
|
||||||
if device.device_node:
|
if device.device_node:
|
||||||
validDevices.append({'device': device.device_node, 'virtual': virtual})
|
validDevices.append({'device': device.device_node, 'virtual': virtual})
|
||||||
except:
|
except Exception as e:
|
||||||
pass
|
self.env['runtime']['debug'].writeDebugOut("plugInputDeviceWatchdogUdev APPEND CRASH: " + str(e),debug.debugLevel.ERROR)
|
||||||
try:
|
try:
|
||||||
pollTimeout = 1
|
pollTimeout = 1
|
||||||
device = monitor.poll(pollTimeout)
|
device = monitor.poll(pollTimeout)
|
||||||
|
Loading…
Reference in New Issue
Block a user