forked from Archive/PX4-Autopilot
FW Attitude Controller: fix polling of rate setpoint for tailsitter
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
ed16354413
commit
300288b57e
|
@ -199,18 +199,6 @@ FixedwingAttitudeControl::vehicle_attitude_setpoint_poll()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
FixedwingAttitudeControl::vehicle_rates_setpoint_poll()
|
||||
{
|
||||
if (_rates_sp_sub.update(&_rates_sp)) {
|
||||
if (_vehicle_status.is_vtol_tailsitter) {
|
||||
float tmp = _rates_sp.roll;
|
||||
_rates_sp.roll = -_rates_sp.yaw;
|
||||
_rates_sp.yaw = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
FixedwingAttitudeControl::vehicle_land_detected_poll()
|
||||
{
|
||||
|
@ -580,7 +568,7 @@ void FixedwingAttitudeControl::Run()
|
|||
}
|
||||
|
||||
if (_vcontrol_mode.flag_control_rates_enabled) {
|
||||
vehicle_rates_setpoint_poll();
|
||||
_rates_sp_sub.update(&_rates_sp);
|
||||
|
||||
const Vector3f body_rates_setpoint = Vector3f(_rates_sp.roll, _rates_sp.pitch, _rates_sp.yaw);
|
||||
|
||||
|
|
|
@ -274,7 +274,6 @@ private:
|
|||
void vehicle_control_mode_poll();
|
||||
void vehicle_manual_poll(const float yaw_body);
|
||||
void vehicle_attitude_setpoint_poll();
|
||||
void vehicle_rates_setpoint_poll();
|
||||
void vehicle_land_detected_poll();
|
||||
|
||||
float get_airspeed_and_update_scaling();
|
||||
|
|
Loading…
Reference in New Issue