Temporary fix for inappropriate atan_t().

This commit is contained in:
Blaz Kristan 2021-05-23 15:51:53 +02:00
parent 2fdbc88d8c
commit 39cd83b171
2 changed files with 13 additions and 1 deletions

View File

@ -1,6 +1,17 @@
#include "src/dependencies/timezone/Timezone.h"
#include "wled.h"
#ifndef WLED_USE_REAL_MATH
#include "wled_math.h"
#else
#define sin_t sin
#define cos_t cos
#define tan_t tan
#define asin_t asin
#define acos_t acos
#define atan_t atan
#define fmod_t fmod
#define floor_t floor
#endif
/*
* Acquires time from NTP server

View File

@ -64,6 +64,7 @@ float asin_t(float x) {
#define C ((HALF_PI/2) - A - B)
float atan_t(float x) {
if (x>1) return atan(x);
float xx = x * x;
return ((A*xx + B)*xx + C)*x;
}