Skip to content

Commit

Permalink
test_vtol_figure_eight: fix altitude check
Browse files Browse the repository at this point in the history
wait_until_altitude() checks for absolute altitude being
close so checking for 1m below the setpoint can fail
if the speedup results in no sample inside the altitude
window being checked.

Ideally the test could check if the takeoff is done directly
instead of comparing altitudes in the first place.
  • Loading branch information
MaEtUgR committed Dec 12, 2023
1 parent 91ab09e commit 75bb25a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/mavsdk_tests/test_vtol_figure_eight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ TEST_CASE("Figure eight execution clockwise", "[vtol]")
tester.arm();
tester.takeoff();
tester.wait_until_hovering();
tester.wait_until_altitude(takeoff_altitude - 1.f, std::chrono::seconds(60));
tester.wait_until_altitude(takeoff_altitude, std::chrono::seconds(30));
tester.transition_to_fixedwing();
tester.wait_until_fixedwing(std::chrono::seconds(5));
std::this_thread::sleep_for(std::chrono::seconds(1));
Expand All @@ -71,7 +71,7 @@ TEST_CASE("Figure eight execution counterclockwise", "[vtol]")
tester.arm();
tester.takeoff();
tester.wait_until_hovering();
tester.wait_until_altitude(takeoff_altitude - 1.f, std::chrono::seconds(60));
tester.wait_until_altitude(takeoff_altitude, std::chrono::seconds(30));
tester.transition_to_fixedwing();
tester.wait_until_fixedwing(std::chrono::seconds(5));
std::this_thread::sleep_for(std::chrono::seconds(1));
Expand Down

0 comments on commit 75bb25a

Please sign in to comment.