From 7a0f0ab1be472c5cb77fa9dac1d34d293c9bd2f0 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Thu, 22 Feb 2024 14:52:12 +0100 Subject: [PATCH] MAVSDK tests: shorten Position, Altitude control flights We get more than 5 meter away much quicker. --- test/mavsdk_tests/autopilot_tester.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/mavsdk_tests/autopilot_tester.cpp b/test/mavsdk_tests/autopilot_tester.cpp index ffba005424f8..e1bbe9efde85 100644 --- a/test/mavsdk_tests/autopilot_tester.cpp +++ b/test/mavsdk_tests/autopilot_tester.cpp @@ -442,14 +442,14 @@ void AutopilotTester::fly_forward_in_posctl() wait_until_ready(); arm(); - // Climb up for 20 seconds - for (unsigned i = 0; i < 20 * manual_control_rate_hz; ++i) { + // Climb up for 5 seconds + for (unsigned i = 0; i < 5 * manual_control_rate_hz; ++i) { CHECK(_manual_control->set_manual_control_input(0.f, 0.f, 1.f, 0.f) == ManualControl::Result::Success); sleep_for(std::chrono::milliseconds(1000 / manual_control_rate_hz)); } - // Fly forward for 60 seconds - for (unsigned i = 0; i < 60 * manual_control_rate_hz; ++i) { + // Fly forward for 10 seconds + for (unsigned i = 0; i < 10 * manual_control_rate_hz; ++i) { CHECK(_manual_control->set_manual_control_input(0.5f, 0.f, 0.5f, 0.f) == ManualControl::Result::Success); sleep_for(std::chrono::milliseconds(1000 / manual_control_rate_hz)); } @@ -480,14 +480,14 @@ void AutopilotTester::fly_forward_in_altctl() wait_until_ready(); arm(); - // Climb up for 20 seconds - for (unsigned i = 0; i < 20 * manual_control_rate_hz; ++i) { + // Climb up for 5 seconds + for (unsigned i = 0; i < 5 * manual_control_rate_hz; ++i) { CHECK(_manual_control->set_manual_control_input(0.f, 0.f, 1.f, 0.f) == ManualControl::Result::Success); sleep_for(std::chrono::milliseconds(1000 / manual_control_rate_hz)); } - // Fly forward for 60 seconds - for (unsigned i = 0; i < 60 * manual_control_rate_hz; ++i) { + // Fly forward for 10 seconds + for (unsigned i = 0; i < 10 * manual_control_rate_hz; ++i) { CHECK(_manual_control->set_manual_control_input(0.5f, 0.f, 0.5f, 0.f) == ManualControl::Result::Success); sleep_for(std::chrono::milliseconds(1000 / manual_control_rate_hz)); }