From 9c9854b6bfa41b47ded553662e785c3b4daf6ded Mon Sep 17 00:00:00 2001 From: cschwinne Date: Sat, 19 Mar 2022 19:27:32 +0100 Subject: [PATCH] Fixed sunrise/set calculation --- CHANGELOG.md | 4 ++++ wled00/wled.h | 2 +- wled00/wled_math.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39983948..efbe90a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ### Builds after release 0.13.1 +#### Build 2203191 + +- Fixed sunrise/set calculation (once again) + #### Build 2203190 - Fixed `/json/cfg` unable to set busses (#2589) diff --git a/wled00/wled.h b/wled00/wled.h index db0593f9..11866f04 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // 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 //#define WLED_USE_MY_CONFIG diff --git a/wled00/wled_math.h b/wled00/wled_math.h index bfaff06a..acdf3caa 100644 --- a/wled00/wled_math.h +++ b/wled00/wled_math.h @@ -18,6 +18,7 @@ float cos_t(float phi) { float x = modd(phi, TWO_PI); + if (x < 0) x = -1 * x; int8_t sign = 1; if (x > PI) {