From 6ac91f3265023e2ee263de94236431b475910395 Mon Sep 17 00:00:00 2001 From: csrichter Date: Fri, 19 May 2017 23:12:28 +0200 Subject: [PATCH] small edits --- python/tmc_classes.py | 3 ++- python/tmc_parser.py | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/python/tmc_classes.py b/python/tmc_classes.py index fc9a8b4..c0be51e 100644 --- a/python/tmc_classes.py +++ b/python/tmc_classes.py @@ -773,6 +773,7 @@ class tmc_message: multi="%i:%s"%(self.length,str(self.mgm_list)) except AttributeError: multi="[multi incomplete]" + #print("got multistring") return str(multi) def info_str(self): info="" @@ -793,7 +794,7 @@ class tmc_message: except UnicodeDecodeError as e: print e code.interact(local=locals()) - + #print("got log_string") return retstr #2017-03-16 fix:self.psn.encode("utf-8"), utf8 decoding happens later #2017-04-10 undid "fix":UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) diff --git a/python/tmc_parser.py b/python/tmc_parser.py index 67777f3..a1199a5 100644 --- a/python/tmc_parser.py +++ b/python/tmc_parser.py @@ -307,15 +307,15 @@ class tmc_parser_Widget(QtGui.QWidget): logstr=Qt.QString.fromUtf8(tmc_msg.log_string()) print_dbg(".",end="") self.logOutput.append(logstr) - QtGui.QApplication.processEvents() print_dbg(".",end="") + QtGui.QApplication.processEvents() print_dbg("a",end="") multistr=Qt.QString.fromUtf8(tmc_msg.multi_str()) print_dbg(".",end="") self.logOutput.append(multistr) - print_dbg("a",end="") - QtGui.QApplication.processEvents() print_dbg(".",end="") + QtGui.QApplication.processEvents() + print_dbg("a",end="") if auto_scroll: #sb=self.logOutput.verticalScrollBar() #disabled 2017-04-28 might be cause of double free new_max=sb.maximum() @@ -391,3 +391,4 @@ class tmc_parser_Widget(QtGui.QWidget): font.setFamily("Courier") font.setPointSize(10) layout.addWidget(self.logOutput) + QtGui.QApplication.processEvents()