From c971747dfc9c66a1abd853f4948952df2eb83774 Mon Sep 17 00:00:00 2001 From: PerFrivik Date: Mon, 19 Feb 2024 17:37:28 +0100 Subject: [PATCH] Fix fly_forward_in_posctl() timing --- test/mavsdk_tests/autopilot_tester.cpp | 3 +++ test/mavsdk_tests/test_multicopter_manual.cpp | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/mavsdk_tests/autopilot_tester.cpp b/test/mavsdk_tests/autopilot_tester.cpp index 0c8e774c41f7..d9c5fb515119 100644 --- a/test/mavsdk_tests/autopilot_tester.cpp +++ b/test/mavsdk_tests/autopilot_tester.cpp @@ -438,6 +438,9 @@ void AutopilotTester::fly_forward_in_posctl() } CHECK(_manual_control->start_position_control() == ManualControl::Result::Success); + store_home(); + wait_until_ready(); + arm(); // Climb up for 20 seconds for (unsigned i = 0; i < 20 * manual_control_rate_hz; ++i) { diff --git a/test/mavsdk_tests/test_multicopter_manual.cpp b/test/mavsdk_tests/test_multicopter_manual.cpp index 951f0f241653..b4ad122670d3 100644 --- a/test/mavsdk_tests/test_multicopter_manual.cpp +++ b/test/mavsdk_tests/test_multicopter_manual.cpp @@ -38,9 +38,6 @@ TEST_CASE("Fly forward in position control", "[multicopter][vtol]") { AutopilotTester tester; tester.connect(connection_url); - tester.wait_until_ready(); - tester.store_home(); - tester.arm(); tester.fly_forward_in_posctl(); std::chrono::seconds until_disarmed_timeout = std::chrono::seconds(180); tester.wait_until_disarmed(until_disarmed_timeout);