libdsp: Fix compile error with the standard math library
The libdsp uses M_PI_F and M_PI_2_F which are defined only in the NuttX math library. Fix an compile error when CONFIG_LIBM is disabled and the other math library is used.
This commit is contained in:
parent
b65c7c26cf
commit
917f1a64ad
@ -70,6 +70,16 @@
|
|||||||
|
|
||||||
/* Some lib constants *******************************************************/
|
/* Some lib constants *******************************************************/
|
||||||
|
|
||||||
|
/* These are defined only in the NuttX math library */
|
||||||
|
|
||||||
|
#ifndef M_PI_F
|
||||||
|
#define M_PI_F ((float)M_PI)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef M_PI_2_F
|
||||||
|
#define M_PI_2_F ((float)M_PI_2)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Motor electrical angle is in range 0.0 to 2*PI */
|
/* Motor electrical angle is in range 0.0 to 2*PI */
|
||||||
|
|
||||||
#define MOTOR_ANGLE_E_MAX (2.0f*M_PI_F)
|
#define MOTOR_ANGLE_E_MAX (2.0f*M_PI_F)
|
||||||
|
Loading…
Reference in New Issue
Block a user