mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 11:59:58 +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
|
@ -20,8 +20,8 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "platform.h"
|
||||
|
@ -410,9 +410,8 @@ void processRcStickPositions()
|
|||
#endif
|
||||
}
|
||||
|
||||
int32_t getRcStickDeflection(int32_t axis, uint16_t midrc)
|
||||
{
|
||||
return MIN(ABS(rcData[axis] - midrc), 500);
|
||||
int32_t getRcStickDeflection(int32_t axis, uint16_t midrc) {
|
||||
return MIN(abs((int32_t)rcData[axis] - midrc), 500);
|
||||
}
|
||||
|
||||
void rcControlsInit(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue