SBK_BarDrive Library 2.2.0
LED bar meter control and queued animations for Arduino
Loading...
Searching...
No Matches
SBK_BarMeterAnimations< BarMeterT > Class Template Reference

Templated animation controller for SBK_BarMeter<T>. More...

#include <SBK_BarMeterAnimations.h>

Data Structures

struct  QueueEntry
struct  Block

Public Member Functions

 SBK_BarMeterAnimations (BarMeterT &barMeter)
 Construct an animation controller linked to a bar meter.
 ~SBK_BarMeterAnimations ()
void setSegsNum (uint8_t n)
 Set the total number of segments the animation logic should handle.
bool update (uint32_t syncTime=millis())
 Advance the animation logic based on the current millis().
SBK_BarMeterAnimationsanimInit ()
 Mark animation as ready to reinitialize in next update cycle.
SBK_BarMeterAnimationspause (uint32_t syncTime=millis())
 Freeze animation progression and all queue/animation timers.
SBK_BarMeterAnimationsresume (uint32_t syncTime=millis())
 Resume with the same playback time remaining as when paused.
SBK_BarMeterAnimationsstop ()
 Terminate the animation, loop, and queue, then clear mapped pixels.
SBK_BarMeterAnimationsenqueue ()
 Add the currently configured animation to the fixed-capacity queue.
SBK_BarMeterAnimationsenqueueFor (uint32_t duration)
 Queue the configured animation for a fixed amount of time.
SBK_BarMeterAnimationsforTime (uint32_t duration)
 Limit a direct or queued animation to a maximum run time.
SBK_BarMeterAnimationsenqueueReverseAnim ()
 Queue a state-preserving logic reversal of the preceding entry.
SBK_BarMeterAnimationsloopQueue ()
 Repeat the entire queue after its final entry completes.
SBK_BarMeterAnimationsnoLoopQueue ()
 Disable repetition; finish the current queue pass before stopping.
SBK_BarMeterAnimationsstartQueue ()
 Start queued playback using the current queue-loop setting.
SBK_BarMeterAnimationsclearQueue ()
 Discard the queue and disable queue looping without stopping the current animation.
SBK_BarMeterAnimationsskipCurrent ()
 Abandon the active animation and immediately start the next queue entry.
uint8_t queuedAnimations () const
 Return the number of animations waiting behind the active one.
bool isQueueRunning () const
 Return true while an animation queue is being processed.
uint8_t currentQueueIndex () const
 Return the physical queue slot currently playing, or NO_QUEUE_INDEX.
bool isQueueIndexPlaying (uint8_t index) const
 Return true when the requested physical queue slot is currently playing.
bool queueOverflowed () const
 Return true if an enqueue operation exceeded the configured capacity.
SBK_BarMeterAnimationsloop ()
 Set animation to automatically loop when complete.
SBK_BarMeterAnimationsnoLoop ()
 Disable auto-looping.
SBK_BarMeterAnimationssetDir (bool newDirection)
 Explicitly set the animation rendering direction.
SBK_BarMeterAnimationstoggleDir ()
 Toggle the current animation rendering direction.
SBK_BarMeterAnimationsreverseDir ()
 Reverse the rendering direction compared to the original one.
SBK_BarMeterAnimationsresetDir ()
 Reset direction to the original setting.
SBK_BarMeterAnimationssetLogic (bool newLogic)
 Set rendering logic (true = inverted logic, false = normal logic), example fill logic become empty logic.
SBK_BarMeterAnimationstoggleLogic ()
 Toggle rendering logic (inverted vs normal), example fill logic become empty logic.
SBK_BarMeterAnimationsinvertLogic ()
 Reverse logic compared to initial state Logic refer to behavior, example : fill/empty, exploding/colliding, etc.
SBK_BarMeterAnimationsresetLogic ()
 Reset logic to initial (default) value.
SBK_BarMeterAnimationsstopBlockEmission ()
 Stop emitting new blocks during compatible block animations.
SBK_BarMeterAnimationsresumeBlockEmission ()
 Resume emitting new blocks during compatible block animations.
SBK_BarMeterAnimationsstopBlockEmissionAfter (uint32_t duration)
 Stop new block emission after an animation has run for a duration.
bool isRunning () const
 Query if animation is currently active.
bool isPaused () const
 Query if animation is paused.
bool isLoopEnabled () const
 Query if animation loop is enabled.
SBK_BarMeterAnimationssetUpdateInterval (uint16_t interval)
 Change the primary update interval without restarting the animation.
bool animPendingLoop ()
 Detect whether animation has completed and is about to loop.
bool isLogicInverted ()
 Returns true if current logic is different from original logic.
bool isNonInvertingLogicAnim ()
 Return true if the current animation does not support logic inversion.
bool isDirectionReversed ()
 Returns true if direction is reversed compared to the original.
bool isBlockEmissionEnabled () const
 Query if block emission is enabled.
SBK_BarMeterAnimationssetAll (bool onff)
 Set all pixels to the specified state.
SBK_BarMeterAnimationssetAllOn ()
 Set all pixels ON.
SBK_BarMeterAnimationssetAllOff ()
 Set all pixels OFF.
SBK_BarMeterAnimationswait (uint16_t duration)
 Wait without blocking or changing pixel states; waits never loop.
SBK_BarMeterAnimationsblinkPixel (uint8_t index, uint16_t interval=500, uint8_t blinkCount=0)
 Blink one pixel with equal ON and OFF intervals.
SBK_BarMeterAnimationsblinkPixel (uint8_t index, uint16_t onInterval, uint16_t offInterval, uint8_t blinkCount)
 Blink one pixel with independent ON and OFF intervals.
SBK_BarMeterAnimationsfillUpDur (uint16_t duration, uint8_t maxPercent=100, uint8_t minPercent=0)
 Start animation that fills the bar upwards over a specified duration.
SBK_BarMeterAnimationsfillUpIntv (uint16_t updateIntv, const uint8_t *maxPercentPtr, const uint8_t *minPercentPtr=nullptr)
 Start animation that fills the bar upwards at a fixed interval with live percent tracking.
SBK_BarMeterAnimationsfillUpIntv (uint16_t updateIntv, uint8_t maxPercent=100, uint8_t minPercent=0)
 Start animation that fills the bar upwards at a fixed interval.
SBK_BarMeterAnimationsfillDownDur (uint16_t duration, uint8_t maxPercent=100, uint8_t minPercent=0)
 Start animation that fills the bar downwards over a specified duration.
SBK_BarMeterAnimationsfillDownIntv (uint16_t updateIntv, const uint8_t *maxPercentPtr, const uint8_t *minPercentPtr=nullptr)
 Start animation that fills the bar downwards at a fixed interval with live percent tracking.
SBK_BarMeterAnimationsfillDownIntv (uint16_t updateIntv, uint8_t maxPercent=100, uint8_t minPercent=0)
 Start animation that fills the bar downwards at a fixed interval.
SBK_BarMeterAnimationsemptyDownDur (uint16_t duration, uint8_t maxPercent=100, uint8_t minPercent=0)
 Start animation that empties the bar from top to bottom over a duration.
SBK_BarMeterAnimationsemptyDownIntv (uint16_t updateIntv, const uint8_t *maxPercentPtr, const uint8_t *minPercentPtr=nullptr)
 Start animation that empties the bar from top to bottom at fixed intervals with live range.
SBK_BarMeterAnimationsemptyDownIntv (uint16_t updateIntv, uint8_t maxPercent=100, uint8_t minPercent=0)
 Start animation that empties the bar from top to bottom at fixed intervals.
SBK_BarMeterAnimationsemptyUpDur (uint16_t duration, uint8_t maxPercent=100, uint8_t minPercent=0)
 Start animation that empties the bar from bottom to top over a duration.
SBK_BarMeterAnimationsemptyUpIntv (uint16_t updateIntv, const uint8_t *maxPercentPtr, const uint8_t *minPercentPtr=nullptr)
 Start animation that empties the bar from bottom to top at fixed intervals with live range.
SBK_BarMeterAnimationsemptyUpIntv (uint16_t updateIntv, uint8_t maxPercent=100, uint8_t minPercent=0)
 Start animation that empties the bar from bottom to top at fixed intervals.
SBK_BarMeterAnimationsbounceFillUpDur (uint16_t duration, uint8_t maxPercent=100, uint8_t minPercent=0, uint16_t fillIntv=0)
 Start animation that fills/empties (bounces) bar upward with fixed range.
SBK_BarMeterAnimationsbounceFillUpIntv (uint16_t fillIntv, uint16_t emptyIntv, const uint8_t *maxPercentPtr, const uint8_t *minPercentPtr=nullptr)
 Start animation that fills/empties (bounces) bar upward with live range.
SBK_BarMeterAnimationsbounceFillUpIntv (uint16_t fillIntv=10, uint16_t emptyIntv=10, uint8_t maxPercent=100, uint8_t minPercent=0)
 Start animation that fills/empties (bounces) bar upward with fixed range.
SBK_BarMeterAnimationsbounceFillDownDur (uint16_t duration, uint8_t maxPercent=100, uint8_t minPercent=0, uint16_t fillIntv=0)
 Start animation that fills/empties (bounces) bar downward.
SBK_BarMeterAnimationsbounceFillDownIntv (uint16_t fillIntv, uint16_t emptyIntv, const uint8_t *maxPercentPtr, const uint8_t *minPercentPtr=nullptr)
 Start downward fill/empty (bounce) with live percent range tracking.
SBK_BarMeterAnimationsbounceFillDownIntv (uint16_t fillIntv=10, uint16_t emptyIntv=10, uint8_t maxPercent=100, uint8_t minPercent=0)
 Start downwardfill/empty (bounce) with fixed percent range.
SBK_BarMeterAnimationsbounceFillFromCenterDur (uint16_t duration, uint8_t maxPercent=100, uint8_t minPercent=0, uint16_t fillIntv=0)
 Bounce fill from center outward with fixed range.
SBK_BarMeterAnimationsbounceFillFromCenterIntv (uint16_t fillIntv, uint16_t emptyIntv, const uint8_t *maxPercentPtr, const uint8_t *minPercentPtr=nullptr)
 Bounce fill from center outward with live percent range tracking.
SBK_BarMeterAnimationsbounceFillFromCenterIntv (uint16_t fillIntv=25, uint16_t emptyIntv=25, uint8_t maxPercent=100, uint8_t minPercent=0)
 Bounce fill from center outward with fixed range.
SBK_BarMeterAnimationsbounceFillFromEdgesDur (uint16_t duration, uint8_t maxPercent=100, uint8_t minPercent=0, uint16_t fillIntv=0)
 Bounce fill from both edges inward with fixed range.
SBK_BarMeterAnimationsbounceFillFromEdgesIntv (uint16_t fillIntv, uint16_t emptyIntv, const uint8_t *maxPercentPtr, const uint8_t *minPercentPtr=nullptr)
 Bounce fill from both edges inward with live percent range tracking.
SBK_BarMeterAnimationsbounceFillFromEdgesIntv (uint16_t fillIntv=25, uint16_t emptyIntv=25, uint8_t maxPercent=100, uint8_t minPercent=0)
 Bounce fill from both edges inward with fix range.
SBK_BarMeterAnimationsbeatPulse (uint8_t *bpmPtr)
 Start a beat pulse animation synchronized to a live BPM value.
SBK_BarMeterAnimationsbeatPulse (uint8_t bpm=116)
 Start a beat pulse animation synchronized to a constant BPM.
SBK_BarMeterAnimationsexplodingBlocks (uint16_t intv=50, uint8_t blockLength=2, uint8_t blockSpacing=1, uint8_t numBlocks=0)
 Emit mirrored blocks from center outward.
SBK_BarMeterAnimationscollidingBlocks (uint16_t intv=50, uint8_t blockLength=2, uint8_t blockSpacing=1, uint8_t numBlocks=0)
 Emit mirrored blocks from edge to center.
SBK_BarMeterAnimationsscrollingUpBlocks (uint16_t intv=50, uint8_t blockLength=2, uint8_t blockSpacing=1, uint8_t numBlocks=0)
 Scroll blocks upward.
SBK_BarMeterAnimationsscrollingDownBlocks (uint16_t intv=50, uint8_t blockLength=2, uint8_t blockSpacing=1, uint8_t numBlocks=0)
 Scroll blocks downward.
SBK_BarMeterAnimationsdownStackingBlocks (uint16_t intv=50, uint8_t blockLength=1, uint8_t blockSpacing=0)
 Drop blocks from top and stack from bottom up.
SBK_BarMeterAnimationsupUnstackingBlocks (uint16_t intv=50, uint8_t blockLength=1, uint8_t blockSpacing=0)
 Launch blocks upward and unstack from top.
SBK_BarMeterAnimationsupStackingBlocks (uint16_t intv=50, uint8_t blockLength=1, uint8_t blockSpacing=0)
 Launch blocks from bottom and stack at the top.
SBK_BarMeterAnimationsdownUnstackingBlocks (uint16_t intv=50, uint8_t blockLength=1, uint8_t blockSpacing=0)
 Drop blocks from top and unstack from bottom up.
SBK_BarMeterAnimationsfollowSignalSmooth (const uint16_t *sigPtr, uint16_t updateIntv=100, uint16_t minMap=0, uint16_t maxMap=1023, uint8_t smoothingFactor=30, uint16_t samplingIntv=5)
 Follow analog signal with smoothing for fill animation.
SBK_BarMeterAnimationsfollowSignalWithPointer (const uint16_t *sigPtr, uint16_t updateIntv=100, uint16_t minMap=0, uint16_t maxMap=1023, uint8_t smoothingFactor=30, uint16_t samplingIntv=5)
 Follow signal with smoothing and display a pointer.
SBK_BarMeterAnimationsfollowDualSignalFromCenter (const uint16_t *sig1Ptr, uint16_t updateIntv=100, const uint16_t *sig2Ptr=nullptr, uint16_t minMap=0, uint16_t maxMap=1023, uint8_t smoothingFactor=30, uint16_t samplingIntv=5)
 Smoothly fills the lower half and upper half of the bar meter independently from center, based on two signal levels.
SBK_BarMeterAnimationsfollowDualSignalFromEdges (const uint16_t *sig1Ptr, uint16_t updateIntv=100, const uint16_t *sig2Ptr=nullptr, uint16_t minMap=0, uint16_t maxMap=1023, uint8_t smoothingFactor=30, uint16_t samplingIntv=5)
 Smoothly fills the lower half and upper half of the bar meter independently from center, based on two signal levels.
SBK_BarMeterAnimationsfollowSignalFloatingPeak (const uint16_t *sigPtr, uint8_t peakHoldTime=20, uint16_t updateIntv=100, uint16_t minMap=0, uint16_t maxMap=1023, uint8_t smoothingFactor=30, uint16_t samplingIntv=5)
 Follow an analog signal with smoothing and floating peak indicator.
SBK_BarMeterAnimationsrandomFill (uint16_t interval=30)
 Randomly light up pixels until the bar is full.
SBK_BarMeterAnimationsrandomEmpty (uint16_t interval=30)
 Randomly turn off pixels until the bar is empty.

Static Public Attributes

static constexpr uint8_t NO_QUEUE_INDEX = 0xFF

Protected Types

using AnimUpdateFn = bool (SBK_BarMeterAnimations::*)()

Protected Member Functions

void _captureQueueEntry (QueueEntry &entry, bool resetRuntimeState, uint32_t duration)
void _loadQueueEntry (const QueueEntry &entry, bool forceReset=false)
void _startNextQueuedAnimation (bool forceReset=false)
void _initializeStorage ()
uint8_t * _randomOrder ()
void _resetBlocks (uint8_t &blockCapacity)
const uint8_t * _percentMaxPtr () const
const uint8_t * _percentMinPtr () const
const uint8_t * _liveBpmPtr () const
const uint16_t * _signalPtr1 () const
const uint16_t * _signalPtr2 () const
void _mapMinMaxTrackerFromPtr (const uint8_t *minPercPtr, const uint8_t *maxPercPtr, int8_t minR, uint8_t maxR)
void _mapMinMaxTracker (uint8_t minP, uint8_t maxP, uint8_t minR, uint8_t maxR)
uint8_t _corrPixelToDir (uint8_t pixel)
uint8_t _corrPixelToDirForHalfRange (uint8_t pixel)
bool _setAllOn ()
bool _setAllOff ()
bool _wait ()
bool _blinkPixel ()
bool _fillOrEmpty ()
bool _bounceFill ()
bool _fillFromOrEmptyToCenter ()
bool _bounceFillHalfRangeMirrorCenter ()
bool _beatPulse ()
bool _beatPulseLive ()
void _emitBlock (int8_t pos)
int8_t _calculateSwitchedEmitTickCounter (uint8_t range)
bool _mirrorBlocks ()
bool _scrollingBlocks ()
bool _stackingBlocks ()
bool _followSignalSmooth ()
bool _followSignalWithPointer ()
bool _followDualSignalCenterMirror ()
bool _followSignalFloatingPeak ()
bool _randomPixelUpdater ()

Static Protected Member Functions

template<typename A, typename B>
static auto _minValue (A a, B b) -> decltype(true ? A() :B())
template<typename A, typename B>
static auto _maxValue (A a, B b) -> decltype(true ? A() :B())
static void _normalizePercentRange (uint8_t &minP, uint8_t &maxP)
static void _correctSwapOrEqualMinMax (uint16_t &minVal, uint16_t &maxVal)
static uint8_t _getMappedSignal (uint16_t sig, uint16_t minM, uint16_t maxM, uint8_t minR, uint8_t maxR)
static int8_t _calculateSwitchPosition (int8_t pos, uint8_t blockL, uint8_t range)

Protected Attributes

BarMeterT & _barMeter
uint8_t _segsNum = 0
AnimUpdateFn _currentFunc = nullptr
QueueEntry _queue [QUEUE_CAPACITY]
uint8_t _queueHead = 0
uint8_t _queueTail = 0
uint8_t _queueCount = 0
uint8_t _queueStoredCount = 0
uint8_t _queueStart = 0
bool _queueLoop = false
uint8_t _currentQueueIndex = NO_QUEUE_INDEX
bool _queueActive = false
bool _queueOverflow = false
uint32_t _queueEntryDuration = 0
uint32_t _queueEntryStartedAt = 0
uint32_t _activeBlockEmissionStopAfter = 0
bool _queueEntryTimingPending = false
bool _init = true
bool _isRunning = false
bool _isPaused = false
bool _loop = false
bool _isLoopingNow = false
bool _AnimInitLogicIsInverted = false
bool _animRenderLogicIsInverted = false
bool _prevAnimRenderLogic = false
bool _isNonInvertingLogicAnim = false
bool _mirrorHalfRangeDir = false
bool _animLogicSet = false
bool _skipPending = false
bool _animRenderDirIsReversed = false
bool _AnimInitDirIsReversed = false
bool _animDirSet = false
bool _usePtr = false
bool _emittingBlocksEnabled = true
uint32_t _animationDuration = 0
uint32_t _blockEmissionStopAfter = 0
uint32_t _currentTime = 0
uint32_t _pausedAt = 0
uint32_t _pausedTime = 0
uint32_t _lastUpdate1 = 0
uint32_t _lastUpdate2 = 0
uint32_t _lastUpdate3 = 0
uint16_t _updateIntv1 = 10
uint16_t _updateIntv2 = 10
uint16_t _updateIntv3 = 10
uint8_t _sequenceState = 0
int8_t _ledTracker1 = 0
int8_t _ledTracker2 = 0
int8_t _ledTracker3 = 0
int8_t _minTracker = 0
int8_t _maxTracker = 1
uint8_t _param1 = 0
uint8_t _param2 = 0
uint8_t _param3 = 0
uint8_t _param4 = 0
uint8_t _param5 = 0
uint16_t _smoothedValue1 = 0
uint16_t _smoothedValue2 = 0
uint16_t _minMap = 0
uint16_t _maxMap = 1023
uint8_t _counter1 = 0
uint8_t _counter2 = 0
const void * _valuePtr1 = nullptr
const void * _valuePtr2 = nullptr
Block_animationWorkspace = nullptr
uint8_t _segmentCapacity = 0
uint8_t _blockCapacity = 0
uint8_t _randomCursor = 0

Static Protected Attributes

static constexpr uint8_t QUEUE_CAPACITY = 4
static constexpr uint8_t MAX_BLOCK_CAPACITY = 64

Detailed Description

template<typename BarMeterT>
class SBK_BarMeterAnimations< BarMeterT >

Templated animation controller for SBK_BarMeter<T>.

This class encapsulates timing logic, block emission, bouncing effects, signal smoothing, and beat-based animations for bar meters. Chainable API makes integration in update loops easy.

Template Parameters
BarMeterTA specific SBK_BarMeter<DriverT> instance

Definition at line 58 of file SBK_BarMeterAnimations.h.

Member Typedef Documentation

◆ AnimUpdateFn

template<typename BarMeterT>
using SBK_BarMeterAnimations< BarMeterT >::AnimUpdateFn = bool (SBK_BarMeterAnimations::*)()
protected

Definition at line 1789 of file SBK_BarMeterAnimations.h.

Constructor & Destructor Documentation

◆ SBK_BarMeterAnimations()

template<typename BarMeterT>
SBK_BarMeterAnimations< BarMeterT >::SBK_BarMeterAnimations ( BarMeterT & barMeter)
inlineexplicit

Construct an animation controller linked to a bar meter.

Parameters
barMeterReference to the associated SBK_BarMeter instance.

Definition at line 67 of file SBK_BarMeterAnimations.h.

References _barMeter, and _initializeStorage().

Referenced by animInit(), beatPulse(), beatPulse(), blinkPixel(), blinkPixel(), bounceFillDownDur(), bounceFillDownIntv(), bounceFillDownIntv(), bounceFillFromCenterDur(), bounceFillFromCenterIntv(), bounceFillFromCenterIntv(), bounceFillFromEdgesDur(), bounceFillFromEdgesIntv(), bounceFillFromEdgesIntv(), bounceFillUpDur(), bounceFillUpIntv(), bounceFillUpIntv(), clearQueue(), collidingBlocks(), downStackingBlocks(), downUnstackingBlocks(), emptyDownDur(), emptyDownIntv(), emptyDownIntv(), emptyUpDur(), emptyUpIntv(), emptyUpIntv(), enqueue(), enqueueFor(), enqueueReverseAnim(), explodingBlocks(), fillDownDur(), fillDownIntv(), fillDownIntv(), fillUpDur(), fillUpIntv(), fillUpIntv(), followDualSignalFromCenter(), followDualSignalFromEdges(), followSignalFloatingPeak(), followSignalSmooth(), followSignalWithPointer(), forTime(), invertLogic(), loop(), loopQueue(), noLoop(), noLoopQueue(), pause(), randomEmpty(), randomFill(), resetDir(), resetLogic(), resume(), resumeBlockEmission(), reverseDir(), scrollingDownBlocks(), scrollingUpBlocks(), setAll(), setAllOff(), setAllOn(), setDir(), setLogic(), setUpdateInterval(), skipCurrent(), startQueue(), stop(), stopBlockEmission(), stopBlockEmissionAfter(), toggleDir(), toggleLogic(), upStackingBlocks(), upUnstackingBlocks(), and wait().

◆ ~SBK_BarMeterAnimations()

template<typename BarMeterT>
SBK_BarMeterAnimations< BarMeterT >::~SBK_BarMeterAnimations ( )
inline

Definition at line 72 of file SBK_BarMeterAnimations.h.

References _animationWorkspace.

Member Function Documentation

◆ _beatPulse()

◆ _beatPulseLive()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_beatPulseLive ( )
inlineprotected

Definition at line 2514 of file SBK_BarMeterAnimations.h.

References _beatPulse(), _maxValue(), beat, bpm, and bpmPtr.

Referenced by beatPulse().

◆ _blinkPixel()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_blinkPixel ( )
inlineprotected

◆ _bounceFill()

◆ _bounceFillHalfRangeMirrorCenter()

◆ _calculateSwitchedEmitTickCounter()

template<typename BarMeterT>
int8_t SBK_BarMeterAnimations< BarMeterT >::_calculateSwitchedEmitTickCounter ( uint8_t range)
inlineprotected

◆ _calculateSwitchPosition()

template<typename BarMeterT>
int8_t SBK_BarMeterAnimations< BarMeterT >::_calculateSwitchPosition ( int8_t pos,
uint8_t blockL,
uint8_t range )
inlinestaticprotected

Definition at line 2571 of file SBK_BarMeterAnimations.h.

Referenced by _calculateSwitchedEmitTickCounter().

◆ _captureQueueEntry()

template<typename BarMeterT>
void SBK_BarMeterAnimations< BarMeterT >::_captureQueueEntry ( QueueEntry & entry,
bool resetRuntimeState,
uint32_t duration )
inlineprotected

Definition at line 1885 of file SBK_BarMeterAnimations.h.

References _animDirSet, _AnimInitDirIsReversed, _AnimInitLogicIsInverted, _animLogicSet, _animRenderDirIsReversed, _animRenderLogicIsInverted, _blockEmissionStopAfter, _currentFunc, _emittingBlocksEnabled, _isNonInvertingLogicAnim, _loop, _maxMap, _maxTracker, _minMap, _minTracker, _mirrorHalfRangeDir, _param1, _param2, _param3, _param4, _param5, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animDirSet, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animInitDirIsReversed, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animInitLogicIsInverted, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animLogicSet, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animRenderDirIsReversed, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animRenderLogicIsInverted, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::blockEmissionStopAfter, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::duration, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::emittingBlocksEnabled, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::function, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::isNonInvertingLogicAnim, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::loop, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::maxMap, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::maxTracker, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::minMap, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::minTracker, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::mirrorHalfRangeDir, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::param1, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::param2, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::param3, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::param4, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::param5, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::resetRuntimeState, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::updateIntv1, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::updateIntv2, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::updateIntv3, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::usePtr, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::valuePtr1, and SBK_BarMeterAnimations< BarMeterT >::QueueEntry::valuePtr2.

Referenced by enqueue(), and enqueueFor().

◆ _correctSwapOrEqualMinMax()

template<typename BarMeterT>
void SBK_BarMeterAnimations< BarMeterT >::_correctSwapOrEqualMinMax ( uint16_t & minVal,
uint16_t & maxVal )
inlinestaticprotected

◆ _corrPixelToDir()

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_corrPixelToDir ( uint8_t pixel)
inlineprotected

◆ _corrPixelToDirForHalfRange()

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_corrPixelToDirForHalfRange ( uint8_t pixel)
inlineprotected

Definition at line 2097 of file SBK_BarMeterAnimations.h.

References _mirrorHalfRangeDir, and _segsNum.

Referenced by _fillFromOrEmptyToCenter().

◆ _emitBlock()

◆ _fillFromOrEmptyToCenter()

◆ _fillOrEmpty()

◆ _followDualSignalCenterMirror()

◆ _followSignalFloatingPeak()

◆ _followSignalSmooth()

◆ _followSignalWithPointer()

◆ _getMappedSignal()

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_getMappedSignal ( uint16_t sig,
uint16_t minM,
uint16_t maxM,
uint8_t minR,
uint8_t maxR )
inlinestaticprotected

◆ _initializeStorage()

template<typename BarMeterT>
void SBK_BarMeterAnimations< BarMeterT >::_initializeStorage ( )
inlineprotected

◆ _liveBpmPtr()

template<typename BarMeterT>
const uint8_t * SBK_BarMeterAnimations< BarMeterT >::_liveBpmPtr ( ) const
inlineprotected

Definition at line 2073 of file SBK_BarMeterAnimations.h.

References _valuePtr1.

◆ _loadQueueEntry()

template<typename BarMeterT>
void SBK_BarMeterAnimations< BarMeterT >::_loadQueueEntry ( const QueueEntry & entry,
bool forceReset = false )
inlineprotected

Definition at line 1919 of file SBK_BarMeterAnimations.h.

References _activeBlockEmissionStopAfter, _animDirSet, _AnimInitDirIsReversed, _AnimInitLogicIsInverted, _animLogicSet, _animRenderDirIsReversed, _animRenderLogicIsInverted, _counter1, _counter2, _currentFunc, _currentTime, _emittingBlocksEnabled, _init, _isLoopingNow, _isNonInvertingLogicAnim, _isRunning, _lastUpdate1, _lastUpdate2, _lastUpdate3, _ledTracker1, _ledTracker2, _ledTracker3, _loop, _maxMap, _maxTracker, _minMap, _minTracker, _mirrorHalfRangeDir, _param1, _param2, _param3, _param4, _param5, _prevAnimRenderLogic, _queueEntryDuration, _queueEntryTimingPending, _sequenceState, _skipPending, _smoothedValue1, _smoothedValue2, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animDirSet, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animInitDirIsReversed, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animInitLogicIsInverted, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animLogicSet, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animRenderDirIsReversed, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animRenderLogicIsInverted, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::blockEmissionStopAfter, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::duration, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::emittingBlocksEnabled, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::function, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::isNonInvertingLogicAnim, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::loop, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::maxMap, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::maxTracker, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::minMap, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::minTracker, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::mirrorHalfRangeDir, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::param1, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::param2, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::param3, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::param4, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::param5, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::resetRuntimeState, resume(), SBK_BarMeterAnimations< BarMeterT >::QueueEntry::updateIntv1, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::updateIntv2, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::updateIntv3, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::usePtr, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::valuePtr1, and SBK_BarMeterAnimations< BarMeterT >::QueueEntry::valuePtr2.

Referenced by _startNextQueuedAnimation().

◆ _mapMinMaxTracker()

◆ _mapMinMaxTrackerFromPtr()

template<typename BarMeterT>
void SBK_BarMeterAnimations< BarMeterT >::_mapMinMaxTrackerFromPtr ( const uint8_t * minPercPtr,
const uint8_t * maxPercPtr,
int8_t minR,
uint8_t maxR )
inlineprotected

◆ _maxValue()

◆ _minValue()

template<typename BarMeterT>
template<typename A, typename B>
auto SBK_BarMeterAnimations< BarMeterT >::_minValue ( A a,
B b ) -> decltype(true ? A() :B())
inlinestaticprotected

◆ _mirrorBlocks()

◆ _normalizePercentRange()

template<typename BarMeterT>
void SBK_BarMeterAnimations< BarMeterT >::_normalizePercentRange ( uint8_t & minP,
uint8_t & maxP )
inlinestaticprotected

Definition at line 2053 of file SBK_BarMeterAnimations.h.

Referenced by _mapMinMaxTracker(), and _mapMinMaxTrackerFromPtr().

◆ _percentMaxPtr()

template<typename BarMeterT>
const uint8_t * SBK_BarMeterAnimations< BarMeterT >::_percentMaxPtr ( ) const
inlineprotected

◆ _percentMinPtr()

template<typename BarMeterT>
const uint8_t * SBK_BarMeterAnimations< BarMeterT >::_percentMinPtr ( ) const
inlineprotected

◆ _randomOrder()

template<typename BarMeterT>
uint8_t * SBK_BarMeterAnimations< BarMeterT >::_randomOrder ( )
inlineprotected

Definition at line 2021 of file SBK_BarMeterAnimations.h.

References _animationWorkspace.

Referenced by _randomPixelUpdater().

◆ _randomPixelUpdater()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_randomPixelUpdater ( )
inlineprotected

◆ _resetBlocks()

template<typename BarMeterT>
void SBK_BarMeterAnimations< BarMeterT >::_resetBlocks ( uint8_t & blockCapacity)
inlineprotected

◆ _scrollingBlocks()

◆ _setAllOff()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_setAllOff ( )
inlineprotected

◆ _setAllOn()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_setAllOn ( )
inlineprotected

Definition at line 2133 of file SBK_BarMeterAnimations.h.

References _barMeter, _init, and _segsNum.

Referenced by _randomPixelUpdater(), and setAllOn().

◆ _signalPtr1()

template<typename BarMeterT>
const uint16_t * SBK_BarMeterAnimations< BarMeterT >::_signalPtr1 ( ) const
inlineprotected

◆ _signalPtr2()

template<typename BarMeterT>
const uint16_t * SBK_BarMeterAnimations< BarMeterT >::_signalPtr2 ( ) const
inlineprotected

Definition at line 2075 of file SBK_BarMeterAnimations.h.

References _valuePtr2.

Referenced by _followDualSignalCenterMirror().

◆ _stackingBlocks()

◆ _startNextQueuedAnimation()

template<typename BarMeterT>
void SBK_BarMeterAnimations< BarMeterT >::_startNextQueuedAnimation ( bool forceReset = false)
inlineprotected

◆ _wait()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_wait ( )
inlineprotected

Definition at line 2147 of file SBK_BarMeterAnimations.h.

References _currentTime, _init, _lastUpdate1, and _updateIntv1.

Referenced by loop(), and wait().

◆ animInit()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::animInit ( )
inline

Mark animation as ready to reinitialize in next update cycle.

Definition at line 174 of file SBK_BarMeterAnimations.h.

References _init, and SBK_BarMeterAnimations().

◆ animPendingLoop()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::animPendingLoop ( )
inline

Detect whether animation has completed and is about to loop.

Definition at line 602 of file SBK_BarMeterAnimations.h.

References _isLoopingNow, and _skipPending.

◆ beatPulse() [1/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::beatPulse ( uint8_t * bpmPtr)
inline

Start a beat pulse animation synchronized to a live BPM value.

Parameters
bpmPtrPointer to a variable holding the BPM value.
Returns
Reference to this animation instance.

Definition at line 1348 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _beatPulseLive(), _currentFunc, _init, _isNonInvertingLogicAnim, _isRunning, _maxValue(), _minValue(), _param2, _param3, _param4, _segsNum, _updateIntv1, _usePtr, _valuePtr1, bpmPtr, and SBK_BarMeterAnimations().

◆ beatPulse() [2/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::beatPulse ( uint8_t bpm = 116)
inline

Start a beat pulse animation synchronized to a constant BPM.

Parameters
bpmBeats per minute. Default is 116.
Returns
Reference to this animation instance.

Definition at line 1371 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _beatPulse(), _currentFunc, _init, _isNonInvertingLogicAnim, _isRunning, _maxValue(), _minValue(), _param1, _param2, _param3, _param4, _segsNum, _updateIntv1, _usePtr, _valuePtr1, bpm, and SBK_BarMeterAnimations().

◆ blinkPixel() [1/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::blinkPixel ( uint8_t index,
uint16_t interval = 500,
uint8_t blinkCount = 0 )
inline

Blink one pixel with equal ON and OFF intervals.

Parameters
indexZero-based logical pixel index.
intervalON and OFF duration in milliseconds.
blinkCountNumber of complete blinks, or 0 to blink until stopped.

Definition at line 690 of file SBK_BarMeterAnimations.h.

References blinkPixel(), and SBK_BarMeterAnimations().

Referenced by blinkPixel().

◆ blinkPixel() [2/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::blinkPixel ( uint8_t index,
uint16_t onInterval,
uint16_t offInterval,
uint8_t blinkCount )
inline

Blink one pixel with independent ON and OFF intervals.

Parameters
indexZero-based logical pixel index.
onIntervalON duration in milliseconds.
offIntervalOFF duration in milliseconds.
blinkCountNumber of complete blinks, or 0 to blink until stopped.

Definition at line 702 of file SBK_BarMeterAnimations.h.

References _blinkPixel(), _currentFunc, _init, _isNonInvertingLogicAnim, _isRunning, _maxValue(), _param1, _param2, _updateIntv1, _updateIntv2, _usePtr, and SBK_BarMeterAnimations().

◆ bounceFillDownDur()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::bounceFillDownDur ( uint16_t duration,
uint8_t maxPercent = 100,
uint8_t minPercent = 0,
uint16_t fillIntv = 0 )
inline

Start animation that fills/empties (bounces) bar downward.

Parameters
durationTotal time in milliseconds for full bounce cycle.
maxPercentMaximum fill percentage fill range. Default is 100.
minPercentMinimum fill percentage fill range. Default is 0.
fillIntvOptional interval override for the fill phase. Default is 0 (auto).
Returns
Reference to this animation instance.

Definition at line 1078 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _bounceFill(), _currentFunc, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxTracker, _maxValue(), _minTracker, _segsNum, _sequenceState, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ bounceFillDownIntv() [1/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::bounceFillDownIntv ( uint16_t fillIntv,
uint16_t emptyIntv,
const uint8_t * maxPercentPtr,
const uint8_t * minPercentPtr = nullptr )
inline

Start downward fill/empty (bounce) with live percent range tracking.

Parameters
fillIntvFill interval in ms.
emptyIntvEmpty interval in ms.
maxPercentPtrPointer to max percent fill range.
minPercentPtrPointer to min percent fill range. Default is nullptr.
Returns
Reference to this animation instance.

Definition at line 1115 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _bounceFill(), _currentFunc, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTrackerFromPtr(), _maxValue(), _percentMaxPtr(), _percentMinPtr(), _segsNum, _sequenceState, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ bounceFillDownIntv() [2/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::bounceFillDownIntv ( uint16_t fillIntv = 10,
uint16_t emptyIntv = 10,
uint8_t maxPercent = 100,
uint8_t minPercent = 0 )
inline

Start downwardfill/empty (bounce) with fixed percent range.

Parameters
fillIntvFill interval in ms. Default is 10.
emptyIntvEmpty interval in ms. Default is 10.
maxPercentMaximum fill percent. Default is 100.
minPercentMinimum fill percent. Default is 0.
Returns
Reference to this animation instance.

Definition at line 1141 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _bounceFill(), _currentFunc, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxValue(), _segsNum, _sequenceState, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ bounceFillFromCenterDur()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::bounceFillFromCenterDur ( uint16_t duration,
uint8_t maxPercent = 100,
uint8_t minPercent = 0,
uint16_t fillIntv = 0 )
inline

Bounce fill from center outward with fixed range.

Parameters
durationTotal time in milliseconds for full bounce cycle.
maxPercentMaximum fill percentage fill range. Default is 100.
minPercentMinimum fill percentage fill range. Default is 0.
fillIntvOptional interval override for the fill phase. Default is 0 (auto).
Returns
Reference to this animation instance.

Definition at line 1167 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _bounceFillHalfRangeMirrorCenter(), _currentFunc, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxTracker, _maxValue(), _minTracker, _mirrorHalfRangeDir, _segsNum, _sequenceState, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ bounceFillFromCenterIntv() [1/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::bounceFillFromCenterIntv ( uint16_t fillIntv,
uint16_t emptyIntv,
const uint8_t * maxPercentPtr,
const uint8_t * minPercentPtr = nullptr )
inline

Bounce fill from center outward with live percent range tracking.

Parameters
fillIntvFill interval in ms.
emptyIntvEmpty interval in ms.
maxPercentPtrPointer to max percent fill range.
minPercentPtrPointer to min percent fill range. Default is nullptr.
Returns
Reference to this animation instance.

Definition at line 1205 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _bounceFillHalfRangeMirrorCenter(), _currentFunc, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTrackerFromPtr(), _mirrorHalfRangeDir, _segsNum, _sequenceState, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ bounceFillFromCenterIntv() [2/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::bounceFillFromCenterIntv ( uint16_t fillIntv = 25,
uint16_t emptyIntv = 25,
uint8_t maxPercent = 100,
uint8_t minPercent = 0 )
inline

Bounce fill from center outward with fixed range.

Parameters
fillIntvFill interval in ms. Default is 25.
emptyIntvEmpty interval in ms. Default is 25.
maxPercentMaximum range percent to animate. Default is 100.
minPercentMinimum range percent to animate. Default is 0.
Returns
Reference to this animation instance.

Definition at line 1232 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _bounceFillHalfRangeMirrorCenter(), _currentFunc, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _mirrorHalfRangeDir, _segsNum, _sequenceState, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ bounceFillFromEdgesDur()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::bounceFillFromEdgesDur ( uint16_t duration,
uint8_t maxPercent = 100,
uint8_t minPercent = 0,
uint16_t fillIntv = 0 )
inline

Bounce fill from both edges inward with fixed range.

Parameters
durationTotal time in milliseconds for full bounce cycle.
maxPercentMaximum fill percentage fill range. Default is 100.
minPercentMinimum fill percentage fill range. Default is 0.
fillIntvOptional interval override for the fill phase. Default is 0 (auto).
Returns
Reference to this animation instance.

Definition at line 1259 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _bounceFillHalfRangeMirrorCenter(), _currentFunc, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxTracker, _maxValue(), _minTracker, _mirrorHalfRangeDir, _segsNum, _sequenceState, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ bounceFillFromEdgesIntv() [1/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::bounceFillFromEdgesIntv ( uint16_t fillIntv,
uint16_t emptyIntv,
const uint8_t * maxPercentPtr,
const uint8_t * minPercentPtr = nullptr )
inline

Bounce fill from both edges inward with live percent range tracking.

Parameters
fillIntvFill interval in ms.
emptyIntvEmpty interval in ms.
maxPercentPtrPointer to max percent fill range.
minPercentPtrPointer to min percent fill range. Default is nullptr.
Returns
Reference to this animation instance.

Definition at line 1297 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _bounceFillHalfRangeMirrorCenter(), _currentFunc, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTrackerFromPtr(), _mirrorHalfRangeDir, _segsNum, _sequenceState, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ bounceFillFromEdgesIntv() [2/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::bounceFillFromEdgesIntv ( uint16_t fillIntv = 25,
uint16_t emptyIntv = 25,
uint8_t maxPercent = 100,
uint8_t minPercent = 0 )
inline

Bounce fill from both edges inward with fix range.

Parameters
fillIntvFill interval in ms. Default is 25.
emptyIntvEmpty interval in ms. Default is 25.
maxPercentMaximum range percent to animate. Default is 100.
minPercentMinimum range percent to animate. Default is 0.
Returns
Reference to this animation instance.

Definition at line 1324 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _bounceFillHalfRangeMirrorCenter(), _currentFunc, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _mirrorHalfRangeDir, _segsNum, _sequenceState, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ bounceFillUpDur()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::bounceFillUpDur ( uint16_t duration,
uint8_t maxPercent = 100,
uint8_t minPercent = 0,
uint16_t fillIntv = 0 )
inline

Start animation that fills/empties (bounces) bar upward with fixed range.

Parameters
durationTotal time in milliseconds for full bounce cycle.
maxPercentMaximum fill percentage (0–100). Default is 100.
minPercentMinimum fill percentage (0–100). Default is 0.
fillIntvOptional fixed interval for the fill phase. Default is 0 (auto).
Returns
Reference to this animation instance.

Definition at line 991 of file SBK_BarMeterAnimations.h.

References _animRenderDirIsReversed, _bounceFill(), _currentFunc, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxTracker, _maxValue(), _minTracker, _segsNum, _sequenceState, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ bounceFillUpIntv() [1/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::bounceFillUpIntv ( uint16_t fillIntv,
uint16_t emptyIntv,
const uint8_t * maxPercentPtr,
const uint8_t * minPercentPtr = nullptr )
inline

Start animation that fills/empties (bounces) bar upward with live range.

Parameters
fillIntvFill interval in ms.
emptyIntvEmpty interval in ms.
maxPercentPtrPointer to maximum percentage fill range value.
minPercentPtrPointer to minimum percentage fill range value (optional). Default is nullptr.
Returns
Reference to this animation instance.

Definition at line 1027 of file SBK_BarMeterAnimations.h.

References _animRenderDirIsReversed, _bounceFill(), _currentFunc, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTrackerFromPtr(), _maxValue(), _percentMaxPtr(), _percentMinPtr(), _segsNum, _sequenceState, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ bounceFillUpIntv() [2/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::bounceFillUpIntv ( uint16_t fillIntv = 10,
uint16_t emptyIntv = 10,
uint8_t maxPercent = 100,
uint8_t minPercent = 0 )
inline

Start animation that fills/empties (bounces) bar upward with fixed range.

Parameters
fillIntvFill interval in ms. Default is 10.
emptyIntvEmpty interval in ms. Default is 10.
maxPercentMax fill percent fill range. Default is 100.
minPercentMin fill percent fill range. Default is 0.
Returns
Reference to this animation instance.

Definition at line 1052 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _bounceFill(), _currentFunc, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxValue(), _segsNum, _sequenceState, _updateIntv1, _updateIntv2, _updateIntv3, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ clearQueue()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::clearQueue ( )
inline

Discard the queue and disable queue looping without stopping the current animation.

Definition at line 381 of file SBK_BarMeterAnimations.h.

References _currentQueueIndex, _queueActive, _queueCount, _queueHead, _queueLoop, _queueOverflow, _queueStart, _queueStoredCount, _queueTail, NO_QUEUE_INDEX, and SBK_BarMeterAnimations().

Referenced by stop().

◆ collidingBlocks()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::collidingBlocks ( uint16_t intv = 50,
uint8_t blockLength = 2,
uint8_t blockSpacing = 1,
uint8_t numBlocks = 0 )
inline

Emit mirrored blocks from edge to center.

Parameters
intvStep interval in milliseconds. Default is 50.
blockLengthNumber of pixels per block. Default is 2.
blockSpacingSpace between blocks. Default is 1.
numBlocksNumber of blocks to emit (0 = infinite). Default is 0.
Returns
Reference to this animation instance.

Definition at line 1423 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _isNonInvertingLogicAnim, _isRunning, _maxValue(), _mirrorBlocks(), _param1, _param2, _param3, _param4, _segsNum, _updateIntv1, blockLength, blockSpacing, and SBK_BarMeterAnimations().

◆ currentQueueIndex()

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::currentQueueIndex ( ) const
inline

Return the physical queue slot currently playing, or NO_QUEUE_INDEX.

Definition at line 430 of file SBK_BarMeterAnimations.h.

References _currentQueueIndex.

◆ downStackingBlocks()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::downStackingBlocks ( uint16_t intv = 50,
uint8_t blockLength = 1,
uint8_t blockSpacing = 0 )
inline

Drop blocks from top and stack from bottom up.

Parameters
intvUpdate interval in milliseconds. Default is 50.
blockLengthNumber of segments per block. Default is 1.
blockSpacingSpace between blocks. Default is 0.
Returns
Reference to this animation instance.

Definition at line 1498 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _emittingBlocksEnabled, _init, _isNonInvertingLogicAnim, _isRunning, _maxValue(), _param1, _param2, _param3, _param4, _stackingBlocks(), _updateIntv1, blockLength, blockSpacing, and SBK_BarMeterAnimations().

◆ downUnstackingBlocks()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::downUnstackingBlocks ( uint16_t intv = 50,
uint8_t blockLength = 1,
uint8_t blockSpacing = 0 )
inline

Drop blocks from top and unstack from bottom up.

Parameters
intvUpdate interval in milliseconds. Default is 50.
blockLengthNumber of segments per block. Default is 1.
blockSpacingSpace between blocks. Default is 0.
Returns
Reference to this animation instance.

Definition at line 1570 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _emittingBlocksEnabled, _init, _isNonInvertingLogicAnim, _isRunning, _maxValue(), _param1, _param2, _param3, _param4, _stackingBlocks(), _updateIntv1, blockLength, blockSpacing, and SBK_BarMeterAnimations().

◆ emptyDownDur()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::emptyDownDur ( uint16_t duration,
uint8_t maxPercent = 100,
uint8_t minPercent = 0 )
inline

Start animation that empties the bar from top to bottom over a duration.

Parameters
durationTotal time in milliseconds.
maxPercentTop of the max fill range (0–100). Default is 100.
minPercentBottom of the min fill range (0–100). Default is 0.
Returns
Reference to this animation instance.

Definition at line 858 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxTracker, _maxValue(), _minTracker, _segsNum, _usePtr, _valuePtr1, _valuePtr2, emptyDownIntv(), and SBK_BarMeterAnimations().

◆ emptyDownIntv() [1/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::emptyDownIntv ( uint16_t updateIntv,
const uint8_t * maxPercentPtr,
const uint8_t * minPercentPtr = nullptr )
inline

Start animation that empties the bar from top to bottom at fixed intervals with live range.

Parameters
updateIntvTime between updates in milliseconds.
maxPercentPtrPointer to maximum fill range percent value (0–100).
minPercentPtrOptional pointer to minimum fill range percent value (0–100). Default is nullptr.
Returns
Reference to this animation instance.

Definition at line 879 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _fillOrEmpty(), _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTrackerFromPtr(), _maxValue(), _percentMaxPtr(), _percentMinPtr(), _segsNum, _updateIntv1, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

Referenced by emptyDownDur().

◆ emptyDownIntv() [2/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::emptyDownIntv ( uint16_t updateIntv,
uint8_t maxPercent = 100,
uint8_t minPercent = 0 )
inline

Start animation that empties the bar from top to bottom at fixed intervals.

Parameters
updateIntvTime between updates in milliseconds.
maxPercentTop of the max fill range (0–100). Default is 100.
minPercentBottom of the min fill range (0–100). Default is 0.
Returns
Reference to this animation instance.

Definition at line 901 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _fillOrEmpty(), _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxValue(), _segsNum, _updateIntv1, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ emptyUpDur()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::emptyUpDur ( uint16_t duration,
uint8_t maxPercent = 100,
uint8_t minPercent = 0 )
inline

Start animation that empties the bar from bottom to top over a duration.

Parameters
durationTotal animation duration in milliseconds.
maxPercentTop of the fill range (0-100). Default is 100.
minPercentBottom of the fill range (0-100). Default is 0.
Returns
Reference to this animation instance.

Definition at line 923 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _fillOrEmpty(), _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxTracker, _maxValue(), _minTracker, _segsNum, _updateIntv1, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ emptyUpIntv() [1/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::emptyUpIntv ( uint16_t updateIntv,
const uint8_t * maxPercentPtr,
const uint8_t * minPercentPtr = nullptr )
inline

Start animation that empties the bar from bottom to top at fixed intervals with live range.

Parameters
updateIntvTime between updates in milliseconds.
maxPercentPtrPointer to top max fill range percent value.
minPercentPtrPointer to bottom min fill range percent value (optional). Default is nullptr.
Returns
Reference to this animation instance.

Definition at line 946 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _fillOrEmpty(), _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTrackerFromPtr(), _maxValue(), _percentMaxPtr(), _percentMinPtr(), _segsNum, _updateIntv1, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ emptyUpIntv() [2/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::emptyUpIntv ( uint16_t updateIntv,
uint8_t maxPercent = 100,
uint8_t minPercent = 0 )
inline

Start animation that empties the bar from bottom to top at fixed intervals.

Parameters
updateIntvTime between updates in milliseconds.
maxPercentTop of the max fill range (0–100). Default is 100.
minPercentBottom of the min fill range (0–100). Default is 0.
Returns
Reference to this animation instance.

Definition at line 968 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _fillOrEmpty(), _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxValue(), _segsNum, _updateIntv1, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ enqueue()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::enqueue ( )
inline

Add the currently configured animation to the fixed-capacity queue.

Configure an animation with any starter and optional modifiers, then call enqueue(). The animation is captured but does not run until startQueue(). If the queue is full, the command is discarded and queueOverflowed() becomes true.

Definition at line 236 of file SBK_BarMeterAnimations.h.

References _animationDuration, _blockEmissionStopAfter, _captureQueueEntry(), _currentFunc, _isRunning, _queue, _queueCount, _queueOverflow, _queueStoredCount, _queueTail, QUEUE_CAPACITY, and SBK_BarMeterAnimations().

◆ enqueueFor()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::enqueueFor ( uint32_t duration)
inline

Queue the configured animation for a fixed amount of time.

The queue advances immediately after duration milliseconds even if the animation loops or is intrinsically continuous.

Parameters
durationMaximum time this queue entry remains active, in milliseconds.

Definition at line 267 of file SBK_BarMeterAnimations.h.

References _animationDuration, _blockEmissionStopAfter, _captureQueueEntry(), _currentFunc, _isRunning, _queue, _queueCount, _queueOverflow, _queueStoredCount, _queueTail, QUEUE_CAPACITY, and SBK_BarMeterAnimations().

◆ enqueueReverseAnim()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::enqueueReverseAnim ( )
inline

Queue a state-preserving logic reversal of the preceding entry.

The preceding queued animation is copied, its supported logic is reversed, and its runtime trackers and workspace are preserved at the handoff. Configure looping with loop() or noLoop() before calling this command. Apply forTime() or stopBlockEmissionAfter() separately when timing is needed.

Definition at line 325 of file SBK_BarMeterAnimations.h.

References _loop, _queue, _queueCount, _queueOverflow, _queueStoredCount, _queueTail, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animInitLogicIsInverted, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::animRenderLogicIsInverted, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::blockEmissionStopAfter, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::duration, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::loop, QUEUE_CAPACITY, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::resetRuntimeState, and SBK_BarMeterAnimations().

◆ explodingBlocks()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::explodingBlocks ( uint16_t intv = 50,
uint8_t blockLength = 2,
uint8_t blockSpacing = 1,
uint8_t numBlocks = 0 )
inline

Emit mirrored blocks from center outward.

Parameters
intvStep interval in milliseconds. Default is 50.
blockLengthNumber of pixels per block. Default is 2.
blockSpacingSpace between blocks. Default is 1.
numBlocksNumber of blocks to emit (0 = infinite). Default is 0.
Returns
Reference to this animation instance.

Definition at line 1398 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _isNonInvertingLogicAnim, _isRunning, _maxValue(), _mirrorBlocks(), _param1, _param2, _param3, _param4, _segsNum, _updateIntv1, blockLength, blockSpacing, and SBK_BarMeterAnimations().

◆ fillDownDur()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::fillDownDur ( uint16_t duration,
uint8_t maxPercent = 100,
uint8_t minPercent = 0 )
inline

Start animation that fills the bar downwards over a specified duration.

Parameters
durationTotal time in milliseconds.
maxPercentTop of the max fill range (0–100). Default is 100.
minPercentBottom of the min fill range (0–100). Default is 0.
Returns
Reference to this animation instance.

Definition at line 790 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _fillOrEmpty(), _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxTracker, _maxValue(), _minTracker, _segsNum, _updateIntv1, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ fillDownIntv() [1/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::fillDownIntv ( uint16_t updateIntv,
const uint8_t * maxPercentPtr,
const uint8_t * minPercentPtr = nullptr )
inline

Start animation that fills the bar downwards at a fixed interval with live percent tracking.

Parameters
updateIntvTime between updates in milliseconds.
maxPercentPtrPointer to maximum fill range percent value (0–100).
minPercentPtrOptional pointer to minimum fill range percent value (0–100). Default is nullptr.
Returns
Reference to this animation instance.

Definition at line 813 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _fillOrEmpty(), _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTrackerFromPtr(), _maxTracker, _maxValue(), _minTracker, _percentMaxPtr(), _percentMinPtr(), _segsNum, _updateIntv1, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ fillDownIntv() [2/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::fillDownIntv ( uint16_t updateIntv,
uint8_t maxPercent = 100,
uint8_t minPercent = 0 )
inline

Start animation that fills the bar downwards at a fixed interval.

Parameters
updateIntvTime between updates in milliseconds.
maxPercentTop of the max fill range (0–100). Default is 100.
minPercentBottom of the min fill range (0–100). Default is 0.
Returns
Reference to this animation instance.

Definition at line 836 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _fillOrEmpty(), _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxValue(), _segsNum, _updateIntv1, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ fillUpDur()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::fillUpDur ( uint16_t duration,
uint8_t maxPercent = 100,
uint8_t minPercent = 0 )
inline

Start animation that fills the bar upwards over a specified duration.

Parameters
durationTotal time in milliseconds.
maxPercentTop of the max fill range (0–100). Default is 100.
minPercentBottom of the min fill range (0–100). Default is 0.
Returns
Reference to this animation instance.

Definition at line 723 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _fillOrEmpty(), _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxTracker, _maxValue(), _minTracker, _segsNum, _updateIntv1, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ fillUpIntv() [1/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::fillUpIntv ( uint16_t updateIntv,
const uint8_t * maxPercentPtr,
const uint8_t * minPercentPtr = nullptr )
inline

Start animation that fills the bar upwards at a fixed interval with live percent tracking.

Parameters
updateIntvTime between updates in milliseconds.
maxPercentPtrPointer to maximum fill range percent value (0–100).
minPercentPtrOptional pointer to minimum fill range percent value (0–100). Default is nullptr.
Returns
Reference to this animation instance.

Definition at line 746 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _fillOrEmpty(), _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTrackerFromPtr(), _maxValue(), _percentMaxPtr(), _percentMinPtr(), _segsNum, _updateIntv1, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ fillUpIntv() [2/2]

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::fillUpIntv ( uint16_t updateIntv,
uint8_t maxPercent = 100,
uint8_t minPercent = 0 )
inline

Start animation that fills the bar upwards at a fixed interval.

Parameters
updateIntvTime between updates in milliseconds.
maxPercentTop of the max fill range (0–100). Default is 100.
minPercentBottom of the min fill range (0–100). Default is 0.
Returns
Reference to this animation instance.

Definition at line 768 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _fillOrEmpty(), _isNonInvertingLogicAnim, _isRunning, _mapMinMaxTracker(), _maxValue(), _segsNum, _updateIntv1, _usePtr, _valuePtr1, _valuePtr2, and SBK_BarMeterAnimations().

◆ followDualSignalFromCenter()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::followDualSignalFromCenter ( const uint16_t * sig1Ptr,
uint16_t updateIntv = 100,
const uint16_t * sig2Ptr = nullptr,
uint16_t minMap = 0,
uint16_t maxMap = 1023,
uint8_t smoothingFactor = 30,
uint16_t samplingIntv = 5 )
inline

Smoothly fills the lower half and upper half of the bar meter independently from center, based on two signal levels.

Parameters
sig1PtrPointer to analog signal 1 for the bottom half (center to bottom).
updateIntvUpdate interval in milliseconds. Default is 100.
sig2PtrPointer to signal2 for top half (center to top). Default nullptr, signal 1 will be mirrored.
minMapMinimum raw value to map. Default 0.
maxMapMaximum raw value to map. Default 1023.
smoothingFactorSmoothing strength 0–100. Default is 30.
samplingIntvsignal sampling rate. Default is 5.
Returns
Reference to this animation instance (chainable).

Definition at line 1658 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _correctSwapOrEqualMinMax(), _currentFunc, _followDualSignalCenterMirror(), _init, _isNonInvertingLogicAnim, _isRunning, _maxMap, _maxValue(), _minMap, _param1, _updateIntv1, _updateIntv2, _valuePtr1, _valuePtr2, SBK_BarMeterAnimations(), and smoothingFactor.

◆ followDualSignalFromEdges()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::followDualSignalFromEdges ( const uint16_t * sig1Ptr,
uint16_t updateIntv = 100,
const uint16_t * sig2Ptr = nullptr,
uint16_t minMap = 0,
uint16_t maxMap = 1023,
uint8_t smoothingFactor = 30,
uint16_t samplingIntv = 5 )
inline

Smoothly fills the lower half and upper half of the bar meter independently from center, based on two signal levels.

Parameters
sig1PtrPointer to signal 1 for the bottom half (bottom edge to center).
updateIntvUpdate interval in milliseconds. Default is 100.
sig2PtrPointer to signal 2 for the top half (top edge to center). Default nullptr mirrors signal 1.
minMapMinimum raw value to map. Default 0.
maxMapMaximum raw value to map. Default 1023.
smoothingFactorSmoothing strength 0–100. Default is 30.
samplingIntvsignal sampling rate. Default is 5.
Returns
Reference to this animation instance (chainable).

Definition at line 1691 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _correctSwapOrEqualMinMax(), _currentFunc, _followDualSignalCenterMirror(), _init, _isNonInvertingLogicAnim, _isRunning, _maxMap, _maxValue(), _minMap, _param1, _updateIntv1, _updateIntv2, _valuePtr1, _valuePtr2, SBK_BarMeterAnimations(), and smoothingFactor.

◆ followSignalFloatingPeak()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::followSignalFloatingPeak ( const uint16_t * sigPtr,
uint8_t peakHoldTime = 20,
uint16_t updateIntv = 100,
uint16_t minMap = 0,
uint16_t maxMap = 1023,
uint8_t smoothingFactor = 30,
uint16_t samplingIntv = 5 )
inline

Follow an analog signal with smoothing and floating peak indicator.

This animation fills the bar based on a smoothed analog input value and displays a peak marker that holds momentarily before decaying.

Parameters
sigPtrPointer to the analog signal value (e.g., from analogRead()).
peakHoldTimeDuration (in ms) to hold the peak before it begins to decay.
updateIntvBar update interval in milliseconds. Default is 100 ms.
minMapMinimum expected raw signal value. Default is 0.
maxMapMaximum expected raw signal value. Default is 1023.
smoothingFactorSignal smoothing strength (0–100). Higher = smoother. Default is 30.
samplingIntvSignal sampling interval in milliseconds. Default is 5 ms.
Returns
Reference to this animation instance (chainable).

Definition at line 1727 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _correctSwapOrEqualMinMax(), _currentFunc, _followSignalFloatingPeak(), _init, _isNonInvertingLogicAnim, _isRunning, _maxMap, _maxValue(), _minMap, _param1, _updateIntv1, _updateIntv2, _updateIntv3, _valuePtr1, peakHoldTime, SBK_BarMeterAnimations(), and smoothingFactor.

◆ followSignalSmooth()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::followSignalSmooth ( const uint16_t * sigPtr,
uint16_t updateIntv = 100,
uint16_t minMap = 0,
uint16_t maxMap = 1023,
uint8_t smoothingFactor = 30,
uint16_t samplingIntv = 5 )
inline

Follow analog signal with smoothing for fill animation.

Parameters
sigPtrPointer to analog signal.
updateIntvUpdate interval in milliseconds. Default is 100.
minMapMinimum input value. Default is 0.
maxMapMaximum input value. Default is 1023.
smoothingFactorSmoothing strength 0–100. Default is 30.
samplingIntvsignal sampling rate. Default is 5.
Returns
Reference to this animation instance (chainable).

Definition at line 1597 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _correctSwapOrEqualMinMax(), _currentFunc, _followSignalSmooth(), _init, _isNonInvertingLogicAnim, _isRunning, _maxMap, _maxValue(), _minMap, _param1, _updateIntv1, _updateIntv2, _valuePtr1, SBK_BarMeterAnimations(), and smoothingFactor.

◆ followSignalWithPointer()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::followSignalWithPointer ( const uint16_t * sigPtr,
uint16_t updateIntv = 100,
uint16_t minMap = 0,
uint16_t maxMap = 1023,
uint8_t smoothingFactor = 30,
uint16_t samplingIntv = 5 )
inline

Follow signal with smoothing and display a pointer.

Parameters
sigPtrPointer to analog signal.
updateIntvUpdate interval in milliseconds. Default is 100.
minMapMinimum input value. Default is 0.
maxMapMaximum input value. Default is 1023.
smoothingFactorSmoothing strength 0–100. Default is 30.
samplingIntvsignal sampling rate. Default is 5.
Returns
Reference to this animation instance (chainable).

Definition at line 1627 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _correctSwapOrEqualMinMax(), _currentFunc, _followSignalWithPointer(), _init, _isNonInvertingLogicAnim, _isRunning, _maxMap, _maxValue(), _minMap, _param1, _updateIntv1, _updateIntv2, _valuePtr1, SBK_BarMeterAnimations(), and smoothingFactor.

◆ forTime()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::forTime ( uint32_t duration)
inline

Limit a direct or queued animation to a maximum run time.

After a direct animation starter, this schedules the active animation. When called after an enqueue operation, it modifies the most recently queued entry. A queued animation advances immediately when the deadline expires; a direct animation stops while preserving its displayed pixels.

Parameters
durationMaximum animation run time in milliseconds; zero disables it.

Definition at line 300 of file SBK_BarMeterAnimations.h.

References _animationDuration, _currentFunc, _queue, _queueCount, _queueEntryDuration, _queueEntryTimingPending, _queueTail, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::duration, QUEUE_CAPACITY, and SBK_BarMeterAnimations().

◆ invertLogic()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::invertLogic ( )
inline

Reverse logic compared to initial state Logic refer to behavior, example : fill/empty, exploding/colliding, etc.

Some animations do not support logic inversion; this function has no effect on them.

Definition at line 521 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animLogicSet, _animRenderLogicIsInverted, _isNonInvertingLogicAnim, and SBK_BarMeterAnimations().

◆ isBlockEmissionEnabled()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::isBlockEmissionEnabled ( ) const
inline

Query if block emission is enabled.

Definition at line 639 of file SBK_BarMeterAnimations.h.

References _emittingBlocksEnabled.

◆ isDirectionReversed()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::isDirectionReversed ( )
inline

Returns true if direction is reversed compared to the original.

Definition at line 630 of file SBK_BarMeterAnimations.h.

References _AnimInitDirIsReversed, and _animRenderDirIsReversed.

◆ isLogicInverted()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::isLogicInverted ( )
inline

Returns true if current logic is different from original logic.

Definition at line 618 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, and _animRenderLogicIsInverted.

◆ isLoopEnabled()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::isLoopEnabled ( ) const
inline

Query if animation loop is enabled.

Definition at line 592 of file SBK_BarMeterAnimations.h.

References _loop.

◆ isNonInvertingLogicAnim()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::isNonInvertingLogicAnim ( )
inline

Return true if the current animation does not support logic inversion.

Definition at line 627 of file SBK_BarMeterAnimations.h.

References _isNonInvertingLogicAnim.

◆ isPaused()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::isPaused ( ) const
inline

Query if animation is paused.

Definition at line 589 of file SBK_BarMeterAnimations.h.

References _isPaused.

◆ isQueueIndexPlaying()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::isQueueIndexPlaying ( uint8_t index) const
inline

Return true when the requested physical queue slot is currently playing.

Definition at line 433 of file SBK_BarMeterAnimations.h.

References _currentQueueIndex, and _queueActive.

◆ isQueueRunning()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::isQueueRunning ( ) const
inline

Return true while an animation queue is being processed.

Definition at line 427 of file SBK_BarMeterAnimations.h.

References _queueActive.

◆ isRunning()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::isRunning ( ) const
inline

Query if animation is currently active.

Definition at line 586 of file SBK_BarMeterAnimations.h.

References _isRunning.

◆ loop()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::loop ( )
inline

Set animation to automatically loop when complete.

Definition at line 442 of file SBK_BarMeterAnimations.h.

References _currentFunc, _loop, _wait(), and SBK_BarMeterAnimations().

◆ loopQueue()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::loopQueue ( )
inline

Repeat the entire queue after its final entry completes.

Definition at line 354 of file SBK_BarMeterAnimations.h.

References _queueLoop, and SBK_BarMeterAnimations().

◆ noLoop()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::noLoop ( )
inline

Disable auto-looping.

Animation will stop when complete.

Definition at line 451 of file SBK_BarMeterAnimations.h.

References _loop, and SBK_BarMeterAnimations().

◆ noLoopQueue()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::noLoopQueue ( )
inline

Disable repetition; finish the current queue pass before stopping.

Definition at line 361 of file SBK_BarMeterAnimations.h.

References _queueLoop, and SBK_BarMeterAnimations().

◆ pause()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::pause ( uint32_t syncTime = millis())
inline

Freeze animation progression and all queue/animation timers.

Parameters
syncTimeUse the same clock as update(); defaults to millis().

Definition at line 184 of file SBK_BarMeterAnimations.h.

References _isPaused, _pausedAt, and SBK_BarMeterAnimations().

◆ queuedAnimations()

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::queuedAnimations ( ) const
inline

Return the number of animations waiting behind the active one.

Definition at line 424 of file SBK_BarMeterAnimations.h.

References _queueCount.

◆ queueOverflowed()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::queueOverflowed ( ) const
inline

Return true if an enqueue operation exceeded the configured capacity.

Definition at line 439 of file SBK_BarMeterAnimations.h.

References _queueOverflow.

◆ randomEmpty()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::randomEmpty ( uint16_t interval = 30)
inline

Randomly turn off pixels until the bar is empty.

Parameters
intervalUpdate interval in milliseconds. Default is 30.
Returns
Reference to this animation instance.

Definition at line 1771 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _init, _isNonInvertingLogicAnim, _isRunning, _randomPixelUpdater(), _updateIntv1, and SBK_BarMeterAnimations().

◆ randomFill()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::randomFill ( uint16_t interval = 30)
inline

Randomly light up pixels until the bar is full.

Parameters
intervalUpdate interval in milliseconds. Default is 30.
Returns
Reference to this animation instance.

Definition at line 1753 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _init, _isNonInvertingLogicAnim, _isRunning, _randomPixelUpdater(), _updateIntv1, and SBK_BarMeterAnimations().

◆ resetDir()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::resetDir ( )
inline

Reset direction to the original setting.

Definition at line 482 of file SBK_BarMeterAnimations.h.

References _animDirSet, _AnimInitDirIsReversed, _animRenderDirIsReversed, and SBK_BarMeterAnimations().

◆ resetLogic()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::resetLogic ( )
inline

Reset logic to initial (default) value.

Logic refer to behavior, example : fill/empty, exploding/colliding, etc. Some animations do not support logic inversion; this function has no effect on them.

Definition at line 535 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animLogicSet, _animRenderLogicIsInverted, _isNonInvertingLogicAnim, and SBK_BarMeterAnimations().

◆ resume()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::resume ( uint32_t syncTime = millis())
inline

Resume with the same playback time remaining as when paused.

Parameters
syncTimeUse the same clock as update(); defaults to millis().

Definition at line 198 of file SBK_BarMeterAnimations.h.

References _isPaused, _pausedAt, _pausedTime, and SBK_BarMeterAnimations().

Referenced by _loadQueueEntry(), skipCurrent(), and stop().

◆ resumeBlockEmission()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::resumeBlockEmission ( )
inline

Resume emitting new blocks during compatible block animations.

Definition at line 552 of file SBK_BarMeterAnimations.h.

References _emittingBlocksEnabled, and SBK_BarMeterAnimations().

◆ reverseDir()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::reverseDir ( )
inline

Reverse the rendering direction compared to the original one.

Definition at line 474 of file SBK_BarMeterAnimations.h.

References _animDirSet, _AnimInitDirIsReversed, _animRenderDirIsReversed, and SBK_BarMeterAnimations().

◆ scrollingDownBlocks()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::scrollingDownBlocks ( uint16_t intv = 50,
uint8_t blockLength = 2,
uint8_t blockSpacing = 1,
uint8_t numBlocks = 0 )
inline

Scroll blocks downward.

Parameters
intvUpdate interval in ms. Default is 50.
blockLengthBlock length in segments. Default is 2.
blockSpacingSpace between blocks. Default is 1.
numBlocksNumber of blocks to show. 0 = infinite. Default is 0.
Returns
Reference to this animation instance.

Definition at line 1474 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _isNonInvertingLogicAnim, _isRunning, _maxValue(), _param1, _param2, _param3, _param4, _scrollingBlocks(), _segsNum, _updateIntv1, blockLength, blockSpacing, and SBK_BarMeterAnimations().

◆ scrollingUpBlocks()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::scrollingUpBlocks ( uint16_t intv = 50,
uint8_t blockLength = 2,
uint8_t blockSpacing = 1,
uint8_t numBlocks = 0 )
inline

Scroll blocks upward.

Parameters
intvUpdate interval in ms. Default is 50.
blockLengthBlock length in segments. Default is 2.
blockSpacingSpace between blocks. Default is 1.
numBlocksNumber of blocks to show. 0 = infinite. Default is 0.
Returns
Reference to this animation instance.

Definition at line 1449 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _isNonInvertingLogicAnim, _isRunning, _maxValue(), _param1, _param2, _param3, _param4, _scrollingBlocks(), _segsNum, _updateIntv1, blockLength, blockSpacing, and SBK_BarMeterAnimations().

◆ setAll()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::setAll ( bool onff)
inline

Set all pixels to the specified state.

Parameters
onffDesired pixel state: true = on, false = off.

Definition at line 646 of file SBK_BarMeterAnimations.h.

References SBK_BarMeterAnimations(), setAllOff(), and setAllOn().

◆ setAllOff()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::setAllOff ( )
inline

Set all pixels OFF.

Definition at line 662 of file SBK_BarMeterAnimations.h.

References _currentFunc, _init, _isRunning, _setAllOff(), and SBK_BarMeterAnimations().

Referenced by setAll().

◆ setAllOn()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::setAllOn ( )
inline

Set all pixels ON.

Definition at line 651 of file SBK_BarMeterAnimations.h.

References _currentFunc, _init, _isRunning, _setAllOn(), and SBK_BarMeterAnimations().

Referenced by setAll().

◆ setDir()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::setDir ( bool newDirection)
inline

Explicitly set the animation rendering direction.

Definition at line 458 of file SBK_BarMeterAnimations.h.

References _animDirSet, _animRenderDirIsReversed, and SBK_BarMeterAnimations().

◆ setLogic()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::setLogic ( bool newLogic)
inline

Set rendering logic (true = inverted logic, false = normal logic), example fill logic become empty logic.

Logic refer to behavior, example : fill/empty, exploding/colliding, etc.

Definition at line 493 of file SBK_BarMeterAnimations.h.

References _animLogicSet, _animRenderLogicIsInverted, _isNonInvertingLogicAnim, and SBK_BarMeterAnimations().

◆ setSegsNum()

template<typename BarMeterT>
void SBK_BarMeterAnimations< BarMeterT >::setSegsNum ( uint8_t n)
inline

Set the total number of segments the animation logic should handle.

Typically called automatically from SBK_BarDrive.

Parameters
nNumber of segments in the bar.

Definition at line 82 of file SBK_BarMeterAnimations.h.

References _maxTracker, _minValue(), _segmentCapacity, and _segsNum.

◆ setUpdateInterval()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::setUpdateInterval ( uint16_t interval)
inline

Change the primary update interval without restarting the animation.

Definition at line 595 of file SBK_BarMeterAnimations.h.

References _maxValue(), _updateIntv1, and SBK_BarMeterAnimations().

◆ skipCurrent()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::skipCurrent ( )
inline

Abandon the active animation and immediately start the next queue entry.

Unlike stop(), this preserves pending queue entries. If no entry remains, the active animation and queue are stopped cleanly.

Definition at line 401 of file SBK_BarMeterAnimations.h.

References _currentFunc, _currentQueueIndex, _isLoopingNow, _isRunning, _loop, _queueActive, _skipPending, _startNextQueuedAnimation(), NO_QUEUE_INDEX, resume(), and SBK_BarMeterAnimations().

◆ startQueue()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::startQueue ( )
inline

Start queued playback using the current queue-loop setting.

Definition at line 368 of file SBK_BarMeterAnimations.h.

References _queueActive, _queueCount, _queueHead, _queueStart, _startNextQueuedAnimation(), and SBK_BarMeterAnimations().

◆ stop()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::stop ( )
inline

◆ stopBlockEmission()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::stopBlockEmission ( )
inline

Stop emitting new blocks during compatible block animations.

Definition at line 545 of file SBK_BarMeterAnimations.h.

References _emittingBlocksEnabled, and SBK_BarMeterAnimations().

◆ stopBlockEmissionAfter()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::stopBlockEmissionAfter ( uint32_t duration)
inline

Stop new block emission after an animation has run for a duration.

After a direct animation starter, this schedules the active animation. When called after an enqueue operation, it modifies the most recently queued entry. Compatible mirrored and scrolling block animations keep updating until their active blocks leave the display. This has no effect on other animation types.

Parameters
durationTime in milliseconds before new block emission stops.

Definition at line 568 of file SBK_BarMeterAnimations.h.

References _activeBlockEmissionStopAfter, _blockEmissionStopAfter, _currentFunc, _queue, _queueCount, _queueEntryTimingPending, _queueTail, SBK_BarMeterAnimations< BarMeterT >::QueueEntry::blockEmissionStopAfter, QUEUE_CAPACITY, and SBK_BarMeterAnimations().

◆ toggleDir()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::toggleDir ( )
inline

Toggle the current animation rendering direction.

Definition at line 466 of file SBK_BarMeterAnimations.h.

References _animDirSet, _animRenderDirIsReversed, and SBK_BarMeterAnimations().

◆ toggleLogic()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::toggleLogic ( )
inline

Toggle rendering logic (inverted vs normal), example fill logic become empty logic.

Logic refer to behavior, example : fill/empty, exploding/colliding, etc. Some animations do not support logic inversion; this function has no effect on them.

Definition at line 507 of file SBK_BarMeterAnimations.h.

References _animLogicSet, _animRenderLogicIsInverted, _isNonInvertingLogicAnim, and SBK_BarMeterAnimations().

◆ update()

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::update ( uint32_t syncTime = millis())
inline

Advance the animation logic based on the current millis().

Parameters
syncTimeOptional timestamp to synchronize animation.
Returns
true if animation is still running; false otherwise.

Definition at line 93 of file SBK_BarMeterAnimations.h.

References _activeBlockEmissionStopAfter, _currentFunc, _currentQueueIndex, _currentTime, _emittingBlocksEnabled, _init, _isLoopingNow, _isPaused, _isRunning, _loop, _mirrorBlocks(), _pausedTime, _queueActive, _queueEntryDuration, _queueEntryStartedAt, _queueEntryTimingPending, _scrollingBlocks(), _skipPending, _startNextQueuedAnimation(), and NO_QUEUE_INDEX.

◆ upStackingBlocks()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::upStackingBlocks ( uint16_t intv = 50,
uint8_t blockLength = 1,
uint8_t blockSpacing = 0 )
inline

Launch blocks from bottom and stack at the top.

Parameters
intvUpdate interval in milliseconds. Default is 50.
blockLengthNumber of segments per block. Default is 1.
blockSpacingSpace between blocks. Default is 0.
Returns
Reference to this animation instance.

Definition at line 1546 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _emittingBlocksEnabled, _init, _isNonInvertingLogicAnim, _isRunning, _maxValue(), _param1, _param2, _param3, _param4, _stackingBlocks(), _updateIntv1, blockLength, blockSpacing, and SBK_BarMeterAnimations().

◆ upUnstackingBlocks()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::upUnstackingBlocks ( uint16_t intv = 50,
uint8_t blockLength = 1,
uint8_t blockSpacing = 0 )
inline

Launch blocks upward and unstack from top.

Parameters
intvUpdate interval in milliseconds. Default is 50.
blockLengthNumber of segments per block. Default is 1.
blockSpacingSpace between blocks. Default is 0.
Returns
Reference to this animation instance.

Definition at line 1522 of file SBK_BarMeterAnimations.h.

References _AnimInitLogicIsInverted, _animRenderDirIsReversed, _currentFunc, _emittingBlocksEnabled, _init, _isNonInvertingLogicAnim, _isRunning, _maxValue(), _param1, _param2, _param3, _param4, _stackingBlocks(), _updateIntv1, blockLength, blockSpacing, and SBK_BarMeterAnimations().

◆ wait()

template<typename BarMeterT>
SBK_BarMeterAnimations & SBK_BarMeterAnimations< BarMeterT >::wait ( uint16_t duration)
inline

Wait without blocking or changing pixel states; waits never loop.

Parameters
durationWait duration in milliseconds.

Definition at line 674 of file SBK_BarMeterAnimations.h.

References _currentFunc, _init, _isRunning, _loop, _updateIntv1, _wait(), and SBK_BarMeterAnimations().

Field Documentation

◆ _activeBlockEmissionStopAfter

template<typename BarMeterT>
uint32_t SBK_BarMeterAnimations< BarMeterT >::_activeBlockEmissionStopAfter = 0
protected

◆ _animationDuration

template<typename BarMeterT>
uint32_t SBK_BarMeterAnimations< BarMeterT >::_animationDuration = 0
protected

Definition at line 1850 of file SBK_BarMeterAnimations.h.

Referenced by enqueue(), enqueueFor(), forTime(), and stop().

◆ _animationWorkspace

template<typename BarMeterT>
Block* SBK_BarMeterAnimations< BarMeterT >::_animationWorkspace = nullptr
protected

◆ _animDirSet

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_animDirSet = false
protected

◆ _AnimInitDirIsReversed

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_AnimInitDirIsReversed = false
protected

◆ _AnimInitLogicIsInverted

◆ _animLogicSet

◆ _animRenderDirIsReversed

◆ _animRenderLogicIsInverted

◆ _barMeter

◆ _blockCapacity

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_blockCapacity = 0
protected

Definition at line 1882 of file SBK_BarMeterAnimations.h.

Referenced by _initializeStorage(), and _resetBlocks().

◆ _blockEmissionStopAfter

template<typename BarMeterT>
uint32_t SBK_BarMeterAnimations< BarMeterT >::_blockEmissionStopAfter = 0
protected

◆ _counter1

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_counter1 = 0
protected

Definition at line 1869 of file SBK_BarMeterAnimations.h.

Referenced by _blinkPixel(), and _loadQueueEntry().

◆ _counter2

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_counter2 = 0
protected

Definition at line 1869 of file SBK_BarMeterAnimations.h.

Referenced by _loadQueueEntry().

◆ _currentFunc

◆ _currentQueueIndex

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_currentQueueIndex = NO_QUEUE_INDEX
protected

◆ _currentTime

◆ _emittingBlocksEnabled

◆ _init

◆ _isLoopingNow

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_isLoopingNow = false
protected

◆ _isNonInvertingLogicAnim

◆ _isPaused

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_isPaused = false
protected

Definition at line 1835 of file SBK_BarMeterAnimations.h.

Referenced by isPaused(), pause(), resume(), and update().

◆ _isRunning

◆ _lastUpdate1

◆ _lastUpdate2

template<typename BarMeterT>
uint32_t SBK_BarMeterAnimations< BarMeterT >::_lastUpdate2 = 0
protected

◆ _lastUpdate3

template<typename BarMeterT>
uint32_t SBK_BarMeterAnimations< BarMeterT >::_lastUpdate3 = 0
protected

Definition at line 1857 of file SBK_BarMeterAnimations.h.

Referenced by _loadQueueEntry().

◆ _ledTracker1

template<typename BarMeterT>
int8_t SBK_BarMeterAnimations< BarMeterT >::_ledTracker1 = 0
protected

◆ _ledTracker2

template<typename BarMeterT>
int8_t SBK_BarMeterAnimations< BarMeterT >::_ledTracker2 = 0
protected

Definition at line 1864 of file SBK_BarMeterAnimations.h.

Referenced by _loadQueueEntry().

◆ _ledTracker3

template<typename BarMeterT>
int8_t SBK_BarMeterAnimations< BarMeterT >::_ledTracker3 = 0
protected

Definition at line 1864 of file SBK_BarMeterAnimations.h.

Referenced by _loadQueueEntry().

◆ _loop

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_loop = false
protected

◆ _maxMap

◆ _maxTracker

◆ _minMap

◆ _minTracker

◆ _mirrorHalfRangeDir

◆ _param1

◆ _param2

◆ _param3

◆ _param4

◆ _param5

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_param5 = 0
protected

Definition at line 1866 of file SBK_BarMeterAnimations.h.

Referenced by _captureQueueEntry(), and _loadQueueEntry().

◆ _pausedAt

template<typename BarMeterT>
uint32_t SBK_BarMeterAnimations< BarMeterT >::_pausedAt = 0
protected

Definition at line 1855 of file SBK_BarMeterAnimations.h.

Referenced by pause(), and resume().

◆ _pausedTime

template<typename BarMeterT>
uint32_t SBK_BarMeterAnimations< BarMeterT >::_pausedTime = 0
protected

Definition at line 1856 of file SBK_BarMeterAnimations.h.

Referenced by resume(), and update().

◆ _prevAnimRenderLogic

◆ _queue

template<typename BarMeterT>
QueueEntry SBK_BarMeterAnimations< BarMeterT >::_queue[QUEUE_CAPACITY]
protected

◆ _queueActive

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_queueActive = false
protected

◆ _queueCount

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_queueCount = 0
protected

◆ _queueEntryDuration

template<typename BarMeterT>
uint32_t SBK_BarMeterAnimations< BarMeterT >::_queueEntryDuration = 0
protected

Definition at line 1827 of file SBK_BarMeterAnimations.h.

Referenced by _loadQueueEntry(), forTime(), stop(), and update().

◆ _queueEntryStartedAt

template<typename BarMeterT>
uint32_t SBK_BarMeterAnimations< BarMeterT >::_queueEntryStartedAt = 0
protected

Definition at line 1828 of file SBK_BarMeterAnimations.h.

Referenced by update().

◆ _queueEntryTimingPending

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_queueEntryTimingPending = false
protected

◆ _queueHead

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_queueHead = 0
protected

Definition at line 1818 of file SBK_BarMeterAnimations.h.

Referenced by _startNextQueuedAnimation(), clearQueue(), and startQueue().

◆ _queueLoop

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_queueLoop = false
protected

◆ _queueOverflow

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_queueOverflow = false
protected

◆ _queueStart

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_queueStart = 0
protected

Definition at line 1822 of file SBK_BarMeterAnimations.h.

Referenced by _startNextQueuedAnimation(), clearQueue(), and startQueue().

◆ _queueStoredCount

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_queueStoredCount = 0
protected

◆ _queueTail

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_queueTail = 0
protected

◆ _randomCursor

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_randomCursor = 0
protected

Definition at line 1883 of file SBK_BarMeterAnimations.h.

Referenced by _randomPixelUpdater().

◆ _segmentCapacity

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::_segmentCapacity = 0
protected

Definition at line 1881 of file SBK_BarMeterAnimations.h.

Referenced by _initializeStorage(), and setSegsNum().

◆ _segsNum

◆ _sequenceState

◆ _skipPending

template<typename BarMeterT>
bool SBK_BarMeterAnimations< BarMeterT >::_skipPending = false
protected

◆ _smoothedValue1

template<typename BarMeterT>
uint16_t SBK_BarMeterAnimations< BarMeterT >::_smoothedValue1 = 0
protected

◆ _smoothedValue2

template<typename BarMeterT>
uint16_t SBK_BarMeterAnimations< BarMeterT >::_smoothedValue2 = 0
protected

Definition at line 1867 of file SBK_BarMeterAnimations.h.

Referenced by _followDualSignalCenterMirror(), and _loadQueueEntry().

◆ _updateIntv1

◆ _updateIntv2

◆ _updateIntv3

◆ _usePtr

◆ _valuePtr1

◆ _valuePtr2

◆ MAX_BLOCK_CAPACITY

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::MAX_BLOCK_CAPACITY = 64
staticconstexprprotected

Definition at line 1879 of file SBK_BarMeterAnimations.h.

Referenced by _initializeStorage().

◆ NO_QUEUE_INDEX

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::NO_QUEUE_INDEX = 0xFF
staticconstexpr

◆ QUEUE_CAPACITY

template<typename BarMeterT>
uint8_t SBK_BarMeterAnimations< BarMeterT >::QUEUE_CAPACITY = 4
staticconstexprprotected

The documentation for this class was generated from the following file: