mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 07:23:33 +08:00
@@ -1141,6 +1141,16 @@ MulticopterPositionControl::task_main()
|
|||||||
_run_pos_control = true;
|
_run_pos_control = true;
|
||||||
_run_alt_control = true;
|
_run_alt_control = true;
|
||||||
|
|
||||||
|
// reset the horizontal and vertical position hold flags for non-manual modes
|
||||||
|
// or if position is not controlled
|
||||||
|
if (!_control_mode.flag_control_position_enabled || !_control_mode.flag_control_manual_enabled) {
|
||||||
|
_pos_hold_engaged = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_control_mode.flag_control_altitude_enabled || !_control_mode.flag_control_manual_enabled) {
|
||||||
|
_alt_hold_engaged = false;
|
||||||
|
}
|
||||||
|
|
||||||
/* select control source */
|
/* select control source */
|
||||||
if (_control_mode.flag_control_manual_enabled) {
|
if (_control_mode.flag_control_manual_enabled) {
|
||||||
/* manual control */
|
/* manual control */
|
||||||
|
|||||||
Reference in New Issue
Block a user