forked from Archive/PX4-Autopilot
MAVSDK tests: shorten Position, Altitude control flights
We get more than 5 meter away much quicker.
This commit is contained in:
parent
0cc4b41a51
commit
4e3bd4f196
|
@ -442,14 +442,14 @@ void AutopilotTester::fly_forward_in_posctl()
|
||||||
wait_until_ready();
|
wait_until_ready();
|
||||||
arm();
|
arm();
|
||||||
|
|
||||||
// Climb up for 20 seconds
|
// Climb up for 5 seconds
|
||||||
for (unsigned i = 0; i < 20 * manual_control_rate_hz; ++i) {
|
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);
|
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));
|
sleep_for(std::chrono::milliseconds(1000 / manual_control_rate_hz));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fly forward for 60 seconds
|
// Fly forward for 10 seconds
|
||||||
for (unsigned i = 0; i < 60 * manual_control_rate_hz; ++i) {
|
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);
|
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));
|
sleep_for(std::chrono::milliseconds(1000 / manual_control_rate_hz));
|
||||||
}
|
}
|
||||||
|
@ -480,14 +480,14 @@ void AutopilotTester::fly_forward_in_altctl()
|
||||||
wait_until_ready();
|
wait_until_ready();
|
||||||
arm();
|
arm();
|
||||||
|
|
||||||
// Climb up for 20 seconds
|
// Climb up for 5 seconds
|
||||||
for (unsigned i = 0; i < 20 * manual_control_rate_hz; ++i) {
|
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);
|
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));
|
sleep_for(std::chrono::milliseconds(1000 / manual_control_rate_hz));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fly forward for 60 seconds
|
// Fly forward for 10 seconds
|
||||||
for (unsigned i = 0; i < 60 * manual_control_rate_hz; ++i) {
|
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);
|
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));
|
sleep_for(std::chrono::milliseconds(1000 / manual_control_rate_hz));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue