Browse Source

small edits

dev
Clemens Richter 9 years ago
parent
commit
6ac91f3265
  1. 3
      python/tmc_classes.py
  2. 7
      python/tmc_parser.py

3
python/tmc_classes.py

@ -773,6 +773,7 @@ class tmc_message:
multi="%i:%s"%(self.length,str(self.mgm_list)) multi="%i:%s"%(self.length,str(self.mgm_list))
except AttributeError: except AttributeError:
multi="[multi incomplete]" multi="[multi incomplete]"
#print("got multistring")
return str(multi) return str(multi)
def info_str(self): def info_str(self):
info="" info=""
@ -793,7 +794,7 @@ class tmc_message:
except UnicodeDecodeError as e: except UnicodeDecodeError as e:
print e print e
code.interact(local=locals()) code.interact(local=locals())
#print("got log_string")
return retstr return retstr
#2017-03-16 fix:self.psn.encode("utf-8"), utf8 decoding happens later #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) #2017-04-10 undid "fix":UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)

7
python/tmc_parser.py

@ -307,15 +307,15 @@ class tmc_parser_Widget(QtGui.QWidget):
logstr=Qt.QString.fromUtf8(tmc_msg.log_string()) logstr=Qt.QString.fromUtf8(tmc_msg.log_string())
print_dbg(".",end="") print_dbg(".",end="")
self.logOutput.append(logstr) self.logOutput.append(logstr)
QtGui.QApplication.processEvents()
print_dbg(".",end="") print_dbg(".",end="")
QtGui.QApplication.processEvents()
print_dbg("a",end="") print_dbg("a",end="")
multistr=Qt.QString.fromUtf8(tmc_msg.multi_str()) multistr=Qt.QString.fromUtf8(tmc_msg.multi_str())
print_dbg(".",end="") print_dbg(".",end="")
self.logOutput.append(multistr) self.logOutput.append(multistr)
print_dbg("a",end="")
QtGui.QApplication.processEvents()
print_dbg(".",end="") print_dbg(".",end="")
QtGui.QApplication.processEvents()
print_dbg("a",end="")
if auto_scroll: if auto_scroll:
#sb=self.logOutput.verticalScrollBar() #disabled 2017-04-28 might be cause of double free #sb=self.logOutput.verticalScrollBar() #disabled 2017-04-28 might be cause of double free
new_max=sb.maximum() new_max=sb.maximum()
@ -391,3 +391,4 @@ class tmc_parser_Widget(QtGui.QWidget):
font.setFamily("Courier") font.setFamily("Courier")
font.setPointSize(10) font.setPointSize(10)
layout.addWidget(self.logOutput) layout.addWidget(self.logOutput)
QtGui.QApplication.processEvents()

Loading…
Cancel
Save