From c815a7c0cb9ddbdf6a8d12c8c56a41e8e48f6491 Mon Sep 17 00:00:00 2001 From: Olek Bojda Date: Mon, 1 Oct 2018 13:47:10 +0200 Subject: [PATCH] Small changes in displaying of master_stop indicator --- safety_user_plugin/scripts/user_plugin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/safety_user_plugin/scripts/user_plugin.py b/safety_user_plugin/scripts/user_plugin.py index f6c806b..f2ae378 100755 --- a/safety_user_plugin/scripts/user_plugin.py +++ b/safety_user_plugin/scripts/user_plugin.py @@ -212,11 +212,17 @@ class UserPlugin(Plugin): self.user_stopped() self.engage_clutch() + if self._user_info.master_stop_state == SS.RUNNING: + self.master_started() + elif self._user_info.master_stop_state == SS.STOPPED: + self.master_stopped() + def release_robot(self): self._ros_wrapper.release_robot() self.call_qt_wrapper_method('release_robot') # self._qt_wrapper.release_robot() self._user_info.release_robot() + self._user_info.master_stop_state = SS.UNKNOWN def connection_to_robot_lost(self,lost_robot_id): # pass @@ -238,7 +244,7 @@ class UserPlugin(Plugin): self.call_qt_wrapper_method('obstacle_removed') def update_selected_robot_info(self,robot_info): - if self._user_info.select_robot != None: + if self._user_info.selected_robot != None: if robot_info.obstacle_detected == True and self._user_info.selected_robot.obstacle_detected == False: self.obstacle_detected() elif robot_info.obstacle_detected == False and self._user_info.selected_robot.obstacle_detected == True: