Skip to content

Commit

Permalink
MAVSDK tests: shorten Position, Altitude control flights
Browse files Browse the repository at this point in the history
We get more than 5 meter away much quicker.
  • Loading branch information
MaEtUgR authored and timzarhansen committed Sep 3, 2024
1 parent 4d15fca commit 7a0f0ab
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/mavsdk_tests/autopilot_tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down Expand Up @@ -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));
}
Expand Down

0 comments on commit 7a0f0ab

Please sign in to comment.