mavsdk_tests: update to MAVSDK 3.0.0

This commit is contained in:
Julian Oes
2025-05-19 07:37:02 -07:00
committed by Ramon Roche
parent e50d5d8567
commit 66deae172d
6 changed files with 53 additions and 39 deletions
@@ -103,7 +103,8 @@ void AutopilotTesterFigureEight::check_tracks_figure_eight(std::chrono::seconds
order_to_fly = std::vector<int32_t> {0, 3, 2, 1, 0, 6, 5, 4, 0};
}
getTelemetry()->subscribe_position_velocity_ned([&figure_eight_point_of_interest, &prom, corridor_radius_m,
Telemetry::PositionVelocityNedHandle handle = getTelemetry()->subscribe_position_velocity_ned(
[&figure_eight_point_of_interest, &prom, &handle, corridor_radius_m,
&order_to_fly, this](Telemetry::PositionVelocityNed position_velocity_ned) {
static size_t index{0};
int32_t close_index{-1};
@@ -129,14 +130,14 @@ void AutopilotTesterFigureEight::check_tracks_figure_eight(std::chrono::seconds
} else { // reached an out of order point
if (index > 0U) { // only set to false if we already hve passed the first center point
getTelemetry()->subscribe_position_velocity_ned(nullptr);
getTelemetry()->unsubscribe_position_velocity_ned(handle);
prom.set_value(false);
}
}
}
if (index + 1 == order_to_fly.size()) {
getTelemetry()->subscribe_position_velocity_ned(nullptr);
getTelemetry()->unsubscribe_position_velocity_ned(handle);
prom.set_value(true);
}
});