mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
FW Attitude Controller: fix polling of rate setpoint for tailsitter
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
JaeyoungLim
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
|
void
|
||||||
FixedwingAttitudeControl::vehicle_land_detected_poll()
|
FixedwingAttitudeControl::vehicle_land_detected_poll()
|
||||||
{
|
{
|
||||||
@@ -580,7 +568,7 @@ void FixedwingAttitudeControl::Run()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_vcontrol_mode.flag_control_rates_enabled) {
|
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);
|
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_control_mode_poll();
|
||||||
void vehicle_manual_poll(const float yaw_body);
|
void vehicle_manual_poll(const float yaw_body);
|
||||||
void vehicle_attitude_setpoint_poll();
|
void vehicle_attitude_setpoint_poll();
|
||||||
void vehicle_rates_setpoint_poll();
|
|
||||||
void vehicle_land_detected_poll();
|
void vehicle_land_detected_poll();
|
||||||
|
|
||||||
float get_airspeed_and_update_scaling();
|
float get_airspeed_and_update_scaling();
|
||||||
|
|||||||
Reference in New Issue
Block a user