Closedown

This commit is contained in:
gac-S_Changer
2017-03-29 16:56:37 +02:00
parent d7732a8d5e
commit 4662ee7db9

View File

@@ -400,7 +400,11 @@ class RobotTCP(TcpDevice, Stoppable):
if self.get_task_status(task)[0]>=0:
raise Exception("Ongoing high-level task: " + task)
self.task_create(program, *args, **kwargs)
time.sleep(0.5) #get_task_status needs time
start = time.time()
while self.get_task_status(program)[0] < 0:
if time.time() - start > 3000:
raise Exception("Cannot start task " + task)
time.sleep(0.1)
self.current_task = program
def stop_task(self):