cache SEGMENT

actually its just a minor speedup, at least with -O2
This commit is contained in:
Frank
2024-10-20 01:06:18 +02:00
parent 7c6178418a
commit a99a54c9fa
3 changed files with 13 additions and 0 deletions

View File

@@ -1056,6 +1056,9 @@ class WS2812FX { // 96 bytes
// and color transitions
uint32_t _colors_t[3]; // color used for effect (includes transition)
uint16_t _virtualSegmentLength;
#ifdef WLEDMM_FASTPATH
segment* _currentSeg = nullptr; // WLEDMM speed up SEGMENT access
#endif
std::vector<segment> _segments;
friend class Segment;