|
|
@ -327,9 +327,12 @@ void TECS::_update_throttle(float throttle_cruise, const math::Matrix<3,3> &rotM |
|
|
|
_throttle_dem = constrain(_throttle_dem, |
|
|
|
_throttle_dem = constrain(_throttle_dem, |
|
|
|
_last_throttle_dem - thrRateIncr, |
|
|
|
_last_throttle_dem - thrRateIncr, |
|
|
|
_last_throttle_dem + thrRateIncr); |
|
|
|
_last_throttle_dem + thrRateIncr); |
|
|
|
_last_throttle_dem = _throttle_dem; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Ensure _last_throttle_dem is always initialized properly
|
|
|
|
|
|
|
|
// Also: The throttle_slewrate limit is only applied to throttle_dem, but does not limit the integrator!!
|
|
|
|
|
|
|
|
_last_throttle_dem = _throttle_dem; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Calculate integrator state upper and lower limits
|
|
|
|
// Calculate integrator state upper and lower limits
|
|
|
|
// Set to a value thqat will allow 0.1 (10%) throttle saturation to allow for noise on the demand
|
|
|
|
// Set to a value thqat will allow 0.1 (10%) throttle saturation to allow for noise on the demand
|
|
|
|