forked from Archive/PX4-Autopilot
tecs: fix wrong != 0 check
This commit is contained in:
parent
324d60f927
commit
cc96edfe01
|
@ -314,7 +314,7 @@ void TECS::_update_throttle(float throttle_cruise, const math::Dcm &rotMat)
|
||||||
|
|
||||||
// Rate limit PD + FF throttle
|
// Rate limit PD + FF throttle
|
||||||
// Calculate the throttle increment from the specified slew time
|
// Calculate the throttle increment from the specified slew time
|
||||||
if (fabsf(_throttle_slewrate) < 0.01f) {
|
if (fabsf(_throttle_slewrate) > 0.01f) {
|
||||||
float thrRateIncr = _DT * (_THRmaxf - _THRminf) * _throttle_slewrate;
|
float thrRateIncr = _DT * (_THRmaxf - _THRminf) * _throttle_slewrate;
|
||||||
|
|
||||||
_throttle_dem = constrain(_throttle_dem,
|
_throttle_dem = constrain(_throttle_dem,
|
||||||
|
|
Loading…
Reference in New Issue