Hotfix for effects 12, 26 and 52 not working correctly
Added notifier check for sec color support
This commit is contained in:
parent
c5450229c6
commit
0c087cc9c9
@ -402,8 +402,8 @@ void WS2812FX::mode_breath(void) {
|
|||||||
void WS2812FX::mode_fade(void) {
|
void WS2812FX::mode_fade(void) {
|
||||||
|
|
||||||
int y = _counter_mode_step - 127;
|
int y = _counter_mode_step - 127;
|
||||||
y = 255 - (abs(y) * 2);
|
y = 256 - (abs(y) * 2);
|
||||||
double z = (double)y/255;
|
double z = (double)y/256;
|
||||||
uint8_t w = ((_color >> 24) & 0xFF), ws = ((_color_sec >> 24) & 0xFF);
|
uint8_t w = ((_color >> 24) & 0xFF), ws = ((_color_sec >> 24) & 0xFF);
|
||||||
uint8_t r = ((_color >> 16) & 0xFF), rs = ((_color_sec >> 16) & 0xFF);
|
uint8_t r = ((_color >> 16) & 0xFF), rs = ((_color_sec >> 16) & 0xFF);
|
||||||
uint8_t g = ((_color >> 8) & 0xFF), gs = ((_color_sec >> 8) & 0xFF);
|
uint8_t g = ((_color >> 8) & 0xFF), gs = ((_color_sec >> 8) & 0xFF);
|
||||||
@ -794,14 +794,13 @@ void WS2812FX::mode_blink_rainbow(void) {
|
|||||||
if (!_locked[i])
|
if (!_locked[i])
|
||||||
setPixelColor(i, color_wheel(_counter_mode_call % 256));
|
setPixelColor(i, color_wheel(_counter_mode_call % 256));
|
||||||
}
|
}
|
||||||
show();
|
|
||||||
} else {
|
} else {
|
||||||
for(uint16_t i=0; i < _led_count; i++) {
|
for(uint16_t i=0; i < _led_count; i++) {
|
||||||
if (!_locked[i])
|
if (!_locked[i])
|
||||||
setPixelColor(i, _color_sec);
|
setPixelColor(i, _color_sec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
show();
|
||||||
_mode_delay = 100 + ((1986 * (uint32_t)(SPEED_MAX - _speed)) / SPEED_MAX);
|
_mode_delay = 100 + ((1986 * (uint32_t)(SPEED_MAX - _speed)) / SPEED_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1545,7 +1544,7 @@ void WS2812FX::mode_circus_combustus(void) {
|
|||||||
for(uint16_t i=0; i < _led_count; i++) {
|
for(uint16_t i=0; i < _led_count; i++) {
|
||||||
if((i + _counter_mode_step) % 6 < 2) {
|
if((i + _counter_mode_step) % 6 < 2) {
|
||||||
if (!_locked[i])
|
if (!_locked[i])
|
||||||
setPixelColor(i, 255, 0, 0);
|
setPixelColor(i, _color);
|
||||||
} else if((i + _color) % 6 < 4){
|
} else if((i + _color) % 6 < 4){
|
||||||
if (!_locked[i])
|
if (!_locked[i])
|
||||||
setPixelColor(i, _color_sec);
|
setPixelColor(i, _color_sec);
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "CallbackFunction.h"
|
#include "CallbackFunction.h"
|
||||||
|
|
||||||
//version in format yymmddb (b = daily build)
|
//version in format yymmddb (b = daily build)
|
||||||
#define VERSION 1711281
|
#define VERSION 1711282
|
||||||
|
|
||||||
|
|
||||||
//If you have an RGBW strip, uncomment first line in WS2812FX.h!
|
//If you have an RGBW strip, uncomment first line in WS2812FX.h!
|
||||||
|
@ -26,7 +26,7 @@ void notify(uint8_t callMode)
|
|||||||
udpOut[8] = effectCurrent;
|
udpOut[8] = effectCurrent;
|
||||||
udpOut[9] = effectSpeed;
|
udpOut[9] = effectSpeed;
|
||||||
udpOut[10] = white;
|
udpOut[10] = white;
|
||||||
udpOut[11] = 1; //boolean byte, lowest bit to confirm white value compatibility
|
udpOut[11] = 2; //compatibilityVersionByte: 0: old 1: supports white 2: supports secondary color
|
||||||
udpOut[12] = col_sec[0];
|
udpOut[12] = col_sec[0];
|
||||||
udpOut[13] = col_sec[1];
|
udpOut[13] = col_sec[1];
|
||||||
udpOut[14] = col_sec[2];
|
udpOut[14] = col_sec[2];
|
||||||
@ -52,13 +52,16 @@ void handleNotifications()
|
|||||||
col[0] = udpIn[3];
|
col[0] = udpIn[3];
|
||||||
col[1] = udpIn[4];
|
col[1] = udpIn[4];
|
||||||
col[2] = udpIn[5];
|
col[2] = udpIn[5];
|
||||||
col_sec[0] = udpIn[12];
|
if (udpIn[11] > 1)
|
||||||
col_sec[1] = udpIn[13];
|
{
|
||||||
col_sec[2] = udpIn[14];
|
col_sec[0] = udpIn[12];
|
||||||
if (udpIn[11] %2 == 1) //check if sending modules white val is inteded
|
col_sec[1] = udpIn[13];
|
||||||
|
col_sec[2] = udpIn[14];
|
||||||
|
white_sec = udpIn[15];
|
||||||
|
}
|
||||||
|
if (udpIn[11] > 0) //check if sending modules white val is inteded
|
||||||
{
|
{
|
||||||
white = udpIn[10];
|
white = udpIn[10];
|
||||||
white_sec = udpIn[15];
|
|
||||||
}
|
}
|
||||||
if (udpIn[8] != effectCurrent)
|
if (udpIn[8] != effectCurrent)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user