mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 07:40:36 +08:00
mavsdk_tests: wait until mission is done
This commit is contained in:
@@ -100,6 +100,11 @@ void AutopilotTester::execute_mission()
|
||||
prom.set_value();
|
||||
});
|
||||
|
||||
// TODO: Adapt time limit based on mission size, flight speed, sim speed factor, etc.
|
||||
|
||||
REQUIRE(poll_condition_with_timeout(
|
||||
[this]() { return _mission->mission_finished(); }, std::chrono::seconds(30)));
|
||||
|
||||
REQUIRE(fut.wait_for(std::chrono::seconds(1)) == std::future_status::ready);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,5 @@ TEST_CASE("We can fly a square mission and do RTL", "[multicopter]")
|
||||
|
||||
tester.arm();
|
||||
tester.execute_mission();
|
||||
tester.wait_until_hovering();
|
||||
tester.wait_until_disarmed();
|
||||
}
|
||||
Reference in New Issue
Block a user