Small changes in displaying of master_stop indicator

This commit is contained in:
Olek Bojda 2018-10-01 13:47:10 +02:00
parent 34fd379f26
commit c815a7c0cb

View File

@ -212,11 +212,17 @@ class UserPlugin(Plugin):
self.user_stopped() self.user_stopped()
self.engage_clutch() 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): def release_robot(self):
self._ros_wrapper.release_robot() self._ros_wrapper.release_robot()
self.call_qt_wrapper_method('release_robot') self.call_qt_wrapper_method('release_robot')
# self._qt_wrapper.release_robot() # self._qt_wrapper.release_robot()
self._user_info.release_robot() self._user_info.release_robot()
self._user_info.master_stop_state = SS.UNKNOWN
def connection_to_robot_lost(self,lost_robot_id): def connection_to_robot_lost(self,lost_robot_id):
# pass # pass
@ -238,7 +244,7 @@ class UserPlugin(Plugin):
self.call_qt_wrapper_method('obstacle_removed') self.call_qt_wrapper_method('obstacle_removed')
def update_selected_robot_info(self,robot_info): 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: if robot_info.obstacle_detected == True and self._user_info.selected_robot.obstacle_detected == False:
self.obstacle_detected() self.obstacle_detected()
elif robot_info.obstacle_detected == False and self._user_info.selected_robot.obstacle_detected == True: elif robot_info.obstacle_detected == False and self._user_info.selected_robot.obstacle_detected == True: