1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

Fixed fmod() versus fmodf() usage in flight/...

This commit is contained in:
Corvus Corax 2012-03-26 04:16:54 +02:00
parent 730defb698
commit d32dd0ccd4
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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