From 92b3959a6a6c053048f2a32660f179a2d969e90b Mon Sep 17 00:00:00 2001 From: bpohvoodoo Date: Mon, 18 Mar 2019 20:30:40 +0100 Subject: [PATCH] Bugfix Reverse Direction (FXOPTS) was not working for Fire 2012 custom animation --- Arduino/McLighting/McLighting.ino | 1 + Arduino/McLighting/definitions.h | 2 +- Arduino/McLighting/mode_custom_ws2812fx_animations.h | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Arduino/McLighting/McLighting.ino b/Arduino/McLighting/McLighting.ino index f8bc21b..97f8ab2 100644 --- a/Arduino/McLighting/McLighting.ino +++ b/Arduino/McLighting/McLighting.ino @@ -312,6 +312,7 @@ void initStrip(uint16_t stripSize = WS2812FXStripSettings.stripSize, char RGBOrd #if defined(CUSTOM_WS2812FX_ANIMATIONS) strip->setCustomMode(0, F("Fire 2012"), myCustomEffect0); //strip->setCustomMode(1, F("CustEffect"), myCustomEffect1); + gReverseDirection = (WS2812FXStripSettings.fxoptions & 128); #endif #if defined(ENABLE_E131) /* diff --git a/Arduino/McLighting/definitions.h b/Arduino/McLighting/definitions.h index 2d82946..f693614 100644 --- a/Arduino/McLighting/definitions.h +++ b/Arduino/McLighting/definitions.h @@ -147,7 +147,7 @@ struct ledstate // Data structure to store a state of a single le uint8_t red; uint8_t green; uint8_t blue; - uint8_t white; // is abused for tv_mode and custom animations as it is already here and white channel is not used there. + uint8_t white; }; typedef struct ledstate LEDState; // Define the datatype LEDState diff --git a/Arduino/McLighting/mode_custom_ws2812fx_animations.h b/Arduino/McLighting/mode_custom_ws2812fx_animations.h index 460f50b..e44b228 100644 --- a/Arduino/McLighting/mode_custom_ws2812fx_animations.h +++ b/Arduino/McLighting/mode_custom_ws2812fx_animations.h @@ -9,8 +9,6 @@ More info on how to create custom aniamtions for WS2812FX: https://github.com/ki #include //https://github.com/FastLED/FastLED -//byte* heat; - /* * paste in the Fire2012 code with a small edit at the end which uses the * setPixelColor() function to copy the color data to the ws2812fx instance.