|
| | CANdleSensor (int ledCount, int numSegments, int canID, std::string canbus="baseCAN") |
| | Construct a new CANdleSensor object.
|
|
| CANdleSensor (std::vector< int > segmentSizes, int canID, std::string canbus="baseCAN") |
|
| CANdleSensor (int ledCount, int numSegments) |
|
| CANdleSensor (std::vector< int > segmentSizes) |
|
void | SetBrightness (double brightness, bool saveImmediately=true) |
|
void | SetStripType (ctre::phoenix6::signals::StripTypeValue stripType, bool saveImmediately=true) |
|
void | ApplyConfig () |
| void | SetLED (int led, frc::Color8Bit color) |
| | Set the color of a specific LED.
|
| void | SetColor (int segment, frc::Color8Bit color, Priority priority=Priority::LOW) |
| | Set the color of a specific segment.
|
| void | SetColor (frc::Color8Bit color, Priority priority=Priority::LOW) |
| | Set the color for all segments.
|
| template<typename T> |
| void | SetAnimation (int segment, frc::Color8Bit color, Priority priority=Priority::LOW) |
| | Set an animation for a specific segment.
|
| template<typename T> |
| void | SetAnimation (frc::Color8Bit color, Priority priority=Priority::LOW) |
| | Set an animation for all segments.
|
| void | ClearAnimation (int segment) |
| | Clears any active animation for a specific segment.
|
| void | Reset () override |
| | Resets the CANdle device.
|
| void | SetGetter (std::function< int()> _lambda) |
| | Set the lambda function to fetch sensor data.
|
| void | ApplyPostProcessing (std::function< int(int)> func) |
| | Set a post-processing function for sensor data.
|
| int | Get () const |
| | Get the current sensor state.
|
| void | Refresh () override |
| | Refresh the sensor state.
|
| | Loggable (std::string_view name) |
| | Construct a Loggable that registers a top-level table name.
|
| | Loggable (std::shared_ptr< nt::NetworkTable > table) |
| | Construct a Loggable that uses an existing NetworkTable.
|
| | Loggable ()=default |
| | Default construct an uninitialized Loggable.
|
| void | LogChild (std::string_view name, Loggable *child) |
| | Register a child Loggable under a named subtree.
|
| void | LogChild (std::string_view name, wpi::Sendable *child) |
| | Register a child Sendable under a named subtree.
|
|
bool | WriteLog (std::string_view field, bool data) |
|
double | WriteLog (std::string_view field, double data) |
|
void | WriteLog (std::string_view field, const std::vector< double > &data) |
template<typename U>
requires units::traits::is_unit_t_v<U> |
| U | WriteLog (std::string_view field, U data) |
|
void | WriteLog (std::string_view field, std::string_view data) |
template<typename E>
requires std::is_enum_v<E> |
| void | WriteLog (std::string_view field, E data) |
template<typename T>
requires wpi::StructSerializable<T> && (!std::is_arithmetic_v<T>) |
| void | WriteLog (std::string_view field, const T &data) |
template<typename T>
requires wpi::StructSerializable<T> && (!std::is_arithmetic_v<T>) |
| void | WriteLog (std::string_view field, const std::vector< T > &data) |
|
bool | ReadLog (std::string_view field, bool defaultValue) |
|
double | ReadLog (std::string_view field, double defaultValue) |
template<typename U>
requires units::traits::is_unit_t_v<U> |
| U | ReadLog (std::string_view field, U defaultValue) |
|
|
static constexpr frc::Color8Bit | VALOR_GOLD {0xEE, 0xA8, 0x00} |
|
static constexpr frc::Color8Bit | VALOR_PURPLE {0xFF, 0x00, 0xFF} |
|
static constexpr frc::Color8Bit | RED {0xFF, 0x00, 0x00} |
|
static constexpr frc::Color8Bit | ORANGE {0xFF, 0x30, 0x00} |
|
static constexpr frc::Color8Bit | GREEN {0x00, 0xFF, 0x00} |
|
static constexpr frc::Color8Bit | BLUE {0x00, 0x00, 0xFF} |
|
static constexpr frc::Color8Bit | LIGHT_BLUE {0xFF, 0x00, 0xF9} |
|
static constexpr frc::Color8Bit | WHITE {0xFF, 0xFF, 0xFF} |
|
static constexpr frc::Color8Bit | OFF {0x00, 0x00, 0x00} |
|
static constexpr units::millisecond_t | LOOP_PERIOD = frc::TimedRobot::kDefaultPeriod / 2 |
Sensor for controlling the CANdle and associated LEDs.
This class manages a CANdle device and any connected LEDs. It supports setting static colors, animations, and segment-specific configurations.