forked from Archive/PX4-Autopilot
test_vtol_figure_eight: fix altitude check
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.
This commit is contained in:
parent
91ab09ebd5
commit
75bb25a44c
|
@ -48,7 +48,7 @@ TEST_CASE("Figure eight execution clockwise", "[vtol]")
|
||||||
tester.arm();
|
tester.arm();
|
||||||
tester.takeoff();
|
tester.takeoff();
|
||||||
tester.wait_until_hovering();
|
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.transition_to_fixedwing();
|
||||||
tester.wait_until_fixedwing(std::chrono::seconds(5));
|
tester.wait_until_fixedwing(std::chrono::seconds(5));
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||||
|
@ -71,7 +71,7 @@ TEST_CASE("Figure eight execution counterclockwise", "[vtol]")
|
||||||
tester.arm();
|
tester.arm();
|
||||||
tester.takeoff();
|
tester.takeoff();
|
||||||
tester.wait_until_hovering();
|
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.transition_to_fixedwing();
|
||||||
tester.wait_until_fixedwing(std::chrono::seconds(5));
|
tester.wait_until_fixedwing(std::chrono::seconds(5));
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||||
|
|
Loading…
Reference in New Issue