Fixed sunrise/set calculation

This commit is contained in:
cschwinne 2022-03-19 19:27:32 +01:00
parent d280e16723
commit 9c9854b6bf
3 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,10 @@
### Builds after release 0.13.1 ### Builds after release 0.13.1
#### Build 2203191
- Fixed sunrise/set calculation (once again)
#### Build 2203190 #### Build 2203190
- Fixed `/json/cfg` unable to set busses (#2589) - Fixed `/json/cfg` unable to set busses (#2589)

View File

@ -8,7 +8,7 @@
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2203190 #define VERSION 2203191
//uncomment this if you have a "my_config.h" file you'd like to use //uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG //#define WLED_USE_MY_CONFIG

View File

@ -18,6 +18,7 @@
float cos_t(float phi) float cos_t(float phi)
{ {
float x = modd(phi, TWO_PI); float x = modd(phi, TWO_PI);
if (x < 0) x = -1 * x;
int8_t sign = 1; int8_t sign = 1;
if (x > PI) if (x > PI)
{ {