HitLib 1.3.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)

Index Name Classic Modern Showy
0 Showoff rainbow scroll rainbow scroll
1 Idle magenta flow pink pulse purple flow
2 Red red pulse red pulse + orange bg white pulse / red bg
3 Blue blue pulse blue pulse + cyan bg white pulse / blue bg
4 Scoring green pulse green flash teal pulse
5 Matchload yellow pulse yellow pulse
6 Endgame warn → white → cycle (12 s) solid green → pulse (19 s) 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:39
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:106
Top-level convenience header, includes the full hitlib public API.