HitLib 1.3.0
VEX V5 LED animation library for PROS
Loading...
Searching...
No Matches
hitlib::ProfileMode Struct Reference

Describes a single named animation mode within a Profile. More...

#include <led_profile.hpp>

Public Attributes

const char * name
 Label shown in debug output.
uint8_t priority
 Higher value beats lower. Range: 0–255.
ModeFn onActivate
 Called once when this mode becomes the winner.
ModeFn onTick
 Called every tick while active. May be nullptr.

Detailed Description

Describes a single named animation mode within a Profile.

When multiple modes are active simultaneously on a strand the one with the highest priority wins. Ties are broken by insertion order (later wins).

Lifecycle

  1. Mode is pushed onto the strand's mode stack via LedStrand::activateMode() or LedStrand::activateModeTimed().
  2. On the next tick, LedStrand::computeEffectiveMode() selects the winner.
  3. onActivate is called once when the winning mode changes.
  4. onTick is called every refresh tick while the mode remains active.
See also
Profile
LedStrand::attachProfile

Member Data Documentation

◆ name

const char* hitlib::ProfileMode::name

Label shown in debug output.

◆ priority

uint8_t hitlib::ProfileMode::priority

Higher value beats lower. Range: 0–255.

◆ onActivate

ModeFn hitlib::ProfileMode::onActivate

Called once when this mode becomes the winner.

◆ onTick

ModeFn hitlib::ProfileMode::onTick

Called every tick while active. May be nullptr.