Skip to content

Commit

Permalink
[MIR] Connection check for InOrbit MQTT (#22)
Browse files Browse the repository at this point in the history
Co-authored-by: Russell Toris <[email protected]>
  • Loading branch information
russell-inorbit and Russell Toris authored Jun 2, 2024
1 parent e1f1e1c commit 4e794d8
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 4e794d8

Please sign in to comment.