Save some tiny amounts of RAM

- use `-D WLED_SAVE_RAM`
This commit is contained in:
Blaz Kristan
2024-08-17 15:09:41 +02:00
parent 8688777ae1
commit 8d00e4d31d
8 changed files with 196 additions and 56 deletions

View File

@@ -720,6 +720,9 @@ class WS2812FX { // 96 bytes
#ifndef WLED_DISABLE_2D
panels(1),
#endif
autoSegments(false),
correctWB(false),
cctFromRgb(false),
// semi-private (just obscured) used in effect functions through macros
_colors_t{0,0,0},
_virtualSegmentLength(0),
@@ -908,6 +911,12 @@ class WS2812FX { // 96 bytes
void loadCustomPalettes(void); // loads custom palettes from JSON
std::vector<CRGBPalette16> customPalettes; // TODO: move custom palettes out of WS2812FX class
struct {
bool autoSegments : 1;
bool correctWB : 1;
bool cctFromRgb : 1;
};
// using public variables to reduce code size increase due to inline function getSegment() (with bounds checking)
// and color transitions
uint32_t _colors_t[3]; // color used for effect (includes transition)