debug
This commit is contained in:
parent
6981145a8c
commit
d2c53e2d58
@ -167,14 +167,18 @@ class driver(inputDriver):
|
|||||||
eventType = evdev.events
|
eventType = evdev.events
|
||||||
for deviceFile in deviceFileList:
|
for deviceFile in deviceFileList:
|
||||||
try:
|
try:
|
||||||
|
self.env['runtime']['debug'].writeDebugOut('Debug: not deviceFile',debug.debugLevel.ERROR)
|
||||||
if not deviceFile:
|
if not deviceFile:
|
||||||
continue
|
continue
|
||||||
|
self.env['runtime']['debug'].writeDebugOut('Debug: deviceFile == '' ',debug.debugLevel.ERROR)
|
||||||
if deviceFile == '':
|
if deviceFile == '':
|
||||||
continue
|
continue
|
||||||
|
self.env['runtime']['debug'].writeDebugOut('Debug: deviceFile in iDevicesFiles ',debug.debugLevel.ERROR)
|
||||||
if deviceFile in iDevicesFiles:
|
if deviceFile in iDevicesFiles:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
self.env['runtime']['debug '].writeDebugOut('Debug: open(deviceFile)',debug.debugLevel.ERROR)
|
||||||
open(deviceFile)
|
open(deviceFile)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.env['runtime']['debug'].writeDebugOut("Not readable Inputdevice : " + deviceFile +' ' + str(e),debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut("Not readable Inputdevice : " + deviceFile +' ' + str(e),debug.debugLevel.ERROR)
|
||||||
@ -184,6 +188,7 @@ class driver(inputDriver):
|
|||||||
# 1 Keys
|
# 1 Keys
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
self.env['runtime']['debug '].writeDebugOut('Debug: currDevice = evdev.InputDevice(deviceFile)',debug.debugLevel.ERROR)
|
||||||
currDevice = evdev.InputDevice(deviceFile)
|
currDevice = evdev.InputDevice(deviceFile)
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
@ -194,20 +199,23 @@ class driver(inputDriver):
|
|||||||
if currDevice.phys.upper() in ['','SPEAKUP','PY-EVDEV-UINPUT']:
|
if currDevice.phys.upper() in ['','SPEAKUP','PY-EVDEV-UINPUT']:
|
||||||
continue
|
continue
|
||||||
if 'BRLTTY' in currDevice.name.upper():
|
if 'BRLTTY' in currDevice.name.upper():
|
||||||
continue
|
continue
|
||||||
|
self.env['runtime']['debug '].writeDebugOut('Debug: namecheck',debug.debugLevel.ERROR)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
cap = currDevice.capabilities()
|
cap = currDevice.capabilities()
|
||||||
|
self.env['runtime']['debug '].writeDebugOut('Debug: cap = currDevice.capabilities()',debug.debugLevel.ERROR)
|
||||||
if mode in ['ALL','NOMICE']:
|
if mode in ['ALL','NOMICE']:
|
||||||
if eventType.EV_KEY in cap:
|
if eventType.EV_KEY in cap:
|
||||||
|
self.env['runtime']['debug '].writeDebugOut('Debug: eventType.EV_KEY in cap',debug.debugLevel.ERROR)
|
||||||
if 116 in cap[eventType.EV_KEY] and len(cap[eventType.EV_KEY]) < 10:
|
if 116 in cap[eventType.EV_KEY] and len(cap[eventType.EV_KEY]) < 10:
|
||||||
self.env['runtime']['debug'].writeDebugOut('Device Skipped (has 116):' + currDevice.name,debug.debugLevel.INFO)
|
self.env['runtime']['debug'].writeDebugOut('Device Skipped (has 116):' + currDevice.name,debug.debugLevel.INFO)
|
||||||
continue
|
continue
|
||||||
if len(cap[eventType.EV_KEY]) < 60:
|
if len(cap[eventType.EV_KEY]) < 60:
|
||||||
self.env['runtime']['debug'].writeDebugOut('Device Skipped (< 60 keys):' + currDevice.name,debug.debugLevel.INFO)
|
self.env['runtime']['debug'].writeDebugOut('Device Skipped (< 60 keys):' + currDevice.name,debug.debugLevel.INFO)
|
||||||
continue
|
continue
|
||||||
if mode == 'ALL':
|
if mode == 'ALL':
|
||||||
self.addDevice(currDevice)
|
self.addDevice(currDevice)
|
||||||
self.env['runtime']['debug'].writeDebugOut('Device added (ALL):' + self.iDevices[currDevice.fd].name, debug.debugLevel.INFO)
|
self.env['runtime']['debug'].writeDebugOut('Device added (ALL):' + self.iDevices[currDevice.fd].name, debug.debugLevel.INFO)
|
||||||
elif mode == 'NOMICE':
|
elif mode == 'NOMICE':
|
||||||
|
Loading…
Reference in New Issue
Block a user