HitLib 1.5.0
VEX V5 LED animation library for PROS
Loading...
Searching...
No Matches
hitlib::LedStrand::Driver Struct Reference

One thing a composition watches, reduced to a byte per tick. More...

#include <led_strand.hpp>

Public Attributes

const char * name
DriverKind kind
uint8_t value
 CONSTANT's byte, moved by setDriverLevel().
LevelFn read
 SENSOR. nullptr leaves the driver at 0.
double emptyAt
double fullAt
bool wrap
uint8_t smoothing
 0-99, as in levelSource().
const MusicTrack * track
 MUSIC. Must outlive the strand.
uint8_t sensitivity
bool loop
LfoShape shape
 LFO.
uint32_t periodMs
uint8_t phasePct
 Offset into the period, so two LFOs can differ.

Detailed Description

One thing a composition watches, reduced to a byte per tick.

The three drivers that already exist in this class, plus an oscillator. SENSOR is levelSource()'s reader, range, wrap and smoothing; MUSIC is musicSync()'s track and sensitivity; CONSTANT is setLevel(). A composition evaluates each driver exactly once per tick, before any layer runs, so two layers bound to one reading cannot disagree about it within a frame.

Member Data Documentation

◆ name

const char* hitlib::LedStrand::Driver::name

◆ kind

DriverKind hitlib::LedStrand::Driver::kind

◆ value

uint8_t hitlib::LedStrand::Driver::value

CONSTANT's byte, moved by setDriverLevel().

◆ read

LevelFn hitlib::LedStrand::Driver::read

SENSOR. nullptr leaves the driver at 0.

◆ emptyAt

double hitlib::LedStrand::Driver::emptyAt

◆ fullAt

double hitlib::LedStrand::Driver::fullAt

◆ wrap

bool hitlib::LedStrand::Driver::wrap

◆ smoothing

uint8_t hitlib::LedStrand::Driver::smoothing

0-99, as in levelSource().

◆ track

const MusicTrack* hitlib::LedStrand::Driver::track

MUSIC. Must outlive the strand.

◆ sensitivity

uint8_t hitlib::LedStrand::Driver::sensitivity

◆ loop

bool hitlib::LedStrand::Driver::loop

◆ shape

LfoShape hitlib::LedStrand::Driver::shape

LFO.

◆ periodMs

uint32_t hitlib::LedStrand::Driver::periodMs

◆ phasePct

uint8_t hitlib::LedStrand::Driver::phasePct

Offset into the period, so two LFOs can differ.