9#include <ctre/Phoenix.h>
10#include <frc/AddressableLED.h>
11#include <frc2/command/SubsystemBase.h>
21 frc::AddressableLED::LEDData
color;
112 std::vector<LEDUpdateGroup>
GetDeltaUpdate(
const std::vector<LEDState>& prev,
const std::vector<LEDState>& current);
Definition led_subsystem.h:47
void StockAnimateIntegratedLEDs(ctre::phoenix::led::Animation &animation, int slot)
Set LEDs built into CANdle to use stock animation.
Definition led_subsystem.cpp:56
static constexpr unsigned numIntegratedLEDs
Number of LEDs addressed before attached LED strip/panel.
Definition led_subsystem.h:103
std::vector< LEDState > m_prevLEDs
LED status prior to last update.
Definition led_subsystem.h:99
std::vector< LEDState > m_currentLEDs
LED status to send as update.
Definition led_subsystem.h:98
std::vector< argos_lib::led::Animation > m_customAnimations
Active animations.
Definition led_subsystem.h:100
void CustomAnimateAuxLEDs(argos_lib::led::Animation animation)
Set LEDs in attached strip/panel to use custom animation. The LEDs will be updated on every call of t...
Definition led_subsystem.cpp:64
void StockAnimateAuxLEDs(ctre::phoenix::led::Animation &animation, int slot)
Set LEDs in attached strip/panel to use stock animation.
Definition led_subsystem.cpp:50
void Periodic() override
Definition led_subsystem.cpp:36
std::vector< LEDUpdateGroup > GetDeltaUpdate(const std::vector< LEDState > &prev, const std::vector< LEDState > ¤t)
Get sendable LED block updates to change from prev to current.
Definition led_subsystem.cpp:82
void CustomAnimateIntegratedLEDs(argos_lib::led::Animation animation)
Set LEDs built into CANdle to use custom animation. The LEDs will be updated on every call of the sub...
Definition led_subsystem.cpp:72
ctre::phoenix::led::CANdle m_controller
LED controller instance with attached LEDs.
Definition led_subsystem.h:101
Definition swap_controllers_command.h:12
Color and animation status for an individual LED.
Definition led_subsystem.h:19
bool operator==(const LEDState &other) const
It's an equality comparison operator...
Definition led_subsystem.cpp:19
bool animated
True indicates this is using a stock animation.
Definition led_subsystem.h:20
frc::AddressableLED::LEDData color
Color of LED. Only used when animated is false.
Definition led_subsystem.h:21
LEDState & operator=(const frc::AddressableLED::LEDData &other)
Copy assignment operator.
Definition led_subsystem.cpp:26
bool operator!=(const LEDState &other) const
It's an inequality comparison operator...
Definition led_subsystem.cpp:22
Represents a contiguous block of LEDs that have the same color.
Definition led_subsystem.h:117
unsigned startIndex
Address of first LED.
Definition led_subsystem.h:128
unsigned numLEDs
Number of LEDs in group.
Definition led_subsystem.h:129
LEDUpdateGroup(unsigned startIndex, unsigned numLEDs, frc::AddressableLED::LEDData color)
Construct a new LEDUpdateGroup with specified color.
Definition led_subsystem.h:125
frc::AddressableLED::LEDData color
Color of LEDs.
Definition led_subsystem.h:130
A representation of a custom LED animation.
Definition animiation.h:20