84inline Sequencer classicEndgameSeq(classicEgPhases, 3);
85inline void classicEgActivate(LedStrand& s) { classicEndgameSeq.start(s); }
86inline void classicEgTick (LedStrand& s) { classicEndgameSeq.update(s); }
90 {
"Showoff", 15,
showoff,
nullptr},
96 {
"Endgame", 100, classicEgActivate, classicEgTick},
114inline void modernRed (LedStrand& s) { s.pulse(0xFF0000, 14, 1, 0xFF6200); }
115inline void modernBlue (LedStrand& s) { s.pulse(0x0000FF, 14, 1, 0x009DFF); }
116inline void modernScore (LedStrand& s) { s.flash(0x11FF00, 100, 100); }
117inline void modernMatchloader (LedStrand& s) { s.pulse(0xEED202, 5, 1); }
118inline void modernEgGreen (LedStrand& s) { s.setColor(0x11FF00); }
119inline void modernEgPulse (LedStrand& s) { s.pulse(0x11FF00, 8, 2); }
121inline const Sequencer::Phase modernEgPhases[] = {
122 {15000, modernEgGreen},
123 {4000, modernEgPulse},
125inline Sequencer modernEndgameSeq(modernEgPhases, 2);
126inline void modernEgActivate(LedStrand& s) { modernEndgameSeq.start(s); }
127inline void modernEgTick (LedStrand& s) { modernEndgameSeq.update(s); }
131 {
"Showoff", 15,
showoff,
nullptr},
132 {
"Idle", 10, modernIdle,
nullptr},
133 {
"Red", 20, modernRed,
nullptr},
134 {
"Blue", 20, modernBlue,
nullptr},
135 {
"Scoring", 70, modernScore,
nullptr},
136 {
"Matchloading", 90, modernMatchloader,
nullptr},
137 {
"Endgame", 100, modernEgActivate, modernEgTick},
153inline void showyIdle (
LedStrand& s) { s.
flow(0xAC00FF, 0x000000, 1); }
154inline void showyRed (LedStrand& s) { s.pulse(0xFFFFFF, 4, 1, 0xFF0000); }
155inline void showyBlue (LedStrand& s) { s.pulse(0xFFFFFF, 4, 1, 0x0000FF); }
156inline void showyScore (LedStrand& s) { s.pulse(0x00FF88, 6, 2); }
157inline void showyEgPulse (LedStrand& s) { s.pulse(0xFFFF00, 6, 1); }
158inline void showyEgRainbow (LedStrand& s) { s.rainbow(2); }
160inline const Sequencer::Phase showyEgPhases[] = {
161 {2000, showyEgPulse},
162 {8000, showyEgRainbow},
164inline Sequencer showyEndgameSeq(showyEgPhases, 2);
165inline void showyEgActivate(LedStrand& s) { showyEndgameSeq.start(s); }
166inline void showyEgTick (LedStrand& s) { showyEndgameSeq.update(s); }
170 {
"Idle", 10, showyIdle,
nullptr},
171 {
"Red", 20, showyRed,
nullptr},
172 {
"Blue", 20, showyBlue,
nullptr},
173 {
"Scoring", 90, showyScore,
nullptr},
174 {
"Endgame", 100, showyEgActivate, showyEgTick},
Driver for a single WS2812B-compatible LED strip on a VEX ADI port.
Definition led_strand.hpp:53
void flash(uint32_t color, uint32_t onMs, uint32_t offMs, uint32_t bgColor=0x000000)
Blink the whole strip on and off.
void rainbow(uint8_t speed)
Scroll a full HSV rainbow across the strip.
void flow(uint32_t color1, uint32_t color2, uint8_t speed, bool invert=false, bool seamless=true)
Scroll a two-color gradient across the strip.
void pulse(uint32_t color, uint8_t runLength, uint8_t speed, uint32_t bgColor=0x000000, bool invert=false, bool bounce=false)
Animate a run of color moving across a background.
void setColor(uint32_t color)
Set all LEDs to a solid color.
const ProfileMode showyModes[]
Definition classic.hpp:169
void classicRed(LedStrand &s)
Definition classic.hpp:67
void classicEgCycle(LedStrand &s)
Definition classic.hpp:75
void classicIdle(LedStrand &s)
Definition classic.hpp:66
void classicScore(LedStrand &s)
Definition classic.hpp:69
const Profile modern
Modern profile instance.
Definition classic.hpp:146
const Profile classic
Classic profile instance.
Definition classic.hpp:106
void showoff(LedStrand &s)
Definition classic.hpp:71
const ProfileMode modernModes[]
Definition classic.hpp:130
void classicEgWarn(LedStrand &s)
Definition classic.hpp:73
const ProfileMode classicModes[]
Definition classic.hpp:89
const Profile showy
Showy profile instance.
Definition classic.hpp:183
void classicEgWhite(LedStrand &s)
Definition classic.hpp:74
void classicMatchloader(LedStrand &s)
Definition classic.hpp:70
void classicBlue(LedStrand &s)
Definition classic.hpp:68
Profile and mode descriptors for the hitlib event-driven animation system.
Multi-phase timed animation sequencer.
Single addressable LED strip driver with layered animation engine.
Definition classic.hpp:51
Describes a single named animation mode within a Profile.
Definition led_profile.hpp:38
An immutable, statically-allocated collection of ProfileMode entries.
Definition led_profile.hpp:68
One phase in the animation sequence.
Definition led_sequencer.hpp:53