From 301ef6576dff4a7d3662deca4db58f7f2f1e2e13 Mon Sep 17 00:00:00 2001 From: gac-S_Changer Date: Wed, 29 Mar 2017 16:20:26 +0200 Subject: [PATCH] Closedown --- script/RobotTCP.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script/RobotTCP.py b/script/RobotTCP.py index f371749..1f387b3 100644 --- a/script/RobotTCP.py +++ b/script/RobotTCP.py @@ -390,6 +390,8 @@ class RobotTCP(TcpDevice, Stoppable): #High-level, exclusive motion task. def start_task(self, program, *args, **kwargs): tasks = [t for t in self.high_level_tasks] + if (self.current_task is not None) and (not self.current_task in tasks): + tasks.append(pro) if not program in tasks: tasks.append(pro) for task in tasks: @@ -400,9 +402,9 @@ class RobotTCP(TcpDevice, Stoppable): time.sleep(0.5) #get_task_status needs time def stop_task(self): - tasks = [] #[t for t in self.high_level_tasks] + tasks = [] # [t for t in self.high_level_tasks] if (self.current_task is not None) and (not self.current_task in tasks): - tasks.append(pro) + tasks.append(self.current_task) for task in tasks: if self.get_task_status(task)[0]>=0: time.sleep(0.2)