From 300288b57e92f325325379ff2f552569a7018a9a Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Thu, 22 Sep 2022 16:33:38 +0200 Subject: [PATCH] FW Attitude Controller: fix polling of rate setpoint for tailsitter Signed-off-by: Silvan Fuhrer --- .../fw_att_control/FixedwingAttitudeControl.cpp | 14 +------------- .../fw_att_control/FixedwingAttitudeControl.hpp | 1 - 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp index 0d81e24b7a..82fbf2f58c 100644 --- a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp +++ b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp @@ -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); diff --git a/src/modules/fw_att_control/FixedwingAttitudeControl.hpp b/src/modules/fw_att_control/FixedwingAttitudeControl.hpp index ae9d1fddb4..4e65aad515 100644 --- a/src/modules/fw_att_control/FixedwingAttitudeControl.hpp +++ b/src/modules/fw_att_control/FixedwingAttitudeControl.hpp @@ -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();