From 70892505a909b0d346ef623bb9f70c00aa345008 Mon Sep 17 00:00:00 2001 From: Damian Schneider Date: Sat, 27 Jan 2024 20:36:59 +0100 Subject: [PATCH] fixed include, bugfix in random palette handling --- wled00/FX_fcn.cpp | 2 +- wled00/fcn_declare.h | 1 - wled00/wled.h | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 4d27288a88..3ecbf37b6c 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -223,7 +223,7 @@ CRGBPalette16 IRAM_ATTR &Segment::loadPalette(CRGBPalette16 &targetPalette, uint case 1: {//periodically replace palette with a random one unsigned long timeSinceLastChange = millis() - _lastPaletteChange; if (timeSinceLastChange > randomPaletteChangeTime * 1000U) { - _randomPalette = _newRandomPalette; + //_randomPalette = _newRandomPalette; _newRandomPalette = generateRandomPalette(&_randomPalette); _lastPaletteChange = millis(); handleRandomPalette(); // do a 1st pass of blend diff --git a/wled00/fcn_declare.h b/wled00/fcn_declare.h index 3eda4ff82b..ac68a6f8c6 100644 --- a/wled00/fcn_declare.h +++ b/wled00/fcn_declare.h @@ -1,7 +1,6 @@ #ifndef WLED_FCN_DECLARE_H #define WLED_FCN_DECLARE_H -#include "FastLED.h" /* * All globally accessible functions are declared here */ diff --git a/wled00/wled.h b/wled00/wled.h index 79488e8e8f..6f8a029579 100755 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -177,6 +177,7 @@ using PSRAMDynamicJsonDocument = BasicJsonDocument; #define PSRAMDynamicJsonDocument DynamicJsonDocument #endif +#include "FastLED.h" #include "const.h" #include "fcn_declare.h" #include "NodeStruct.h"