mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 13:54:07 +08:00
MulticopterRateControl: use constructor to copy thrust setpoint array
This commit is contained in:
parent
4f1091792f
commit
5df266cedc
@ -202,9 +202,7 @@ MulticopterRateControl::Run()
|
||||
_rates_setpoint(0) = PX4_ISFINITE(vehicle_rates_setpoint.roll) ? vehicle_rates_setpoint.roll : rates(0);
|
||||
_rates_setpoint(1) = PX4_ISFINITE(vehicle_rates_setpoint.pitch) ? vehicle_rates_setpoint.pitch : rates(1);
|
||||
_rates_setpoint(2) = PX4_ISFINITE(vehicle_rates_setpoint.yaw) ? vehicle_rates_setpoint.yaw : rates(2);
|
||||
_thrust_setpoint(0) = vehicle_rates_setpoint.thrust_body[0];
|
||||
_thrust_setpoint(1) = vehicle_rates_setpoint.thrust_body[1];
|
||||
_thrust_setpoint(2) = vehicle_rates_setpoint.thrust_body[2];
|
||||
_thrust_setpoint = Vector3f(vehicle_rates_setpoint.thrust_body);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user