From b1cbbeb93599ccf24e960bc399a60d367739d906 Mon Sep 17 00:00:00 2001 From: Warren Spits Date: Tue, 10 Dec 2019 11:34:11 +1100 Subject: [PATCH] Segment reverse fix --- wled00/FX_fcn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 3a39b01b7..f68e7d0f5 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -113,7 +113,7 @@ uint16_t WS2812FX::realPixelIndex(uint16_t i) { /* reverse just an individual segment */ int16_t realIndex; if IS_REVERSE - realIndex = SEGMENT.stop - iGroup -1; + realIndex = SEGMENT.rawLength + SEGMENT.start - iGroup -1; else realIndex = SEGMENT.start + iGroup; /* Reverse the whole string */