A class for driving addressable LEDs, such as WS2812Bs and NeoPixels.
Definition: AddressableLED.h:29
Class to control a simulated addressable LED.
Definition: AddressableLEDSim.h:22
void SetInitialized(bool initialized)
Change the Initialized value of the LED strip.
std::unique_ptr< CallbackStore > RegisterRunningCallback(NotifyCallback callback, bool initialNotify)
Register a callback on whether the LEDs are running.
AddressableLEDSim()
Constructs for the first addressable LED.
static AddressableLEDSim CreateForIndex(int index)
Creates an AddressableLEDSim for a simulated index.
int GetData(struct HAL_AddressableLEDData *data) const
Get the LED data.
AddressableLEDSim(const AddressableLED &addressableLED)
Constructs from an AddressableLED object.
void SetRunning(bool running)
Change whether the LEDs are active.
void SetLength(int length)
Change the length of the LED strip.
static AddressableLEDSim CreateForChannel(int pwmChannel)
Creates an AddressableLEDSim for a PWM channel.
bool GetInitialized() const
Check if initialized.
void SetOutputPort(int outputPort)
Change the output port.
int GetOutputPort() const
Get the output port.
int GetLength() const
Get the length of the LED strip.
void SetData(struct HAL_AddressableLEDData *data, int length)
Change the LED data.
std::unique_ptr< CallbackStore > RegisterLengthCallback(NotifyCallback callback, bool initialNotify)
Register a callback on the length.
int GetRunning() const
Check if the LEDs are running.
std::unique_ptr< CallbackStore > RegisterOutputPortCallback(NotifyCallback callback, bool initialNotify)
Register a callback on the output port.
std::unique_ptr< CallbackStore > RegisterDataCallback(ConstBufferCallback callback, bool initialNotify)
Register a callback on the LED data.
std::unique_ptr< CallbackStore > RegisterInitializedCallback(NotifyCallback callback, bool initialNotify)
Register a callback on the Initialized property.
std::function< void(std::string_view, const unsigned char *buffer, unsigned int count)> ConstBufferCallback
Definition: CallbackStore.h:16
std::function< void(std::string_view, const HAL_Value *)> NotifyCallback
Definition: CallbackStore.h:14
Definition: AprilTagPoseEstimator.h:15
structure for holding one LED's color data.
Definition: AddressableLEDTypes.h:13