|
|
|
@ -686,6 +686,18 @@ MulticopterPositionControl::task_main()
@@ -686,6 +686,18 @@ MulticopterPositionControl::task_main()
|
|
|
|
|
_pos_sp(2) = _offboard_control_pos_sp.z; |
|
|
|
|
_att_sp.yaw_body = _offboard_control_pos_sp.yaw; |
|
|
|
|
|
|
|
|
|
/* Make sure position control is selected i.e. not only velocity control */ |
|
|
|
|
if (_control_mode.flag_control_position_enabled) { |
|
|
|
|
_pos_sp(0) = _offboard_control_pos_sp.x; |
|
|
|
|
_pos_sp(1) = _offboard_control_pos_sp.y; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_control_mode.flag_control_altitude_enabled) { |
|
|
|
|
_pos_sp(2) = _offboard_control_pos_sp.z; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_att_sp.yaw_body = _offboard_control_pos_sp.yaw; |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
/* AUTO */ |
|
|
|
|
bool updated; |
|
|
|
|