From 1f4a15ee6b5ee88331f78343daa711a89c644051 Mon Sep 17 00:00:00 2001 From: cschwinne Date: Tue, 23 Mar 2021 14:08:01 +0100 Subject: [PATCH] Fixed current estimation --- CHANGELOG.md | 4 ++++ wled00/FX_fcn.cpp | 7 ++++--- wled00/wled.h | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4a7e5d51..3c3f77633 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ### Development versions after 0.11.1 release +#### Build 2103230 + +- Fixed current estimation + #### Build 2103220 - Version bump to 0.12.0-b2 "Hikari" diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index ff98e5a6c..7556934c5 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -263,16 +263,17 @@ void WS2812FX::show(void) { for (uint16_t i = 0; i < _length; i++) //sum up the usage of each LED { - RgbwColor c = busses.getPixelColor(i); + uint32_t c = busses.getPixelColor(i); + byte r = c >> 16, g = c >> 8, b = c, w = c >> 24; if(useWackyWS2815PowerModel) { // ignore white component on WS2815 power calculation - powerSum += (MAX(MAX(c.R,c.G),c.B)) * 3; + powerSum += (MAX(MAX(r,g),b)) * 3; } else { - powerSum += (c.R + c.G + c.B + c.W); + powerSum += (r + g + b + w); } } diff --git a/wled00/wled.h b/wled00/wled.h index 62629b849..9c1fc6fb9 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2103220 +#define VERSION 2103230 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG