diff options
Diffstat (limited to 'src/controller.h')
-rw-r--r-- | src/controller.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/controller.h b/src/controller.h index fe32d70d..7b7a7cf9 100644 --- a/src/controller.h +++ b/src/controller.h @@ -404,7 +404,11 @@ protected: ///@param nLeds the number of leds being written out ///@param scale the rgb scaling to apply to each led before writing it out virtual void show(const struct CRGB *data, int nLeds, CRGB scale) { - PixelController<RGB_ORDER, LANES, MASK> pixels(data, nLeds, scale, getDither()); + PixelController<RGB_ORDER, LANES, MASK> pixels(data, nLeds < 0 ? -nLeds : nLeds, scale, getDither()); + if(nLeds < 0) { + // nLeds < 0 implies that we want to show them in reverse + pixels.mAdvance = -pixels.mAdvance; + } showPixels(pixels); } |