Skip to content

Commit

Permalink
Fix for stuff that got missing in merge
Browse files Browse the repository at this point in the history
  • Loading branch information
DedeHai committed Dec 13, 2024
1 parent 800348e commit b238eae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
11 changes: 4 additions & 7 deletions wled00/FX.h
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ class WS2812FX { // 96 bytes
fixInvalidSegments(), // fixes incorrect segment configuration
setPixelColor(unsigned n, uint32_t c), // paints absolute strip pixel with index n and color c
show(), // initiates LED output
setTargetFps(unsigned fps),
setTargetFps(uint8_t fps),
setupEffectData(); // add default effects to the list; defined in FX.cpp

inline void resetTimebase() { timebase = 0UL - millis(); }
Expand Down Expand Up @@ -882,17 +882,14 @@ class WS2812FX { // 96 bytes

uint16_t
getLengthPhysical() const,
getLengthTotal() const; // will include virtual/nonexistent pixels in matrix
getLengthTotal() const, // will include virtual/nonexistent pixels in matrix
getFps() const,
getMappedPixelIndex(uint16_t index) const;

inline uint16_t getFps() const { return (millis() - _lastShow > 2000) ? 0 : _cumulativeFps +1; } // Returns the refresh rate of the LED strip
inline uint16_t getFrameTime() const { return _frametime; } // returns amount of time a frame should take (in ms)
inline uint16_t getMinShowDelay() const { return MIN_FRAME_DELAY; } // returns minimum amount of time strip.service() can be delayed (constant)
inline uint16_t getLength() const { return _length; } // returns actual amount of LEDs on a strip (2D matrix may have less LEDs than W*H)
inline uint16_t getTransition() const { return _transitionDur; } // returns currently set transition time (in ms)
inline uint16_t getMappedPixelIndex(uint16_t index) const { // convert logical address to physical
if (index < customMappingSize && (realtimeMode == REALTIME_MODE_INACTIVE || realtimeRespectLedMaps)) index = customMappingTable[index];
return index;
};

uint32_t now, timebase;
uint32_t getPixelColor(unsigned) const;
Expand Down
14 changes: 7 additions & 7 deletions wled00/FX_fcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1445,13 +1445,6 @@ void WS2812FX::show() {
}
}

/**
* Returns a true value if any of the strips are still being updated.
* On some hardware (ESP32), strip updates are done asynchronously.
*/
bool WS2812FX::isUpdating() const {
return !BusManager::canAllShow();
}

/**
* Returns the refresh rate of the LED strip. Useful for finding out whether a given setup is fast enough.
Expand Down Expand Up @@ -1857,6 +1850,13 @@ bool WS2812FX::deserializeMap(unsigned n) {
return (customMappingSize > 0);
}

uint16_t IRAM_ATTR WS2812FX::getMappedPixelIndex(uint16_t index) const {
// convert logical address to physical
if (index < customMappingSize
&& (realtimeMode == REALTIME_MODE_INACTIVE || realtimeRespectLedMaps)) index = customMappingTable[index];

return index;
}

WS2812FX* WS2812FX::instance = nullptr;

Expand Down

0 comments on commit b238eae

Please sign in to comment.