forked from Archive/PX4-Autopilot
FW Attitdue controller: fix throttle in acro (use _rate_sp.throttle_body) (#20330)
* FW Attitdue controller: fix throttle in acro (use _rate_sp.throttle_body) Signed-off-by: Silvan Fuhrer <silvan@auterion.com> * FW Attitude controller: do manual control polling before attitude setpoint polling Signed-off-by: Silvan Fuhrer <silvan@auterion.com> Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
34b6786f79
commit
9b3cb6c758
|
@ -353,13 +353,14 @@ void FixedwingAttitudeControl::Run()
|
||||||
|
|
||||||
const matrix::Eulerf euler_angles(_R);
|
const matrix::Eulerf euler_angles(_R);
|
||||||
|
|
||||||
|
vehicle_manual_poll(euler_angles.psi());
|
||||||
|
|
||||||
vehicle_attitude_setpoint_poll();
|
vehicle_attitude_setpoint_poll();
|
||||||
|
|
||||||
// vehicle status update must be before the vehicle_control_mode_poll(), otherwise rate sp are not published during whole transition
|
// vehicle status update must be before the vehicle_control_mode_poll(), otherwise rate sp are not published during whole transition
|
||||||
_vehicle_status_sub.update(&_vehicle_status);
|
_vehicle_status_sub.update(&_vehicle_status);
|
||||||
|
|
||||||
vehicle_control_mode_poll();
|
vehicle_control_mode_poll();
|
||||||
vehicle_manual_poll(euler_angles.psi());
|
|
||||||
vehicle_land_detected_poll();
|
vehicle_land_detected_poll();
|
||||||
|
|
||||||
// the position controller will not emit attitude setpoints in some modes
|
// the position controller will not emit attitude setpoints in some modes
|
||||||
|
@ -608,7 +609,7 @@ void FixedwingAttitudeControl::Run()
|
||||||
|
|
||||||
/* throttle passed through if it is finite */
|
/* throttle passed through if it is finite */
|
||||||
_actuator_controls.control[actuator_controls_s::INDEX_THROTTLE] =
|
_actuator_controls.control[actuator_controls_s::INDEX_THROTTLE] =
|
||||||
(PX4_ISFINITE(_att_sp.thrust_body[0])) ? _att_sp.thrust_body[0] : 0.0f;
|
(PX4_ISFINITE(_rates_sp.thrust_body[0])) ? _rates_sp.thrust_body[0] : 0.0f;
|
||||||
|
|
||||||
/* scale effort by battery status */
|
/* scale effort by battery status */
|
||||||
if (_param_fw_bat_scale_en.get() &&
|
if (_param_fw_bat_scale_en.get() &&
|
||||||
|
|
Loading…
Reference in New Issue