Skip to content

Commit

Permalink
Remove incomplete robot check that causes bug with single robot
Browse files Browse the repository at this point in the history
  • Loading branch information
Tolonen Luka committed Sep 26, 2024
1 parent 8fe04de commit 7524ff2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion invesalius/gui/task_navigator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions invesalius/navigation/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 7524ff2

Please sign in to comment.