mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 09:13:34 +08:00
Rework flaps/spoilers logic
- remove deprecated actuator_controls[INDEX_FLAPS/SPOILERS/AIRBRAKES] - use new topic normalized_unsigned_setpoint.msg (with instances flaps_setpoint and spoilers_setpoint) to pass into control allocation - remove flaps/spoiler related fields from attitude_setpoint topic - CA: add possibility to map flaps/spoilers to any control surface - move flaps/spoiler pitch trimming to CA (previously called DTRIM_FLAPS/SPOILER) - move manual flaps/spoiler handling from rate to attitude controller FW Position controller: change how negative switch readings are intepreted for flaps/spoilers (considered negative as 0). VTOL: Rework spoiler publishing in hover - pushlish spoiler_setpoint.msg in the VTOL module if in hover - also set spoilers to land configuration if in Descend mode Allocation: add slew rate limit of 0.5 to flaps/spoilers configuration change Instead of doing the flaps/spoilers slew rate limiting in the FW Position Controller (which then only is applied in Auto flight), do it consistently over all flight modes, so also for manual modes. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -124,22 +124,6 @@ void UUVAttitudeControl::constrain_actuator_commands(float roll_u, float pitch_u
|
||||
} else {
|
||||
_actuators.control[actuator_controls_s::INDEX_THROTTLE] = 0.0f;
|
||||
}
|
||||
|
||||
if (PX4_ISFINITE(thrust_y)) {
|
||||
thrust_y = math::constrain(thrust_y, -1.0f, 1.0f);
|
||||
_actuators.control[actuator_controls_s::INDEX_FLAPS] = thrust_y;
|
||||
|
||||
} else {
|
||||
_actuators.control[actuator_controls_s::INDEX_FLAPS] = 0.0f;
|
||||
}
|
||||
|
||||
if (PX4_ISFINITE(thrust_z)) {
|
||||
thrust_z = math::constrain(thrust_z, -1.0f, 1.0f);
|
||||
_actuators.control[actuator_controls_s::INDEX_SPOILERS] = thrust_z;
|
||||
|
||||
} else {
|
||||
_actuators.control[actuator_controls_s::INDEX_SPOILERS] = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
void UUVAttitudeControl::control_attitude_geo(const vehicle_attitude_s &attitude,
|
||||
|
||||
Reference in New Issue
Block a user