![]() |
FastFX
1.1.0
LED Strip Animation and Effects Framework for Arduino
|
#include <FFXFrameProvider.h>
Public Member Functions | |
FFXFrameProvider (FFXSegment *initSegment, CRGB *fdLEDBuffer, CRGB *initFrame) | |
FFXFrameProvider (FFXSegment *initSegment, CRGB *initFrame) | |
FFXFrameProvider (FFXSegment *initSegment) | |
~FFXFrameProvider () | |
CRGB * | getCurrentFrame () |
bool | getCrossFade () |
void | setCrossFade (boolean newValue) |
bool | getCrossFadePref () |
bool | setCrossFadePref (boolean newValue) |
void | checkCrossFade (FFXBase *effect) |
FFXBase::FadeType | getFadeMethodUp () |
FFXBase::FadeType | getFadeMethodDown () |
void | setFadeMethod (FFXBase::FadeType newValueUp, FFXBase::FadeType newValueDown) |
unsigned long | getCrossFadeThreshold () |
uint8_t | getLastBlendSteps () |
uint8_t | getLastBlendAmount () |
void | updateFrame (CRGB *destLEDs, FFXBase *effect) |
void | updateFrame (FFXBase *effect) |
void | getLastFrame (CRGB *destLEDs, uint16_t startIdx, uint16_t endIdx) |
Protected Member Functions | |
void | step (FFXBase *effect) |
CRGB * | getNextFrameBuffer () |
CRGB * | getCurrentFrameBuffer () |
FFXFrameProvider - Controls the fetching of frames that get displayed by the FXController. There are several "modes" of operation that can be utilized:
Direct mode - (Crossfade=false AND constructed with FASTLed framebuffer passed in the constructor)
This is the most efficient usage. It uses a single buffer (CRGB[]) that is passed in the constructor. This is typically the array of CRGB used by fastLED for display and allocates no additional heap.
Indirect modes - Indirect modes use independent buffer(s) where pixel data is written and maintained. This means that each frame is calculated independently from what is in the FastLED display buffer. This can be useful for overlaying or mixing effects.
without crossfade - Uses a single buffer, remains independent of any changes made to the fastLED display buffer. with crossfade - Uses 2 buffers to smooth animated effects. A second buffer is used to "smooth" transitions from frame to frame - uses multiple cycles to blend from the current frame to the next one. The number of blend steps between frames depends on the available time between frames and the FrameViewController will fill as many steps as it can in that time.
FFXFrameProvider::FFXFrameProvider | ( | FFXSegment * | initSegment, |
CRGB * | fdLEDBuffer, | ||
CRGB * | initFrame | ||
) |
|
inline |
|
inline |
|
inline |
void FFXFrameProvider::checkCrossFade | ( | FFXBase * | effect | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
void FFXFrameProvider::getLastFrame | ( | CRGB * | destLEDs, |
uint16_t | startIdx, | ||
uint16_t | endIdx | ||
) |
|
inlineprotected |
void FFXFrameProvider::setCrossFade | ( | boolean | newValue | ) |
|
inline |
|
inline |
|
protected |
void FFXFrameProvider::updateFrame | ( | CRGB * | destLEDs, |
FFXBase * | effect | ||
) |
|
inline |