From ef7325d6ac751499265f4bd395b76d7ddbcaf386 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 1 Jun 2022 12:55:51 +1200 Subject: [PATCH] telemetry: workaround for PX4 For some reason PX4 doesn't set enabled for GPS, sadly. --- src/mavsdk/plugins/telemetry/telemetry_impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mavsdk/plugins/telemetry/telemetry_impl.cpp b/src/mavsdk/plugins/telemetry/telemetry_impl.cpp index 2d3f07fb62..a6c192392f 100644 --- a/src/mavsdk/plugins/telemetry/telemetry_impl.cpp +++ b/src/mavsdk/plugins/telemetry/telemetry_impl.cpp @@ -1177,8 +1177,9 @@ void TelemetryImpl::process_sys_status(const mavlink_message_t& message) bool TelemetryImpl::sys_status_present_enabled_health( const mavlink_sys_status_t& sys_status, MAV_SYS_STATUS_SENSOR flag) { + // FIXME: it doesn't look like PX4 sets enabled for GPS return (sys_status.onboard_control_sensors_present & flag) != 0 && - (sys_status.onboard_control_sensors_enabled & flag) != 0 && + // (sys_status.onboard_control_sensors_enabled & flag) != 0 && (sys_status.onboard_control_sensors_health & flag) != 0; }