Fix initialization bug when toggling skip first.

This commit is contained in:
Travis J Dean 2020-03-19 00:37:35 -04:00
parent 9bc48ececa
commit c28027496d

View File

@ -29,11 +29,11 @@
void WS2812FX::init(bool supportWhite, uint16_t countPixels, bool skipFirst)
{
if (supportWhite == _useRgbw && countPixels == _length) return;
if (supportWhite == _useRgbw && countPixels == _length && _skipFirstMode == skipFirst) return;
RESET_RUNTIME;
_useRgbw = supportWhite;
_skipFirstMode = skipFirst;
_length = countPixels;
_skipFirstMode = skipFirst;
uint8_t ty = 1;
if (supportWhite) ty = 2;