Fix current calculation.
This commit is contained in:
parent
f6772eaf59
commit
0b75a7d0d3
@ -275,16 +275,17 @@ void WS2812FX::show(void) {
|
|||||||
|
|
||||||
for (uint16_t i = 0; i < _length; i++) //sum up the usage of each LED
|
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)
|
if(useWackyWS2815PowerModel)
|
||||||
{
|
{
|
||||||
// ignore white component on WS2815 power calculation
|
// 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
|
else
|
||||||
{
|
{
|
||||||
powerSum += (c.R + c.G + c.B + c.W);
|
powerSum += (r + g + b + w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2103230
|
#define VERSION 2103231
|
||||||
|
|
||||||
//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
|
||||||
@ -173,7 +173,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Global Variable definitions
|
// Global Variable definitions
|
||||||
WLED_GLOBAL char versionString[] _INIT("0.12.0-b2");
|
WLED_GLOBAL char versionString[] _INIT("0.12.0-b3");
|
||||||
#define WLED_CODENAME "Hikari"
|
#define WLED_CODENAME "Hikari"
|
||||||
|
|
||||||
// AP and OTA default passwords (for maximum security change them!)
|
// AP and OTA default passwords (for maximum security change them!)
|
||||||
|
Loading…
Reference in New Issue
Block a user