|
| | 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 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.
|
| void | SetPeriodicLevel (LogLevel level) |
| | Set the logging level for LoggablePeriodic.
|
| template<typename T> |
| T | WriteLog (std::string_view field, const T &data, LogLevel level=LogLevel::Normal) |
| | Publish a value to NetworkTables under the given field.
|
| template<typename T> |
| T | ReadLog (std::string_view field, const T &defaultValue={}) |
| | Read a value from NetworkTables for the given field.
|
|
template<> |
| decltype(Loggable::subscribers) ::iterator | addSubscriber (std::string_view field, const std::vector< bool > &defaultValue) |
|
template<> |
| void | WriteLogImpl (nt::Publisher *pub, const std::vector< bool > &data) |
|
template<> |
| std::vector< bool > | ReadLogImpl (nt::Subscriber *sub) |
|
|
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.