mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Use std abs() instead of ABS() macro
Changes uses of ABS() macro to <stdlib.h> abs() and <math.h> fabsf()
This commit is contained in:
parent
b54174c77e
commit
61ded491cd
18 changed files with 43 additions and 30 deletions
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "platform.h"
|
||||
|
@ -117,7 +118,7 @@ int gcd(int num, int denom)
|
|||
|
||||
int32_t applyDeadband(const int32_t value, const int32_t deadband)
|
||||
{
|
||||
if (ABS(value) < deadband) {
|
||||
if (abs(value) < deadband) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue