mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
mavsdk_tests: add workaround to prevent failsafe
This workaround should fix the test failure where we disarm before taking off because we accidentally switched to failsafe mode right before taking off because we were still in Manual mode and not Hold yet.
This commit is contained in:
parent
4ad7ea6c1a
commit
5f2abb66a4
@ -112,6 +112,11 @@ void AutopilotTester::wait_until_ready()
|
||||
std::cout << "Waiting for system to be ready" << std::endl;
|
||||
CHECK(poll_condition_with_timeout(
|
||||
[this]() { return _telemetry->health_all_ok(); }, std::chrono::seconds(20)));
|
||||
|
||||
// FIXME: workaround to prevent race between PX4 switching to Hold mode
|
||||
// and us trying to arm and take off. If PX4 is not in Hold mode yet,
|
||||
// our arming presumably triggers a failsafe in manual mode.
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
|
||||
void AutopilotTester::wait_until_ready_local_position_only()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user