コード例 #1
0
ファイル: GUI.py プロジェクト: Allenliu0703/Capdrone-Python
 def run(self):
     print( "thread running" )
     while not self.stopped():
         if start :
             Serialport.serial_Start(listener,xList,yList)
             # print(xList)
             # print(yList)
             if (len(xList)>=1):
                 a = randint(0,10)
                 b = randint(0,10)
                 xcoordinate = xList[len(xList)-1]
                 ycoordinate = yList[len(yList)-1]
                 time = "Time Stamp " + str(len(xList))
                 if  time in date:
                     pass
                 else:
                     date.append(time)
                     if(start):
                         tabs.loadData(root, time, xcoordinate, ycoordinate, a+1,b+1, b+2, a+2)
                 if (start):
                     tabs.plotLocation(widgets.graphsize,xList,yList)
     print( "thread ending" )