HitLib 1.5.0
VEX V5 LED animation library for PROS
Loading...
Searching...
No Matches
classic.hpp File Reference

Ready-made Classic, Modern and Showy LED profiles. More...

Namespaces

namespace  hitlib
namespace  hitlib::profiles

Functions

Classic - setup functions

Internal callbacks used by the Classic profile modes.

void hitlib::profiles::classicIdle (LedStrand &s)
void hitlib::profiles::classicRed (LedStrand &s)
void hitlib::profiles::classicBlue (LedStrand &s)
void hitlib::profiles::classicScore (LedStrand &s)
void hitlib::profiles::classicMatchloader (LedStrand &s)
void hitlib::profiles::showoff (LedStrand &s)
void hitlib::profiles::classicEgWarn (LedStrand &s)
void hitlib::profiles::classicEgWhite (LedStrand &s)
void hitlib::profiles::classicEgCycle (LedStrand &s)

Variables

const ProfileMode hitlib::profiles::classicModes []
const Profile hitlib::profiles::classic
 Classic profile instance.
const ProfileMode hitlib::profiles::modernModes []
const Profile hitlib::profiles::modern
 Modern profile instance.
const ProfileMode hitlib::profiles::showyModes []
const Profile hitlib::profiles::showy
 Showy profile instance.

Detailed Description

Ready-made Classic, Modern and Showy LED profiles.

Include this header to access all three built-in profiles.

Mode index table (all profiles)

Classic and Modern have seven modes each and share their numbering. Showy has five, so its indices are its own: no Showoff or Matchload, and Endgame is 4 rather than 6. activateMode() takes a raw index into the profile's mode array, so activateMode(6) against Showy is out of range.

Mode Classic Modern Showy
Showoff 0 rainbow scroll 0 rainbow scroll —
Idle 1 magenta flow 1 pink pulse 0 purple flow
Red 2 red pulse 2 red pulse + orange bg 1 white pulse / red bg
Blue 3 blue pulse 3 blue pulse + cyan bg 2 white pulse / blue bg
Scoring 4 green pulse 4 green flash 3 teal pulse
Matchload 5 yellow pulse 5 yellow pulse —
Endgame 6 warn → white → cycle (12 s) 6 solid green → pulse (19 s) 4 yellow → rainbow (10 s)

Usage

void initialize() {
group.init();
group.start();
group.activateMode(1); // Idle
}
void autonomous() {
group.activateModeTimed(4, 1500); // Scoring for 1.5 s
}
void opcontrol() {
group.activateMode(6); // Endgame
}
Owns a set of LedStrand pointers and fans all animation commands out to each strand simultaneously.
Definition led_group.hpp:43
void init(uint32_t refreshMs=20)
Initialize hardware on all registered strands.
void attachProfile(const Profile *profile)
Attach a Profile and reset the mode stack.
void start()
Start the group refresh task.
void activateModeTimed(uint8_t modeIdx, uint32_t durationMs)
Push a timed mode onto the mode stack.
void activateMode(uint8_t modeIdx)
Push a persistent mode onto the mode stack.
Ready-made Classic, Modern and Showy LED profiles.
const Profile classic
Classic profile instance.
Definition classic.hpp:111
Top-level convenience header, includes the full hitlib public API.