Skip to content

Commit 7f9da30

Browse files
committed
const const const
adding hints for the compiler for optimization. In case your custom build complains about "const", just remove the keyword. based on wled@e82f38e, but going further :-) * "const" class functions : function does not modify any class attributes ( --> "this" becomes const) * __attribute__((pure)) : function return value depends only on the parameters and/or global variables. The function does not modify any global or static variables. * __attribute__((const)) : function only examines arguments (no globals), and has no effects except the return value. This slightly more strict than "pure" * hot: tells the compiler "this functions is called very often" * cold: the opposite of hot
1 parent 273154d commit 7f9da30

File tree

14 files changed

+148
-145
lines changed

14 files changed

+148
-145
lines changed

usermods/audioreactive/audio_reactive.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ static volatile float micReal_max2 = 0.0f; // MicIn data max afte
285285
// some prototypes, to ensure consistent interfaces
286286
static float mapf(float x, float in_min, float in_max, float out_min, float out_max); // map function for float
287287
static float fftAddAvg(int from, int to); // average of several FFT result bins
288-
void FFTcode(void * parameter); // audio processing task: read samples, run FFT, fill GEQ channels from FFT results
288+
void FFTcode(void * parameter) __attribute__((noreturn)); // audio processing task: read samples, run FFT, fill GEQ channels from FFT results
289289
static void runMicFilter(uint16_t numSamples, float *sampleBuffer); // pre-filtering of raw samples (band-pass)
290290
static void postProcessFFTResults(bool noiseGateOpen, int numberOfChannels, bool i2sFastpath); // post-processing and post-amp of GEQ channels
291291

wled00/FX.h

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
bool canUseSerial(void); // WLEDMM implemented in wled_serial.cpp
3535
void strip_wait_until_idle(String whoCalledMe); // WLEDMM implemented in FX_fcn.cpp
36-
bool strip_uses_global_leds(void); // WLEDMM implemented in FX_fcn.cpp
36+
bool strip_uses_global_leds(void) __attribute__((pure)); // WLEDMM implemented in FX_fcn.cpp
3737

