mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
commander: HITL skip auto disarm if lockdown
- auto disarm when locked down was added in #14766 to prevent user confusion in regular usage, but also breaks HITL where lockdown is enabled for safety - fixes #15686
This commit is contained in:
parent
33cabba185
commit
2bc4a5a44b
@ -1667,7 +1667,15 @@ Commander::run()
|
||||
}
|
||||
|
||||
// Auto disarm after 5 seconds if kill switch is engaged
|
||||
_auto_disarm_killed.set_state_and_update(armed.manual_lockdown || armed.lockdown, hrt_absolute_time());
|
||||
bool auto_disarm = armed.manual_lockdown;
|
||||
|
||||
// auto disarm if locked down to avoid user confusion
|
||||
// skipped in HITL where lockdown is enabled for safety
|
||||
if (status.hil_state != vehicle_status_s::HIL_STATE_ON) {
|
||||
auto_disarm |= armed.lockdown;
|
||||
}
|
||||
|
||||
_auto_disarm_killed.set_state_and_update(auto_disarm, hrt_absolute_time());
|
||||
|
||||
if (_auto_disarm_killed.get_state()) {
|
||||
if (armed.manual_lockdown) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user