mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 16:25:26 +03:00
Review changes
This commit is contained in:
parent
4ca1f0fdf9
commit
34bd2ea557
3 changed files with 3 additions and 3 deletions
|
@ -139,7 +139,7 @@ int32_t applyDeadband(int32_t value, int32_t deadband)
|
|||
return value;
|
||||
}
|
||||
|
||||
float fapplyDeadband(const float value, const float deadband)
|
||||
float fapplyDeadbandf(float value, float deadband)
|
||||
{
|
||||
if (fabsf(value) < deadband) {
|
||||
return 0;
|
||||
|
|
|
@ -123,7 +123,7 @@ void sensorCalibrationSolveForScale(sensorCalibrationState_t * state, float resu
|
|||
|
||||
int gcd(int num, int denom);
|
||||
int32_t applyDeadband(int32_t value, int32_t deadband);
|
||||
float fapplyDeadband(const float value, const float deadband);
|
||||
float fapplyDeadbandf(float value, float deadband);
|
||||
|
||||
int constrain(int amt, int low, int high);
|
||||
float constrainf(float amt, float low, float high);
|
||||
|
|
|
@ -581,7 +581,7 @@ static void FAST_CODE applyItermRelax(const int axis, const float gyroRate, floa
|
|||
if (itermRelaxType == ITERM_RELAX_SETPOINT) {
|
||||
*itermErrorRate *= itermRelaxFactor;
|
||||
} else if (itermRelaxType == ITERM_RELAX_GYRO ) {
|
||||
*itermErrorRate = fapplyDeadband(setpointLpf - gyroRate, setpointHpf);
|
||||
*itermErrorRate = fapplyDeadbandf(setpointLpf - gyroRate, setpointHpf);
|
||||
} else {
|
||||
*itermErrorRate = 0.0f;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue