Removed BMZ_DBG __builtin__ variable, the one set by presence of LPC_DEBUG file. Now use BEREMIZ_DEBUG file detected by launcher to get debug output window.
--- a/LPCCommand.py Mon Feb 05 14:03:30 2018 +0100
+++ b/LPCCommand.py Mon Feb 05 15:45:38 2018 +0100
@@ -89,10 +89,9 @@
func = getattr(self, function)
res = evaluator(func, *args)
- cmdlog.append((function, line, res))
- if len(cmdlog) > 100: # prevent debug log to grow too much
+ # cmdlog.append((function, line, res)) + # if len(cmdlog) > 100: # prevent debug log to grow too much if isinstance(res, (StringType, UnicodeType)):
--- a/LPCManager.py Mon Feb 05 14:03:30 2018 +0100
+++ b/LPCManager.py Mon Feb 05 15:45:38 2018 +0100
@@ -80,7 +80,7 @@
- CMDpipe = self.StdoutPseudoFile.StdoutPseudoFile(self.port)
+ CMDpipe = self.StdoutPseudoFile.StdoutPseudoFile(self.port, self.debug) if self.projectOpen is not None:
self.projectOpen = self.BeremizIDE.DecodeFileSystemPath(self.projectOpen, False)
@@ -107,10 +107,6 @@
def CreateApplication(self):
- # BEREMIZ_DEBUG file detection in beremiz isn't enough (module scope)
- # here we set BMZ_DBG interpreter-wise, so that submodules can use it.
- __builtin__.__dict__["BMZ_DBG"] = os.path.exists("LPC_DEBUG")
BeremizIDELauncher.CreateApplication(self)
@@ -1013,10 +1009,6 @@
-# Command log for debug, for viewing from wxInspector
- __builtins__.cmdlog = []
if __name__ == '__main__':
--- a/LPCconnector/LPCAppProto.py Mon Feb 05 14:03:30 2018 +0100
+++ b/LPCconnector/LPCAppProto.py Mon Feb 05 15:45:38 2018 +0100
@@ -115,7 +115,6 @@
LPCAppTransaction.__init__(self, 0x0D)
if __name__ == "__main__":
- __builtins__.BMZ_DBG = True
TestConnection = LPCAppProto(6,115200,2)
# TestConnection.HandleTransaction(GET_PLCIDTransaction())
TestConnection.HandleTransaction(STARTTransaction())
--- a/LPCconnector/LPCBootProto.py Mon Feb 05 14:03:30 2018 +0100
+++ b/LPCconnector/LPCBootProto.py Mon Feb 05 15:45:38 2018 +0100
@@ -60,7 +60,6 @@
if __name__ == "__main__":
- __builtins__.BMZ_DBG = True
TestConnection = LPCBootProto(2,115200,1200)
mystr=file("fw.bin").read()
--- a/LPCconnector/LPCProto.py Mon Feb 05 14:03:30 2018 +0100
+++ b/LPCconnector/LPCProto.py Mon Feb 05 15:45:38 2018 +0100
@@ -14,7 +14,7 @@
def __init__(self, port, rate, timeout):
self._serialPort = serial.Serial( port, rate, timeout = timeout, writeTimeout = timeout )
--- a/StdoutPseudoFile.py Mon Feb 05 14:03:30 2018 +0100
+++ b/StdoutPseudoFile.py Mon Feb 05 15:45:38 2018 +0100
@@ -3,10 +3,11 @@
- def __init__(self, port):
+ def __init__(self, port, debug): self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.socket.connect(('localhost', port))
@@ -22,7 +23,7 @@
line = self.Buffer[:idx + 1]
self.Buffer = self.Buffer[idx + 1:]