remove debug messages

This commit is contained in:
chrys 2018-03-07 00:09:48 +01:00
parent 54e88b0c93
commit a60374923e
3 changed files with 5 additions and 16 deletions

View File

@ -63,7 +63,7 @@ class fenrirManager():
else:
if self.environment['runtime']['helpManager'].isTutorialMode():
self.environment['runtime']['inputManager'].clearEventBuffer()
print('detect')
self.detectCommand()
if self.modifierInput:
@ -85,7 +85,7 @@ class fenrirManager():
if event['Data'] == '':
return
command = event['Data']
print('fire',command)
if self.environment['runtime']['helpManager'].isTutorialMode():
if self.environment['runtime']['commandManager'].commandExists( command, 'help'):
self.environment['runtime']['commandManager'].executeCommand( command, 'help')
@ -147,10 +147,10 @@ class fenrirManager():
if self.environment['runtime']['inputManager'].isKeyPress():
if self.command != '':
self.singleKeyCommand = True
print(self.singleKeyCommand,self.modifierInput)
if not (self.singleKeyCommand or self.modifierInput):
return
print(self.command,1)
# fire event
if self.command != '':
if self.modifierInput:
@ -161,7 +161,7 @@ class fenrirManager():
if self.environment['runtime']['inputManager'].noKeyPressed():
self.environment['runtime']['eventManager'].putToEventQueue(fenrirEventType.ExecuteCommand, self.command)
self.command = ''
print(self.command,2)
def shutdownRequest(self):
try:
self.environment['runtime']['eventManager'].stopMainEventLoop()

View File

@ -32,8 +32,6 @@ class inputManager():
def handleInputEvent(self, eventData):
if not eventData:
return
print(self.env['input']['currInput'])
print(eventData['EventState'])
self.env['input']['prevInput'] = self.env['input']['currInput'].copy()
if eventData['EventState'] == 0:
if eventData['EventName'] in self.env['input']['currInput']:

View File

@ -86,32 +86,23 @@ class driver(inputDriver):
self.env['input']['eventBuffer'].append( [self.iDevices[fd], self.uDevices[fd], event])
if event.type == evdev.events.EV_KEY:
if event.code != 0:
print(1)
currMapEvent = self.mapEvent(event)
if not currMapEvent:
print(2)
foreward = True
event = self.iDevices[fd].read_one()
continue
if not isinstance(currMapEvent['EventName'], str):
print(3)
foreward = True
event = self.iDevices[fd].read_one()
continue
if not foreward:
print(4)
if currMapEvent['EventState'] in [0,1,2]:
print(5)
eventQueue.put({"Type":fenrirEventType.KeyboardInput,"Data":currMapEvent})
print(currMapEvent)
print(6)
else:
print(7)
if not event.type in [0,1,4]:
foreward = True
event = self.iDevices[fd].read_one()
if foreward:
print('hmmm')
self.writeEventBuffer()
self.clearEventBuffer()
def handleInputEvent(self, event):