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:
parent
730defb698
commit
d32dd0ccd4
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user