diff --git a/flight/Modules/Attitude/revolution/attitude.c b/flight/Modules/Attitude/revolution/attitude.c index 4d2f4649a..6b3fb6be2 100644 --- a/flight/Modules/Attitude/revolution/attitude.c +++ b/flight/Modules/Attitude/revolution/attitude.c @@ -70,7 +70,7 @@ #define FAILSAFE_TIMEOUT_MS 10 #define F_PI 3.14159265358979323846f -#define PI_MOD(x) (fmod(x + F_PI, F_PI * 2) - F_PI) +#define PI_MOD(x) (fmodf(x + F_PI, F_PI * 2) - F_PI) // Private types // Private variables diff --git a/flight/Modules/Sensors/sensors.c b/flight/Modules/Sensors/sensors.c index fc7eb8e22..6bc92969a 100644 --- a/flight/Modules/Sensors/sensors.c +++ b/flight/Modules/Sensors/sensors.c @@ -68,7 +68,7 @@ #define SENSOR_PERIOD 2 #define F_PI 3.14159265358979323846f -#define PI_MOD(x) (fmod(x + F_PI, F_PI * 2) - F_PI) +#define PI_MOD(x) (fmodf(x + F_PI, F_PI * 2) - F_PI) // Private types // Private variables diff --git a/flight/Modules/Stabilization/stabilization.c b/flight/Modules/Stabilization/stabilization.c index 2327aff8d..34a89870f 100644 --- a/flight/Modules/Stabilization/stabilization.c +++ b/flight/Modules/Stabilization/stabilization.c @@ -211,7 +211,7 @@ static void stabilizationTask(void* parameters) float local_error[3] = {stabDesired.Roll - attitudeActual.Roll, stabDesired.Pitch - attitudeActual.Pitch, stabDesired.Yaw - attitudeActual.Yaw}; - local_error[2] = fmod(local_error[2] + 180, 360) - 180; + local_error[2] = fmodf(local_error[2] + 180, 360) - 180; #endif