mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-20 20:03:54 +08:00
mavsdk_tests: try to prevent auto-disarm
We should not spend too much time sending RC init messages because if it takes too long, we might auto-disarm in the meantime.
This commit is contained in:
@@ -345,7 +345,7 @@ void AutopilotTester::fly_forward_in_posctl()
|
||||
const unsigned manual_control_rate_hz = 50;
|
||||
|
||||
// Send something to make sure RC is available.
|
||||
for (unsigned i = 0; i < 5 * manual_control_rate_hz; ++i) {
|
||||
for (unsigned i = 0; i < 1 * manual_control_rate_hz; ++i) {
|
||||
CHECK(_manual_control->set_manual_control_input(0.f, 0.f, 0.5f, 0.f) == ManualControl::Result::Success);
|
||||
std::this_thread::sleep_for(adjust_to_lockstep_speed(std::chrono::milliseconds(1000 / manual_control_rate_hz)));
|
||||
}
|
||||
@@ -380,7 +380,7 @@ void AutopilotTester::fly_forward_in_altctl()
|
||||
const unsigned manual_control_rate_hz = 50;
|
||||
|
||||
// Send something to make sure RC is available.
|
||||
for (unsigned i = 0; i < 5 * manual_control_rate_hz; ++i) {
|
||||
for (unsigned i = 0; i < 1 * manual_control_rate_hz; ++i) {
|
||||
CHECK(_manual_control->set_manual_control_input(0.f, 0.f, 0.5f, 0.f) == ManualControl::Result::Success);
|
||||
std::this_thread::sleep_for(adjust_to_lockstep_speed(std::chrono::milliseconds(1000 / manual_control_rate_hz)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user