add more debug

This commit is contained in:
chrys 2016-10-01 17:55:09 +02:00
parent 182309c531
commit fa33b21758
4 changed files with 12 additions and 5 deletions

View File

@ -95,7 +95,7 @@ interruptOnKeyPress=False
doubleTapDelay=0.2
[general]
debugLevel=0
debugLevel=2
punctuationLevel=Some
numberOfClipboards=10
# define the current fenrir key

View File

@ -68,6 +68,7 @@ class commandManager():
if self.commandExists(oldScript, trigger):
try:
self.env['commands'][trigger][oldScript].unload()
self.env['runtime']['debug'].writeDebugOut("Executing switchtrigger.unload:" + trigger + "." + oldScript ,debug.debugLevel.INFO)
except Exception as e:
print(e)
self.env['runtime']['debug'].writeDebugOut("Executing trigger:" + trigger + "." + oldScript ,debug.debugLevel.ERROR)
@ -76,7 +77,8 @@ class commandManager():
newScript = loadScript
if self.commandExists(newScript, trigger):
try:
self.env['commands'][trigger][newScript].load()
self.env['commands'][trigger][newScript].load()
self.env['runtime']['debug'].writeDebugOut("Executing switchtrigger.load:" + trigger + "." + newScript ,debug.debugLevel.INFO)
except Exception as e:
print(e)
self.env['runtime']['debug'].writeDebugOut("Executing trigger:" + trigger + "." + newScript ,debug.debugLevel.ERROR)
@ -89,6 +91,7 @@ class commandManager():
if self.commandExists(command, trigger):
try:
self.env['commands'][trigger][command].run()
self.env['runtime']['debug'].writeDebugOut("Executing trigger.command:" + trigger + "." + command ,debug.debugLevel.INFO)
except Exception as e:
print(e)
self.env['runtime']['debug'].writeDebugOut("Executing trigger:" + trigger + "." + command ,debug.debugLevel.ERROR)
@ -101,9 +104,11 @@ class commandManager():
try:
if self.env['generalInformation']['tutorialMode']:
description = self.env['commands'][section][command].getDescription()
self.env['runtime']['outputManager'].presentText(description, interrupt=True)
self.env['runtime']['outputManager'].presentText(description, interrupt=True)
self.env['runtime']['debug'].writeDebugOut("Tutorial for command:" + section + "." + command ,debug.debugLevel.INFO)
else:
self.env['commands'][section][command].run()
self.env['runtime']['debug'].writeDebugOut("Executing command:" + section + "." + command ,debug.debugLevel.INFO)
except Exception as e:
print(e)

View File

@ -84,8 +84,8 @@ class outputManager():
try:
text = self.env['runtime']['punctuationManager'].proceedPunctuation(text,ignorePunctuation)
self.env['runtime']['speechDriver'].speak(text)
self.env['runtime']['debug'].writeDebugOut("Speak: "+ text,debug.debugLevel.INFO)
except Exception as e:
print(e)
self.env['runtime']['debug'].writeDebugOut("\"speak\" in outputManager.speakText ",debug.debugLevel.ERROR)
@ -100,6 +100,8 @@ class outputManager():
def interruptOutput(self):
self.env['runtime']['speechDriver'].cancel()
self.env['runtime']['debug'].writeDebugOut("Interrupt speech",debug.debugLevel.INFO)
def playSoundIcon(self, soundIcon = '', interrupt=True):
if soundIcon == '':

View File

@ -52,7 +52,7 @@ class settingsManager():
shortcutKeys.append(key.upper())
shortcut.append(shortcutRepeat)
shortcut.append(sorted(shortcutKeys))
print(str(shortcut), commandName)
self.env['runtime']['debug'].writeDebugOut("Shortcut: "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.INFO)
self.env['bindings'][str(shortcut)] = commandName
kbConfig.close()