MAVSDK test: Fix fly_forward_in_altctl() timing

This commit is contained in:
Matthias Grob 2024-02-22 14:45:42 +01:00
parent f602228048
commit 0cc4b41a51
2 changed files with 3 additions and 3 deletions

View File

@ -476,6 +476,9 @@ void AutopilotTester::fly_forward_in_altctl()
} }
CHECK(_manual_control->start_altitude_control() == ManualControl::Result::Success); CHECK(_manual_control->start_altitude_control() == ManualControl::Result::Success);
store_home();
wait_until_ready();
arm();
// Climb up for 20 seconds // Climb up for 20 seconds
for (unsigned i = 0; i < 20 * manual_control_rate_hz; ++i) { for (unsigned i = 0; i < 20 * manual_control_rate_hz; ++i) {

View File

@ -48,9 +48,6 @@ TEST_CASE("Fly forward in altitude control", "[multicopter][vtol]")
{ {
AutopilotTester tester; AutopilotTester tester;
tester.connect(connection_url); tester.connect(connection_url);
tester.wait_until_ready();
tester.store_home();
tester.arm();
tester.fly_forward_in_altctl(); tester.fly_forward_in_altctl();
std::chrono::seconds until_disarmed_timeout = std::chrono::seconds(180); std::chrono::seconds until_disarmed_timeout = std::chrono::seconds(180);
tester.wait_until_disarmed(until_disarmed_timeout); tester.wait_until_disarmed(until_disarmed_timeout);