Skip to content

Commit 2cb2c8a

Browse files
committed
_round macro issue - already defined for esp32 - #207
1 parent d7d1ac0 commit 2cb2c8a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/common/foc_utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55

66
// sign function
77
#define _sign(a) ( ( (a) < 0 ) ? -1 : ( (a) > 0 ) )
8+
#ifndef _round
89
#define _round(x) ((x)>=0?(long)((x)+0.5f):(long)((x)-0.5f))
10+
#endif
911
#define _constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
1012
#define _sqrt(a) (_sqrtApprox(a))
1113
#define _isset(a) ( (a) != (NOT_SET) )

0 commit comments

Comments
 (0)