forked from Archive/PX4-Autopilot
mc_att_control: more strict conditions for integrating
This commit is contained in:
parent
9665d38940
commit
7d80f05b4d
|
@ -86,7 +86,7 @@ extern "C" __EXPORT int mc_att_control_main(int argc, char *argv[]);
|
|||
|
||||
#define MIN_TAKEOFF_THROTTLE 0.3f
|
||||
#define YAW_DEADZONE 0.05f
|
||||
#define RATES_I_LIMIT 0.5f
|
||||
#define RATES_I_LIMIT 0.3f
|
||||
|
||||
class MulticopterAttitudeControl
|
||||
{
|
||||
|
@ -658,7 +658,7 @@ MulticopterAttitudeControl::control_attitude_rates(float dt)
|
|||
_rates_prev = rates;
|
||||
|
||||
/* update integral only if not saturated on low limit */
|
||||
if (_thrust_sp > 0.1f) {
|
||||
if (_thrust_sp > 0.2f) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (fabsf(_att_control(i)) < _thrust_sp) {
|
||||
float rate_i = _rates_int(i) + _params.rate_i(i) * rates_err(i) * dt;
|
||||
|
|
Loading…
Reference in New Issue