kopia lustrzana https://github.com/Aircoookie/WLED
fixed include, bugfix in random palette handling
rodzic
a9bcc75733
commit
bccc97d25f
|
@ -223,7 +223,7 @@ CRGBPalette16 IRAM_ATTR &Segment::loadPalette(CRGBPalette16 &targetPalette, uint
|
||||||
case 1: {//periodically replace palette with a random one
|
case 1: {//periodically replace palette with a random one
|
||||||
unsigned long timeSinceLastChange = millis() - _lastPaletteChange;
|
unsigned long timeSinceLastChange = millis() - _lastPaletteChange;
|
||||||
if (timeSinceLastChange > randomPaletteChangeTime * 1000U) {
|
if (timeSinceLastChange > randomPaletteChangeTime * 1000U) {
|
||||||
_randomPalette = _newRandomPalette;
|
//_randomPalette = _newRandomPalette;
|
||||||
_newRandomPalette = generateRandomPalette(&_randomPalette);
|
_newRandomPalette = generateRandomPalette(&_randomPalette);
|
||||||
_lastPaletteChange = millis();
|
_lastPaletteChange = millis();
|
||||||
handleRandomPalette(); // do a 1st pass of blend
|
handleRandomPalette(); // do a 1st pass of blend
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#ifndef WLED_FCN_DECLARE_H
|
#ifndef WLED_FCN_DECLARE_H
|
||||||
#define WLED_FCN_DECLARE_H
|
#define WLED_FCN_DECLARE_H
|
||||||
|
|
||||||
#include "FastLED.h"
|
|
||||||
/*
|
/*
|
||||||
* All globally accessible functions are declared here
|
* All globally accessible functions are declared here
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -177,6 +177,7 @@ using PSRAMDynamicJsonDocument = BasicJsonDocument<PSRAM_Allocator>;
|
||||||
#define PSRAMDynamicJsonDocument DynamicJsonDocument
|
#define PSRAMDynamicJsonDocument DynamicJsonDocument
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "FastLED.h"
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
#include "fcn_declare.h"
|
#include "fcn_declare.h"
|
||||||
#include "NodeStruct.h"
|
#include "NodeStruct.h"
|
||||||
|
|
Ładowanie…
Reference in New Issue