diff --git a/invesalius/gui/task_navigator.py b/invesalius/gui/task_navigator.py index 2dd739bb3..9e8d3d7b2 100644 --- a/invesalius/gui/task_navigator.py +++ b/invesalius/gui/task_navigator.py @@ -1649,7 +1649,6 @@ def UpdateRobotButtons(self): and self.target_selected and self.target_mode and self.robot.IsConnected() - and self.robot.IsReady() ) self.EnableRobotTrackTargetButton(enabled=track_target_button_enabled) diff --git a/invesalius/navigation/robot.py b/invesalius/navigation/robot.py index 03a8ed528..2eef2b290 100644 --- a/invesalius/navigation/robot.py +++ b/invesalius/navigation/robot.py @@ -155,7 +155,7 @@ def IsConnected(self): return self.is_robot_connected def IsReady(self): # LUKATODO: use this check before enabling robot for navigation... - self.IsConnected() and (self.coil_name in self.navigation.coil_registrations) + return self.IsConnected() and (self.coil_name in self.navigation.coil_registrations) def SetRobotIP(self, data): if data is not None: @@ -186,7 +186,7 @@ def SendTargetToRobot(self): navigation = self.navigation # XXX: These are needed for computing the target in tracker coordinate system. Ensure that they are set. - if navigation.m_change is None or navigation.obj_datas is not None: + if navigation.m_change is None or navigation.obj_datas is None: return False # Compute the target in tracker coordinate system.