3838
#define FASTLED_INTERNAL //remove annoying pragma messages
3939
#define USE_GET_MILLISECOND_TIMER
@@ -640,7 +640,7 @@ typedef struct Segment {
640640
void setPixelColor(float i, uint32_t c, bool aa = true);
641641
inline void setPixelColor(float i, uint8_t r, uint8_t g, uint8_t b, uint8_t w = 0, bool aa = true) { setPixelColor(i, RGBW32(r,g,b,w), aa); }
642642
inline void setPixelColor(float i, CRGB c, bool aa = true) { setPixelColor(i, RGBW32(c.r,c.g,c.b,0), aa); }
643-
uint32_t __attribute__((pure)) getPixelColor(int i); // WLEDMM attribute added
643+
uint32_t __attribute__((pure)) getPixelColor(int i) const; // WLEDMM attribute added
644644
// 1D support functions (some implement 2D as well)
645645
void blur(uint8_t, bool smear = false);
646646
void fill(uint32_t c);
@@ -652,7 +652,7 @@ typedef struct Segment {
652652
inline void addPixelColor(int n, byte r, byte g, byte b, byte w = 0, bool fast = false) { addPixelColor(n, RGBW32(r,g,b,w), fast); } // automatically inline
653653
inline void addPixelColor(int n, CRGB c, bool fast = false) { addPixelColor(n, RGBW32(c.r,c.g,c.b,0), fast); } // automatically inline
654654
void fadePixelColor(uint16_t n, uint8_t fade);
655-
uint8_t get_random_wheel_index(uint8_t pos);
655+
uint8_t get_random_wheel_index(uint8_t pos) const;
656656
uint32_t __attribute__((pure)) color_from_palette(uint_fast16_t, bool mapping, bool wrap, uint8_t mcol, uint8_t pbri = 255);
657657
uint32_t __attribute__((pure)) color_wheel(uint8_t pos);
658658

@@ -693,7 +693,7 @@ typedef struct Segment {
693693
void deletejMap(); //WLEDMM jMap
694694

695695
#ifndef WLED_DISABLE_2D
696-
inline uint16_t XY(uint_fast16_t x, uint_fast16_t y) { // support function to get relative index within segment (for leds[]) // WLEDMM inline for speed
696+
inline uint16_t XY(uint_fast16_t x, uint_fast16_t y) const { // support function to get relative index within segment (for leds[]) // WLEDMM inline for speed
697697
uint_fast16_t width = max(uint16_t(1), virtualWidth()); // segment width in logical pixels -- softhack007 avoid div/0
698698
uint_fast16_t height = max(uint16_t(1), virtualHeight()); // segment height in logical pixels -- softhack007 avoid div/0
699699
return (x%width) + (y%height) * width;
@@ -726,7 +726,7 @@ typedef struct Segment {
726726
inline void setPixelColorXY(float x, float y, byte r, byte g, byte b, byte w = 0, bool aa = true) { setPixelColorXY(x, y, RGBW32(r,g,b,w), aa); }
727727
inline void setPixelColorXY(float x, float y, CRGB c, bool aa = true) { setPixelColorXY(x, y, RGBW32(c.r,c.g,c.b,0), aa); }
728728
//#endif
729-
uint32_t __attribute__((pure)) getPixelColorXY(int x, int y);
729+
uint32_t __attribute__((pure)) getPixelColorXY(int x, int y) const;
730730
// 2D support functions
731731
void blendPixelColorXY(uint16_t x, uint16_t y, uint32_t color, uint8_t blend);
732732
inline void blendPixelColorXY(uint16_t x, uint16_t y, CRGB c, uint8_t blend) { blendPixelColorXY(x, y, RGBW32(c.r,c.g,c.b,0), blend); }
@@ -792,7 +792,7 @@ typedef struct Segment {
792792
inline void drawCharacter(unsigned char chr, int16_t x, int16_t y, uint8_t w, uint8_t h, CRGB c, CRGB c2, int8_t rotate = 0) {}
793793
inline void wu_pixel(uint32_t x, uint32_t y, CRGB c) {}
794794
#endif
795-
uint8_t * getAudioPalette(int pal); //WLEDMM netmindz ar palette
795+
uint8_t * getAudioPalette(int pal) const; //WLEDMM netmindz ar palette
796796
} segment;
797797
//static int segSize = sizeof(Segment);
798798

@@ -915,64 +915,64 @@ class WS2812FX { // 96 bytes
915915

916916
bool
917917
checkSegmentAlignment(void),
918-
hasRGBWBus(void),
919-
hasCCTBus(void),
918+
hasRGBWBus(void) const,
919+
hasCCTBus(void) const,
920920
// return true if the strip is being sent pixel updates
921-
isUpdating(void),
921+
isUpdating(void) const,
922922
deserializeMap(uint8_t n=0),
923923
useLedsArray = false;
924924

925-
inline bool isServicing(void) { return _isServicing; }
926-
inline bool hasWhiteChannel(void) {return _hasWhiteChannel;}
927-
inline bool isOffRefreshRequired(void) {return _isOffRefreshRequired;}
925+
inline bool isServicing(void) const { return _isServicing; }
926+
inline bool hasWhiteChannel(void) const {return _hasWhiteChannel;}
927+
inline bool isOffRefreshRequired(void) const {return _isOffRefreshRequired;}
928928

929929
uint8_t
930930
paletteFade,
931931
paletteBlend,
932932
milliampsPerLed,
933933
cctBlending,
934-
getActiveSegmentsNum(void),
935-
getFirstSelectedSegId(void),
936-
getLastActiveSegmentId(void),
937-
getActiveSegsLightCapabilities(bool selectedOnly = false),
934+
getActiveSegmentsNum(void) const,
935+
getFirstSelectedSegId(void) __attribute__((pure)),
936+
getLastActiveSegmentId(void) const,
937+
getActiveSegsLightCapabilities(bool selectedOnly = false) __attribute__((pure)),
938938
setPixelSegment(uint8_t n);
939939

940-
inline uint8_t getBrightness(void) { return _brightness; }
941-
inline uint8_t getMaxSegments(void) { return MAX_NUM_SEGMENTS; } // returns maximum number of supported segments (fixed value)
942-
inline uint8_t getSegmentsNum(void) { return _segments.size(); } // returns currently present segments
943-
inline uint8_t getCurrSegmentId(void) { return _segment_index; }
944-
inline uint8_t getMainSegmentId(void) { return _mainSegment; }
945-
inline uint8_t getPaletteCount() { return 13 + GRADIENT_PALETTE_COUNT; } // will only return built-in palette count
946-
inline uint8_t getTargetFps() { return _targetFps; }
947-
inline uint8_t getModeCount() { return _modeCount; }
940+
inline uint8_t getBrightness(void) const { return _brightness; }
941+
inline uint8_t getMaxSegments(void) const { return MAX_NUM_SEGMENTS; } // returns maximum number of supported segments (fixed value)
942+
inline uint8_t getSegmentsNum(void) const { return _segments.size(); } // returns currently present segments
943+
inline uint8_t getCurrSegmentId(void) const { return _segment_index; }
944+
inline uint8_t getMainSegmentId(void) const { return _mainSegment; }
945+
inline uint8_t getPaletteCount() const { return 13 + GRADIENT_PALETTE_COUNT; } // will only return built-in palette count
946+
inline uint8_t getTargetFps() const { return _targetFps; }
947+
inline uint8_t getModeCount() const { return _modeCount; }
948948

949949
uint16_t
950950
ablMilliampsMax,
951951
currentMilliamps,
952-
getLengthPhysical(void),
953-
__attribute__((pure)) getLengthTotal(void), // will include virtual/nonexistent pixels in matrix //WLEDMM attribute added
954-
getFps();
952+
getLengthPhysical(void) const,
953+
__attribute__((pure)) getLengthTotal(void) const, // will include virtual/nonexistent pixels in matrix //WLEDMM attribute added
954+
getFps() const;
955955

956-
inline uint16_t getFrameTime(void) { return _frametime; }
957-
inline uint16_t getMinShowDelay(void) { return MIN_SHOW_DELAY; }
958-
inline uint16_t getLength(void) { return _length; } // 2D matrix may have less pixels than W*H
959-
inline uint16_t getTransition(void) { return _transitionDur; }
956+
inline uint16_t getFrameTime(void) const { return _frametime; }
957+
inline uint16_t getMinShowDelay(void) const { return MIN_SHOW_DELAY; }
958+
inline uint16_t getLength(void) const { return _length; } // 2D matrix may have less pixels than W*H
959+
inline uint16_t getTransition(void) const { return _transitionDur; }
960960

961961
uint32_t
962962
now,
963963
timebase;
964-
uint32_t __attribute__((pure)) getPixelColor(uint_fast16_t); // WLEDMM attribute pure = does not have side-effects
964+
uint32_t __attribute__((pure)) getPixelColor(uint_fast16_t) const; // WLEDMM attribute pure = does not have side-effects
965965

966-
inline uint32_t getLastShow(void) { return _lastShow; }
967-
inline uint32_t segColor(uint8_t i) { return _colors_t[i]; }
966+
inline uint32_t getLastShow(void) const { return _lastShow; }
967+
inline uint32_t segColor(uint8_t i) const { return _colors_t[i]; }
968968

969969
const char *
970-
getModeData(uint8_t id = 0) { return (id && id<_modeCount) ? _modeData[id] : PSTR("Solid"); }
970+
getModeData(uint8_t id = 0) const { return (id && id<_modeCount) ? _modeData[id] : PSTR("Solid"); }
971971

972972
const char **
973973
getModeDataSrc(void) { return &(_modeData[0]); } // vectors use arrays for underlying data
974974

975-
Segment& getSegment(uint8_t id);
975+
Segment& getSegment(uint8_t id) __attribute__((pure));
976976
inline Segment& getFirstSelectedSeg(void) { return _segments[getFirstSelectedSegId()]; }
977977
inline Segment& getMainSegment(void) { return _segments[getMainSegmentId()]; }
978978
inline Segment* getSegments(void) { return &(_segments[0]); }
@@ -1039,7 +1039,7 @@ class WS2812FX { // 96 bytes
10391039
inline void setPixelColorXY(int x, int y, CRGB c) { setPixelColorXY(x, y, RGBW32(c.r,c.g,c.b,0)); }
10401040

10411041
uint32_t
1042-
getPixelColorXY(uint16_t, uint16_t);
1042+
getPixelColorXY(uint16_t, uint16_t) const;
10431043

10441044
// end 2D support
10451045

wled00/FX_2Dfcn.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ void WS2812FX::setUpMatrix() {
177177
}
178178

179179
// absolute matrix version of setPixelColor(), without error checking
180-
void IRAM_ATTR WS2812FX::setPixelColorXY_fast(int x, int y, uint32_t col) //WLEDMM: IRAM_ATTR conditionally
180+
void IRAM_ATTR __attribute__((hot)) WS2812FX::setPixelColorXY_fast(int x, int y, uint32_t col) //WLEDMM: IRAM_ATTR conditionally
181181
{
182182
uint_fast16_t index = y * Segment::maxWidth + x;
183183
if (index < customMappingSize) index = customMappingTable[index];
@@ -200,7 +200,7 @@ void IRAM_ATTR_YN WS2812FX::setPixelColorXY(int x, int y, uint32_t col) //WLEDMM
200200
}
201201

202202
// returns RGBW values of pixel
203-
uint32_t WS2812FX::getPixelColorXY(uint16_t x, uint16_t y) {
203+
uint32_t __attribute__((hot)) WS2812FX::getPixelColorXY(uint16_t x, uint16_t y) const {
204204
#ifndef WLED_DISABLE_2D
205205
uint_fast16_t index = (y * Segment::maxWidth + x); //WLEDMM: use fast types
206206
#else
@@ -239,7 +239,7 @@ void Segment::startFrame(void) {
239239

240240
// Simplified version of Segment::setPixelColorXY - without error checking. Does not support grouping or spacing
241241
// * expects scaled color (final brightness) as additional input parameter, plus segment virtualWidth() and virtualHeight()
242-
void IRAM_ATTR Segment::setPixelColorXY_fast(int x, int y, uint32_t col, uint32_t scaled_col, int cols, int rows) //WLEDMM
242+
void IRAM_ATTR __attribute__((hot)) Segment::setPixelColorXY_fast(int x, int y, uint32_t col, uint32_t scaled_col, int cols, int rows) //WLEDMM
243243
{
244244
unsigned i = UINT_MAX;
245245
bool sameColor = false;
@@ -406,7 +406,7 @@ void Segment::setPixelColorXY(float x, float y, uint32_t col, bool aa, bool fast
406406
}
407407

408408
// returns RGBW values of pixel
409-
uint32_t IRAM_ATTR_YN Segment::getPixelColorXY(int x, int y) {
409+
uint32_t IRAM_ATTR_YN Segment::getPixelColorXY(int x, int y) const {
410410
if (x<0 || y<0 || !isActive()) return 0; // not active or out-of range
411411
if (ledsrgb) {
412412
int i = XY(x,y);

wled00/FX_fcn.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ uint16_t Segment::virtualLength() const {
882882
}
883883

884884
//WLEDMM used for M12_sBlock
885-
void xyFromBlock(uint16_t &x,uint16_t &y, uint16_t i, uint16_t vW, uint16_t vH, uint16_t vStrip) {
885+
static void xyFromBlock(uint16_t &x,uint16_t &y, uint16_t i, uint16_t vW, uint16_t vH, uint16_t vStrip) {
886886
float i2;
887887
if (i<=SEGLEN*0.25) { //top, left to right
888888
i2 = i/(SEGLEN*0.25);
@@ -907,7 +907,7 @@ void xyFromBlock(uint16_t &x,uint16_t &y, uint16_t i, uint16_t vW, uint16_t vH,
907907

908908
}
909909

910-
void IRAM_ATTR_YN Segment::setPixelColor(int i, uint32_t col) //WLEDMM: IRAM_ATTR conditionally
910+
void IRAM_ATTR_YN __attribute__((hot)) Segment::setPixelColor(int i, uint32_t col) //WLEDMM: IRAM_ATTR conditionally
911911
{
912912
if (!isActive()) return; // not active
913913
#ifndef WLED_DISABLE_2D
@@ -1171,7 +1171,7 @@ void Segment::setPixelColor(float i, uint32_t col, bool aa)
11711171
}
11721172
}
11731173

1174-
uint32_t Segment::getPixelColor(int i)
1174+
uint32_t __attribute__((hot)) Segment::getPixelColor(int i) const
11751175
{
11761176
if (!isActive()) return 0; // not active
11771177
#ifndef WLED_DISABLE_2D
@@ -1345,7 +1345,7 @@ void Segment::refreshLightCapabilities() {
13451345
/*
13461346
* Fills segment with color - WLEDMM using faster sPC if possible
13471347
*/
1348-
void Segment::fill(uint32_t c) {
1348+
void __attribute__((hot)) Segment::fill(uint32_t c) {
13491349
if (!isActive()) return; // not active
13501350

13511351
#if 0 && defined(WLED_ENABLE_HUB75MATRIX) && defined(WLEDMM_FASTPATH)
@@ -1457,7 +1457,7 @@ void Segment::fade_out(uint8_t rate) {
14571457
}
14581458

14591459
// fades all pixels to black using nscale8()
1460-
void Segment::fadeToBlackBy(uint8_t fadeBy) {
1460+
void __attribute__((hot)) Segment::fadeToBlackBy(uint8_t fadeBy) {
14611461
if (!isActive() || fadeBy == 0) return; // optimization - no scaling to apply
14621462
const uint_fast16_t cols = is2D() ? virtualWidth() : virtualLength(); // WLEDMM use fast int types
14631463
const uint_fast16_t rows = virtualHeight(); // will be 1 for 1D
@@ -1480,7 +1480,7 @@ void Segment::fadeToBlackBy(uint8_t fadeBy) {
14801480
/*
14811481
* blurs segment content, source: FastLED colorutils.cpp
14821482
*/
1483-
void Segment::blur(uint8_t blur_amount, bool smear) {
1483+
void __attribute__((hot)) Segment::blur(uint8_t blur_amount, bool smear) {
14841484
if (!isActive() || blur_amount == 0) return; // optimization: 0 means "don't blur"
14851485
#ifndef WLED_DISABLE_2D
14861486
if (is2D()) {
@@ -1541,7 +1541,7 @@ uint32_t Segment::color_wheel(uint8_t pos) {
15411541
/*
15421542
* Returns a new, random wheel index with a minimum distance of 42 from pos.
15431543
*/
1544-
uint8_t Segment::get_random_wheel_index(uint8_t pos) { // WLEDMM use fast int types, use native min/max
1544+
uint8_t Segment::get_random_wheel_index(uint8_t pos) const { // WLEDMM use fast int types, use native min/max
15451545
uint_fast8_t r = 0, x = 0, y = 0, d = 0;
15461546

15471547
while(d < 42) {
@@ -1562,7 +1562,7 @@ uint8_t Segment::get_random_wheel_index(uint8_t pos) { // WLEDMM use fast int ty
15621562
* @param pbri Value to scale the brightness of the returned color by. Default is 255. (no scaling)
15631563
* @returns Single color from palette
15641564
*/
1565-
uint32_t Segment::color_from_palette(uint_fast16_t i, bool mapping, bool wrap, uint8_t mcol, uint8_t pbri) // WLEDMM use fast int types
1565+
uint32_t __attribute__((hot)) Segment::color_from_palette(uint_fast16_t i, bool mapping, bool wrap, uint8_t mcol, uint8_t pbri) // WLEDMM use fast int types
15661566
{
15671567
// default palette or no RGB support on segment
15681568
if ((palette == 0 && mcol < NUM_COLORS) || !_isRGB) {
@@ -1582,7 +1582,7 @@ uint32_t Segment::color_from_palette(uint_fast16_t i, bool mapping, bool wrap, u
15821582
}
15831583

15841584
//WLEDMM netmindz ar palette
1585-
uint8_t * Segment::getAudioPalette(int pal) {
1585+
uint8_t * Segment::getAudioPalette(int pal) const {
15861586
// https://forum.makerforums.info/t/hi-is-it-possible-to-define-a-gradient-palette-at-runtime-the-define-gradient-palette-uses-the/63339
15871587

15881588
um_data_t *um_data;
@@ -1891,7 +1891,7 @@ void IRAM_ATTR WS2812FX::setPixelColor(int i, uint32_t col)
18911891
busses.setPixelColor(i, col);
18921892
}
18931893

1894-
uint32_t WS2812FX::getPixelColor(uint_fast16_t i) // WLEDMM fast int types
1894+
uint32_t WS2812FX::getPixelColor(uint_fast16_t i) const // WLEDMM fast int types
18951895
{
18961896
if (i < customMappingSize) i = customMappingTable[i];
18971897
if (i >= _length) return 0;
@@ -2029,15 +2029,15 @@ void WS2812FX::show(void) {
20292029
* Returns a true value if any of the strips are still being updated.
20302030
* On some hardware (ESP32), strip updates are done asynchronously.
20312031
*/
2032-
bool WS2812FX::isUpdating() {
2032+
bool WS2812FX::isUpdating() const {
20332033
return !busses.canAllShow();
20342034
}
20352035

20362036
/**
20372037
* Returns the refresh rate of the LED strip. Useful for finding out whether a given setup is fast enough.
20382038
* Only updates on show() or is set to 0 fps if last show is more than 2 secs ago, so accuracy varies
20392039
*/
2040-
uint16_t WS2812FX::getFps() {
2040+
uint16_t WS2812FX::getFps() const {
20412041
if (millis() - _lastShow > 2000) return 0;
20422042
#ifdef ARDUINO_ARCH_ESP32
20432043
return ((_cumulativeFps500 + 250) / 500); // +250 for proper rounding
@@ -2128,28 +2128,28 @@ void WS2812FX::setMainSegmentId(uint8_t n) {
21282128
return;
21292129
}
21302130

2131-
uint8_t WS2812FX::getLastActiveSegmentId(void) {
2131+
uint8_t WS2812FX::getLastActiveSegmentId(void) const {
21322132
for (size_t i = _segments.size() -1; i > 0; i--) {
21332133
if (_segments[i].isActive()) return i;
21342134
}
21352135
return 0;
21362136
}
21372137

2138-
uint8_t WS2812FX::getActiveSegmentsNum(void) {
2138+
uint8_t WS2812FX::getActiveSegmentsNum(void) const {
21392139
uint8_t c = 0;
21402140
for (size_t i = 0; i < _segments.size(); i++) {
21412141
if (_segments[i].isActive()) c++;
21422142
}
21432143
return c;
21442144
}
21452145

2146-
uint16_t WS2812FX::getLengthTotal(void) { // WLEDMM fast int types
2146+
uint16_t WS2812FX::getLengthTotal(void) const { // WLEDMM fast int types
21472147
uint_fast16_t len = Segment::maxWidth * Segment::maxHeight; // will be _length for 1D (see finalizeInit()) but should cover whole matrix for 2D
21482148
if (isMatrix && _length > len) len = _length; // for 2D with trailing strip
21492149
return len;
21502150
}
21512151

2152-
uint16_t WS2812FX::getLengthPhysical(void) { // WLEDMM fast int types
2152+
uint16_t WS2812FX::getLengthPhysical(void) const { // WLEDMM fast int types
21532153
uint_fast16_t len = 0;
21542154
for (unsigned b = 0; b < busses.getNumBusses(); b++) { // WLEDMM use native (fast) types
21552155
Bus *bus = busses.getBus(b);
@@ -2162,7 +2162,7 @@ uint16_t WS2812FX::getLengthPhysical(void) { // WLEDMM fast int types
21622162
//used for JSON API info.leds.rgbw. Little practical use, deprecate with info.leds.rgbw.
21632163
//returns if there is an RGBW bus (supports RGB and White, not only white)
21642164
//not influenced by auto-white mode, also true if white slider does not affect output white channel
2165-
bool WS2812FX::hasRGBWBus(void) {
2165+
bool WS2812FX::hasRGBWBus(void) const {
21662166
for (unsigned b = 0; b < busses.getNumBusses(); b++) { // WLEDMM use native (fast) types
21672167
Bus *bus = busses.getBus(b);
21682168
if (bus == nullptr || bus->getLength()==0) break;
@@ -2171,7 +2171,7 @@ bool WS2812FX::hasRGBWBus(void) {
21712171
return false;
21722172
}
21732173

2174-
bool WS2812FX::hasCCTBus(void) {
2174+
bool WS2812FX::hasCCTBus(void) const {
21752175
if (cctFromRgb && !correctWB) return false;
21762176
for (unsigned b = 0; b < busses.getNumBusses(); b++) { // WLEDMM use native (fast) types
21772177
Bus *bus = busses.getBus(b);

0 commit comments

Comments
 (0)