Skip to content

Commit

Permalink
Fix use of set_status endpoint (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
b-Tomas authored Dec 23, 2024
1 parent 112f2cc commit 05293b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mir_connector/inorbit_mir_connector/src/mir_api/mir_api_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def set_state(self, state_id):
- 4: PAUSE
- 11: MANUAL CONTROL
"""
return self.set_status(json.dumps({"state_id": state_id}))
return self.set_status({"state_id": state_id})

def set_status(self, data):
"""Set robot status
Expand All @@ -253,7 +253,7 @@ def set_status(self, data):

def clear_error(self):
"""Clears robot Error state and sets robot state to Ready"""
self.set_status(json.dumps({"clear_error": True}))
self.set_status({"clear_error": True})
# Also setting robot state to Ready because it stays
# paused after clearing the error state
self.set_state(3)
Expand Down

0 comments on commit 05293b8

Please sign in to comment.