remove debug messages
This commit is contained in:
parent
54e88b0c93
commit
a60374923e
@ -63,7 +63,7 @@ class fenrirManager():
|
|||||||
else:
|
else:
|
||||||
if self.environment['runtime']['helpManager'].isTutorialMode():
|
if self.environment['runtime']['helpManager'].isTutorialMode():
|
||||||
self.environment['runtime']['inputManager'].clearEventBuffer()
|
self.environment['runtime']['inputManager'].clearEventBuffer()
|
||||||
print('detect')
|
|
||||||
self.detectCommand()
|
self.detectCommand()
|
||||||
|
|
||||||
if self.modifierInput:
|
if self.modifierInput:
|
||||||
@ -85,7 +85,7 @@ class fenrirManager():
|
|||||||
if event['Data'] == '':
|
if event['Data'] == '':
|
||||||
return
|
return
|
||||||
command = event['Data']
|
command = event['Data']
|
||||||
print('fire',command)
|
|
||||||
if self.environment['runtime']['helpManager'].isTutorialMode():
|
if self.environment['runtime']['helpManager'].isTutorialMode():
|
||||||
if self.environment['runtime']['commandManager'].commandExists( command, 'help'):
|
if self.environment['runtime']['commandManager'].commandExists( command, 'help'):
|
||||||
self.environment['runtime']['commandManager'].executeCommand( command, 'help')
|
self.environment['runtime']['commandManager'].executeCommand( command, 'help')
|
||||||
@ -147,10 +147,10 @@ class fenrirManager():
|
|||||||
if self.environment['runtime']['inputManager'].isKeyPress():
|
if self.environment['runtime']['inputManager'].isKeyPress():
|
||||||
if self.command != '':
|
if self.command != '':
|
||||||
self.singleKeyCommand = True
|
self.singleKeyCommand = True
|
||||||
print(self.singleKeyCommand,self.modifierInput)
|
|
||||||
if not (self.singleKeyCommand or self.modifierInput):
|
if not (self.singleKeyCommand or self.modifierInput):
|
||||||
return
|
return
|
||||||
print(self.command,1)
|
|
||||||
# fire event
|
# fire event
|
||||||
if self.command != '':
|
if self.command != '':
|
||||||
if self.modifierInput:
|
if self.modifierInput:
|
||||||
@ -161,7 +161,7 @@ class fenrirManager():
|
|||||||
if self.environment['runtime']['inputManager'].noKeyPressed():
|
if self.environment['runtime']['inputManager'].noKeyPressed():
|
||||||
self.environment['runtime']['eventManager'].putToEventQueue(fenrirEventType.ExecuteCommand, self.command)
|
self.environment['runtime']['eventManager'].putToEventQueue(fenrirEventType.ExecuteCommand, self.command)
|
||||||
self.command = ''
|
self.command = ''
|
||||||
print(self.command,2)
|
|
||||||
def shutdownRequest(self):
|
def shutdownRequest(self):
|
||||||
try:
|
try:
|
||||||
self.environment['runtime']['eventManager'].stopMainEventLoop()
|
self.environment['runtime']['eventManager'].stopMainEventLoop()
|
||||||
|
@ -32,8 +32,6 @@ class inputManager():
|
|||||||
def handleInputEvent(self, eventData):
|
def handleInputEvent(self, eventData):
|
||||||
if not eventData:
|
if not eventData:
|
||||||
return
|
return
|
||||||
print(self.env['input']['currInput'])
|
|
||||||
print(eventData['EventState'])
|
|
||||||
self.env['input']['prevInput'] = self.env['input']['currInput'].copy()
|
self.env['input']['prevInput'] = self.env['input']['currInput'].copy()
|
||||||
if eventData['EventState'] == 0:
|
if eventData['EventState'] == 0:
|
||||||
if eventData['EventName'] in self.env['input']['currInput']:
|
if eventData['EventName'] in self.env['input']['currInput']:
|
||||||
|
@ -86,32 +86,23 @@ class driver(inputDriver):
|
|||||||
self.env['input']['eventBuffer'].append( [self.iDevices[fd], self.uDevices[fd], event])
|
self.env['input']['eventBuffer'].append( [self.iDevices[fd], self.uDevices[fd], event])
|
||||||
if event.type == evdev.events.EV_KEY:
|
if event.type == evdev.events.EV_KEY:
|
||||||
if event.code != 0:
|
if event.code != 0:
|
||||||
print(1)
|
|
||||||
currMapEvent = self.mapEvent(event)
|
currMapEvent = self.mapEvent(event)
|
||||||
if not currMapEvent:
|
if not currMapEvent:
|
||||||
print(2)
|
|
||||||
foreward = True
|
foreward = True
|
||||||
event = self.iDevices[fd].read_one()
|
event = self.iDevices[fd].read_one()
|
||||||
continue
|
continue
|
||||||
if not isinstance(currMapEvent['EventName'], str):
|
if not isinstance(currMapEvent['EventName'], str):
|
||||||
print(3)
|
|
||||||
foreward = True
|
foreward = True
|
||||||
event = self.iDevices[fd].read_one()
|
event = self.iDevices[fd].read_one()
|
||||||
continue
|
continue
|
||||||
if not foreward:
|
if not foreward:
|
||||||
print(4)
|
|
||||||
if currMapEvent['EventState'] in [0,1,2]:
|
if currMapEvent['EventState'] in [0,1,2]:
|
||||||
print(5)
|
|
||||||
eventQueue.put({"Type":fenrirEventType.KeyboardInput,"Data":currMapEvent})
|
eventQueue.put({"Type":fenrirEventType.KeyboardInput,"Data":currMapEvent})
|
||||||
print(currMapEvent)
|
|
||||||
print(6)
|
|
||||||
else:
|
else:
|
||||||
print(7)
|
|
||||||
if not event.type in [0,1,4]:
|
if not event.type in [0,1,4]:
|
||||||
foreward = True
|
foreward = True
|
||||||
event = self.iDevices[fd].read_one()
|
event = self.iDevices[fd].read_one()
|
||||||
if foreward:
|
if foreward:
|
||||||
print('hmmm')
|
|
||||||
self.writeEventBuffer()
|
self.writeEventBuffer()
|
||||||
self.clearEventBuffer()
|
self.clearEventBuffer()
|
||||||
def handleInputEvent(self, event):
|
def handleInputEvent(self, event):
|
||||||
|
Loading…
Reference in New Issue
Block a user