11#include <ctre/Phoenix.h>
12#include <frc/util/Color.h>
13#include <frc2/command/SubsystemBase.h>
45 bool restorable =
true,
46 std::optional<std::function<
GamePiece()>> tipColor = std::nullopt);
49 bool restorable =
true,
50 std::optional<std::function<
GamePiece()>> tipColor = std::nullopt);
62 bool restorable =
true,
63 std::optional<std::function<
GamePiece()>> tipColor = std::nullopt);
78 void Blind(
bool restorable =
true);
82 void TemporaryAnimate(std::function<
void()> animationFunction, units::millisecond_t duration);
95 std::chrono::time_point<std::chrono::steady_clock>
m_startTime;
Definition simple_led_subsystem.h:25
void Blind(bool restorable=true)
Definition simple_led_subsystem.cpp:467
static constexpr int length_sideBack
Definition simple_led_subsystem.h:111
void TemporaryAnimate(std::function< void()> animationFunction, units::millisecond_t duration)
Definition simple_led_subsystem.cpp:540
static constexpr int startIndex_backLeft
Definition simple_led_subsystem.h:117
static constexpr bool inverted_frontLeft
true indicates first index is at top of tower
Definition simple_led_subsystem.h:102
void StopAllAnimations(bool restorable=true)
Definition simple_led_subsystem.cpp:414
bool m_enabled
Definition simple_led_subsystem.h:89
void SetLedGroupColor(LedGroup group, argos_lib::ArgosColor color, bool restorable=true)
Sets group of leds to given color.
Definition simple_led_subsystem.cpp:78
argos_lib::ArgosColor GetAllianceColor()
Definition simple_led_subsystem.cpp:381
units::millisecond_t m_temporaryDuration
Definition simple_led_subsystem.h:96
void SetAllGroupsOff(bool restorable=true)
Turn off all LEDs.
Definition simple_led_subsystem.cpp:431
void Enable()
Definition simple_led_subsystem.cpp:39
static constexpr int startIndex_sideFront
Definition simple_led_subsystem.h:107
static constexpr int length_frontRight
Definition simple_led_subsystem.h:104
static constexpr bool inverted_sideFront
Definition simple_led_subsystem.h:109
static constexpr int startIndex_backRight
Definition simple_led_subsystem.h:114
static constexpr int length_sideFront
Definition simple_led_subsystem.h:108
void Periodic() override
Definition simple_led_subsystem.cpp:65
void SetAllGroupsGamePieceColor(GamePiece gp, bool restorable=true)
Set all groups to color of given game piece.
Definition simple_led_subsystem.cpp:406
static constexpr int length_backRight
Definition simple_led_subsystem.h:115
void SetAllGroupsAllianceColor(bool fade, bool restorable=true, std::optional< std::function< GamePiece()> > tipColor=std::nullopt)
Set all groups of LEDs to the alliance color.
Definition simple_led_subsystem.cpp:391
static constexpr int length_backLeft
Definition simple_led_subsystem.h:118
std::optional< std::function< void(void)> > m_restoreAnimationFunction
Definition simple_led_subsystem.h:94
std::chrono::time_point< std::chrono::steady_clock > m_startTime
Definition simple_led_subsystem.h:95
std::function< void()> m_disableUpdateFunction
Definition simple_led_subsystem.h:92
static constexpr int startIndex_frontRight
Definition simple_led_subsystem.h:103
void SetDisableAnimation(std::function< void()> animationFunction)
Definition simple_led_subsystem.cpp:60
std::optional< CANdle > m_CANdle
Definition simple_led_subsystem.h:87
void SetAllGroupsColor(argos_lib::ArgosColor color, bool restorable=true, std::optional< std::function< GamePiece()> > tipColor=std::nullopt)
Sets all led groups to a given color.
Definition simple_led_subsystem.cpp:179
void SetAllGroupsLarson(argos_lib::ArgosColor color, bool restorable=true)
Definition simple_led_subsystem.cpp:350
void SetAllGroupsFade(argos_lib::ArgosColor color, bool restorable=true, std::optional< std::function< GamePiece()> > tipColor=std::nullopt)
Definition simple_led_subsystem.cpp:231
static constexpr bool inverted_backRight
Definition simple_led_subsystem.h:116
void Disable()
Definition simple_led_subsystem.cpp:42
static constexpr int length_frontLeft
Number of LEDs in strip.
Definition simple_led_subsystem.h:101
void SetAllGroupsFlash(argos_lib::ArgosColor color, bool restorable=true)
Definition simple_led_subsystem.cpp:276
argos_lib::ArgosLogger m_log
Definition simple_led_subsystem.h:88
bool m_hasBeenConnected
Definition simple_led_subsystem.h:90
void FireEverywhere(bool restorable=true)
Definition simple_led_subsystem.cpp:439
static constexpr bool inverted_sideBack
Definition simple_led_subsystem.h:112
static constexpr argos_lib::ArgosColor GetGamePieceColor(GamePiece gp, bool gammaCorrect=true)
Definition simple_led_subsystem.cpp:549
void SetLedsConnectedBrightness(bool connected)
Definition simple_led_subsystem.cpp:50
static constexpr bool inverted_backLeft
Definition simple_led_subsystem.h:119
static constexpr bool inverted_frontRight
Definition simple_led_subsystem.h:105
void SetLedStripColor(LedStrip strip, argos_lib::ArgosColor color, bool restorable=true)
Definition simple_led_subsystem.cpp:124
void FlashStrip(LedStrip strip, argos_lib::ArgosColor color, bool restorable=true)
Definition simple_led_subsystem.cpp:299
std::function< void()> m_ledUpdateFunction
Definition simple_led_subsystem.h:93
static constexpr int startIndex_sideBack
Definition simple_led_subsystem.h:110
void ColorSweep(argos_lib::ArgosColor color, bool correctGamma=true, bool restorable=true)
Definition simple_led_subsystem.cpp:496
static constexpr int startIndex_frontLeft
Address of first LED in strip.
Definition simple_led_subsystem.h:100
Log to the console in a clean, repeatable manner.
Definition log.h:22
GamePiece
Definition field_points.h:44
RobotInstance
Differentiates between practice robot and competition robot.
Definition config_types.h:13
LedStrip
Definition simple_led_subsystem.h:22
LedGroup
Definition simple_led_subsystem.h:21
AlignLedStatus
Definition simple_led_subsystem.h:23