mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-12 15:40:35 +08:00
Handle rc toggle mode buttons to initialize flight modes
Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
committed by
Matthias Grob
parent
c50daae4a3
commit
05d40f40d4
@@ -2428,7 +2428,7 @@ Commander::run()
|
||||
}
|
||||
}
|
||||
|
||||
if (!_armed.armed && _manual_control.isMavlink() && (_internal_state.main_state_changes == 0)) {
|
||||
if (!_armed.armed && _manual_control.isModeInitializationRequired() && (_internal_state.main_state_changes == 0)) {
|
||||
// if there's never been a mode change force position control as initial state
|
||||
_internal_state.main_state = commander_state_s::MAIN_STATE_POSCTL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user