mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Use fabsf() instead of ABS() for floats
The ABS() macro doesn't handle -0 floats correctly. Also fabsf() is more efficient.
This commit is contained in:
parent
628fdb8adc
commit
3d671c7134
8 changed files with 23 additions and 22 deletions
|
@ -71,7 +71,7 @@ extern "C" {
|
|||
float getMotorMixRange(void) { return simulatedMotorMixRange; }
|
||||
float getSetpointRate(int axis) { return simulatedSetpointRate[axis]; }
|
||||
bool isAirmodeActivated() { return simulatedAirmodeEnabled; }
|
||||
float getRcDeflectionAbs(int axis) { return ABS(simulatedRcDeflection[axis]); }
|
||||
float getRcDeflectionAbs(int axis) { return fabsf(simulatedRcDeflection[axis]); }
|
||||
void systemBeep(bool) { }
|
||||
bool gyroOverflowDetected(void) { return false; }
|
||||
float getRcDeflection(int axis) { return simulatedRcDeflection[axis]; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue