Skip to content

Commit

Permalink
telemetry: workaround for PX4
Browse files Browse the repository at this point in the history
For some reason PX4 doesn't set enabled for GPS, sadly.
  • Loading branch information
julianoes authored and JonasVautherin committed Sep 8, 2023
1 parent 135b122 commit ef7325d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mavsdk/plugins/telemetry/telemetry_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ef7325d

Please sign in to comment.