Skip to content

Commit dd710ba

Browse files
committed
qt_vismach -fix disapearing plot after 30 mins
The comparison of old/new tool position point was broken. It add a point every 100ms and filled the plot in about a half hour. # Please enter the commit message for your changes. Lines starting
1 parent e0049bf commit dd710ba

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/python/qtvcp/lib/qt_vismach/qt_vismach.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ def drawObjects(self, *args):
329329
if len(self.plotdata) == self.plotlen:
330330
del self.plotdata[:self.plotlen // 10]
331331
point = [wx, wy, wz]
332-
if not self.plotdata or point != self.plotdata[-1]:
332+
# if tool position is different from last time, record plot position
333+
if not self.plotdata or point != self.plotdata[-1][0]:
333334
self.plotdata.append([point,self.plotColor])
334335

335336
# now lets draw something in the tool coordinate system

0 commit comments

Comments
 (0)