mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-04 06:31:37 +08:00
Reverse offboard changes in mc_att_control
This commit is contained in:
@@ -480,14 +480,6 @@ MulticopterAttitudeControl::task_main()
|
|||||||
float yaw_sp_move_rate = 0.0f;
|
float yaw_sp_move_rate = 0.0f;
|
||||||
bool publish_att_sp = false;
|
bool publish_att_sp = false;
|
||||||
|
|
||||||
if (_control_mode.flag_control_offboard_enabled) {
|
|
||||||
/* offboard control */
|
|
||||||
// TODO set _att_sp or _rates_sp here depending on offboard control mode
|
|
||||||
// TODO _control_mode.flag_control_XXX flags are all false, set it according to ofboard control mode
|
|
||||||
// but it's not very beautiful, need to think how to do it better
|
|
||||||
|
|
||||||
} else {
|
|
||||||
/* onboard control */
|
|
||||||
/* define which input is the dominating control input */
|
/* define which input is the dominating control input */
|
||||||
if (_control_mode.flag_control_manual_enabled) {
|
if (_control_mode.flag_control_manual_enabled) {
|
||||||
/* manual input */
|
/* manual input */
|
||||||
@@ -547,7 +539,6 @@ MulticopterAttitudeControl::task_main()
|
|||||||
/* reset yaw setpoint after non-manual control */
|
/* reset yaw setpoint after non-manual control */
|
||||||
reset_yaw_sp = true;
|
reset_yaw_sp = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (_att_sp.R_valid) {
|
if (_att_sp.R_valid) {
|
||||||
/* rotation matrix in _att_sp is valid, use it */
|
/* rotation matrix in _att_sp is valid, use it */
|
||||||
|
|||||||
Reference in New Issue
Block a user