Skip to content

Commit

Permalink
adds inporbit connection check
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell Toris committed May 28, 2024
1 parent 246138f commit 547ca7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions mir_connector/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea/
*.egg-info/
*.egg
__pycache__/
Expand Down
4 changes: 4 additions & 0 deletions mir_connector/inorbit_mir_connector/src/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ def start(self):
except Exception:
self.logger.exception("Error reporting mission")

def inorbit_connected(self):
"""Check if the InOrbit MQTT session is connected."""
return self.inorbit_sess.client.is_connected()

def stop(self):
"""Exit the Connector cleanly."""
self._should_run = False
Expand Down

0 comments on commit 547ca7c

Please sign in to comment.