Better debug thingies and updated loadMM
This commit is contained in:
parent
8a518ad83e
commit
0b33933162
20
bindings.py
20
bindings.py
|
|
@ -23,12 +23,11 @@ _MSG_ENDING=b"\r\n"
|
||||||
################################
|
################################
|
||||||
# BIG DEFINES
|
# BIG DEFINES
|
||||||
|
|
||||||
_NO_FUNCT=lambda x:None
|
_NO_FUNCT=lambda *x:None
|
||||||
def _SYS_EXIT(system,*args):
|
def _SYS_EXIT(system,*args):
|
||||||
system.fatal=True
|
system.fatal=True
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
_VERBOSE=3
|
_VERBOSE=3
|
||||||
|
|
||||||
nopeF=lambda *x:None
|
nopeF=lambda *x:None
|
||||||
|
|
@ -38,10 +37,8 @@ def printl(label=""):
|
||||||
return _pl
|
return _pl
|
||||||
|
|
||||||
eprint=printl("[pAW:ERROR]")
|
eprint=printl("[pAW:ERROR]")
|
||||||
dprint=nopeF
|
dprint,ddprint,iprint,wprint=nopeF,nopeF,nopeF,nopeF
|
||||||
ddprint=nopeF
|
|
||||||
iprint=nopeF
|
|
||||||
wprint=nopeF
|
|
||||||
if _VERBOSE>=1:
|
if _VERBOSE>=1:
|
||||||
wprint=printl("[pAW:WARNING]")
|
wprint=printl("[pAW:WARNING]")
|
||||||
if _VERBOSE>=2:
|
if _VERBOSE>=2:
|
||||||
|
|
@ -225,7 +222,9 @@ class analogController(object):
|
||||||
"FREEZELAYER":self.freezeLayer,
|
"FREEZELAYER":self.freezeLayer,
|
||||||
"FREEZEALL":self.freezeScreenAll,
|
"FREEZEALL":self.freezeScreenAll,
|
||||||
"SCRNUPD":self.updateFinishedAll,
|
"SCRNUPD":self.updateFinishedAll,
|
||||||
|
"LOADMM":self.loadMM,
|
||||||
}
|
}
|
||||||
|
self._commandlist=self._all_commands
|
||||||
try:
|
try:
|
||||||
dprint('Creating socket')
|
dprint('Creating socket')
|
||||||
self.sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
self.sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
|
@ -244,7 +243,7 @@ class analogController(object):
|
||||||
try:
|
try:
|
||||||
self._all_commands[command](*args,**kwargs)
|
self._all_commands[command](*args,**kwargs)
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
eprint("The command received {} isn't in the list of supported commands ({})".format(command,self._commandlist))
|
eprint("The command received {} isn't in the list of supported commands ({})".format(command,self._commandlist.keys()))
|
||||||
eprint(e)
|
eprint(e)
|
||||||
|
|
||||||
def addFeedbackInterface(self,feedback):
|
def addFeedbackInterface(self,feedback):
|
||||||
|
|
@ -359,6 +358,10 @@ class analogController(object):
|
||||||
def POSTMATCH_DETECTED(self,match):
|
def POSTMATCH_DETECTED(self,match):
|
||||||
"Return the status of the input"
|
"Return the status of the input"
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def POSTMATCH_LOADMM(self,match):
|
||||||
|
"Result of a load master memory"
|
||||||
|
return True
|
||||||
# def POSTMATCH_TAKEAVL(self,match):
|
# def POSTMATCH_TAKEAVL(self,match):
|
||||||
# "Take available answer 1"
|
# "Take available answer 1"
|
||||||
# if match.group("postargs")[-1]=="1":
|
# if match.group("postargs")[-1]=="1":
|
||||||
|
|
@ -375,6 +378,7 @@ class analogController(object):
|
||||||
status=self.POSTMATCHACTIONS[typ](match)
|
status=self.POSTMATCHACTIONS[typ](match)
|
||||||
if status:
|
if status:
|
||||||
self._LOCKS[typ].release()
|
self._LOCKS[typ].release()
|
||||||
|
if typ in _UPDATE_MSG:
|
||||||
return self.feedback.receiveMessage(typ,match) #Do an actual action
|
return self.feedback.receiveMessage(typ,match) #Do an actual action
|
||||||
else:
|
else:
|
||||||
if typ in _UPDATE_MSG:
|
if typ in _UPDATE_MSG:
|
||||||
|
|
@ -527,7 +531,7 @@ class analogController(object):
|
||||||
self.takeAvailableAll()
|
self.takeAvailableAll()
|
||||||
self.takeAll()
|
self.takeAll()
|
||||||
|
|
||||||
def loadMM(screenF,memory,screenT,ProgPrev,filter):
|
def loadMM(self,screenF,memory,screenT,ProgPrev,filter): # Changed it to be correct, care since no debug
|
||||||
"""Load a master memory to a screen
|
"""Load a master memory to a screen
|
||||||
<screenF>,<memory>,<screenT>,<ProgPrev>,<filter>,1 GClrq ()
|
<screenF>,<memory>,<screenT>,<ProgPrev>,<filter>,1 GClrq ()
|
||||||
Filter: This parameter allows excluding some preset elements from recalling
|
Filter: This parameter allows excluding some preset elements from recalling
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue