Fix reverse on segments with start > 0

This commit is contained in:
cschwinne 2019-11-08 16:58:23 +01:00
parent e7a0874a57
commit f3cc616e07
2 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ void WS2812FX::setPixelColor(uint16_t n, uint32_t c) {
void WS2812FX::setPixelColor(uint16_t i, byte r, byte g, byte b, byte w)
{
if (_locked[i] && !_modeUsesLock) return;
if (IS_REVERSE) i = SEGMENT.stop -1 -i - SEGMENT.start; //reverse just individual segment
if (IS_REVERSE) i = SEGMENT.stop -1 -i + SEGMENT.start; //reverse just individual segment
byte tmpg = g;
switch (colorOrder) //0 = Grb, default
{
@ -395,7 +395,7 @@ uint32_t WS2812FX::getColor(void) {
uint32_t WS2812FX::getPixelColor(uint16_t i)
{
if (reverseMode) i = _length- 1 -i;
if (IS_REVERSE) i = SEGMENT.stop -1 -i - SEGMENT.start; //reverse just individual segment
if (IS_REVERSE) i = SEGMENT.stop -1 -i + SEGMENT.start; //reverse just individual segment
if (_skipFirstMode) i += LED_SKIP_AMOUNT;
if (_cronixieMode)
{

View File

@ -100,7 +100,7 @@
//version code in format yymmddb (b = daily build)
#define VERSION 1911031
#define VERSION 1911081
char versionString[] = "0.8.6";