mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 18:13:33 +08:00
mc_att_control: keep integral enabled based on land detector
Previously the rate controller disabled updating the integral below 20% throttle. This is not ideal for several reasons: - some racers already hover with 20% throttle. - for acro it is important to always keep the integral enabled, it has a noticeable effect on flight performance.
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
#include <uORB/topics/vehicle_control_mode.h>
|
||||
#include <uORB/topics/vehicle_rates_setpoint.h>
|
||||
#include <uORB/topics/vehicle_status.h>
|
||||
#include <uORB/topics/vehicle_land_detected.h>
|
||||
|
||||
/**
|
||||
* Multicopter attitude control app start / stop handling function
|
||||
@@ -99,6 +100,7 @@ private:
|
||||
void battery_status_poll();
|
||||
void parameter_update_poll();
|
||||
void sensor_bias_poll();
|
||||
void vehicle_land_detected_poll();
|
||||
void sensor_correction_poll();
|
||||
void vehicle_attitude_poll();
|
||||
void vehicle_attitude_setpoint_poll();
|
||||
@@ -136,6 +138,7 @@ private:
|
||||
int _sensor_gyro_sub[MAX_GYRO_COUNT]; /**< gyro data subscription */
|
||||
int _sensor_correction_sub{-1}; /**< sensor thermal correction subscription */
|
||||
int _sensor_bias_sub{-1}; /**< sensor in-run bias correction subscription */
|
||||
int _vehicle_land_detected_sub{-1}; /**< vehicle land detected subscription */
|
||||
|
||||
unsigned _gyro_count{1};
|
||||
int _selected_gyro{0};
|
||||
@@ -160,6 +163,7 @@ private:
|
||||
struct sensor_gyro_s _sensor_gyro {}; /**< gyro data before thermal correctons and ekf bias estimates are applied */
|
||||
struct sensor_correction_s _sensor_correction {}; /**< sensor thermal corrections */
|
||||
struct sensor_bias_s _sensor_bias {}; /**< sensor in-run bias corrections */
|
||||
struct vehicle_land_detected_s _vehicle_land_detected {};
|
||||
|
||||
MultirotorMixer::saturation_status _saturation_status{};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user