diff --git a/main.py b/main.py index 682b7048..b7cc7676 100644 --- a/main.py +++ b/main.py @@ -49,15 +49,16 @@ target=uploader.run, name="ISAR Uploader", daemon=True ) threads.append(uploader_thread) - + print(settings.MQTT_ENABLED) if settings.MQTT_ENABLED: + print("Entered MQTT Enabled block") mqtt_client: MqttClient = MqttClient(mqtt_queue=queues.mqtt_queue) mqtt_thread: Thread = Thread( target=mqtt_client.run, name="ISAR MQTT Client", daemon=True ) threads.append(mqtt_thread) - + print("Seeing up robot status publisher now") robot_status_publisher: RobotStatusPublisher = RobotStatusPublisher( mqtt_queue=queues.mqtt_queue, robot=robot, state_machine=state_machine ) diff --git a/src/isar/services/service_connections/mqtt/robot_status_publisher.py b/src/isar/services/service_connections/mqtt/robot_status_publisher.py index 44017cab..05a7cdce 100644 --- a/src/isar/services/service_connections/mqtt/robot_status_publisher.py +++ b/src/isar/services/service_connections/mqtt/robot_status_publisher.py @@ -37,9 +37,9 @@ def _get_combined_robot_status( return RobotStatus.Offline elif current_state == States.Idle and robot_status == RobotStatus.Available: return RobotStatus.Available - elif current_state != States.Idle or robot_status == RobotStatus.Busy: - return RobotStatus.Busy elif current_state != States.Idle or robot_status == RobotStatus.Stuck: + return RobotStatus.Stuck + elif current_state != States.Idle or robot_status == RobotStatus.Busy: return RobotStatus.Busy return None