From 7a4cd22509d08469545dde3aebef38bba16d8b58 Mon Sep 17 00:00:00 2001 From: Eddasol Date: Mon, 7 Oct 2024 16:23:28 +0200 Subject: [PATCH] Fix robot never changing to or from offline --- src/isar/state_machine/states/idle.py | 2 ++ src/isar/state_machine/states/offline.py | 1 + 2 files changed, 3 insertions(+) diff --git a/src/isar/state_machine/states/idle.py b/src/isar/state_machine/states/idle.py index b90495e5..d6b24daf 100644 --- a/src/isar/state_machine/states/idle.py +++ b/src/isar/state_machine/states/idle.py @@ -82,4 +82,6 @@ def _run(self) -> None: transition = self.state_machine.robot_turned_offline # type: ignore break + self.robot_status_thread = None + transition() diff --git a/src/isar/state_machine/states/offline.py b/src/isar/state_machine/states/offline.py index 683bc1d3..88aa39ff 100644 --- a/src/isar/state_machine/states/offline.py +++ b/src/isar/state_machine/states/offline.py @@ -57,6 +57,7 @@ def _run(self) -> None: transition = self.state_machine.robot_turned_online # type: ignore break + self.robot_status_thread = None time.sleep(settings.ROBOT_API_STATUS_POLL_INTERVAL) transition()