12 #include <hal/AddressableLEDTypes.h>
13 #include <hal/Types.h>
14 #include <units/units.h>
15 #include <wpi/ArrayRef.h>
17 #include "frc/ErrorBase.h"
18 #include "util/Color.h"
19 #include "util/Color8Bit.h"
33 LEDData(
int _r,
int _g,
int _b) {
60 void SetHSV(
int h,
int s,
int v);
67 void SetLED(
const Color& color) {
68 this->r = color.red * 255;
69 this->g = color.green * 255;
70 this->b = color.blue * 255;
80 this->g = color.green;
124 void SetData(std::initializer_list<LEDData> ledData);
137 void SetBitTiming(units::nanosecond_t lowTime0, units::nanosecond_t highTime0,
138 units::nanosecond_t lowTime1,
139 units::nanosecond_t highTime1);
164 hal::Handle<HAL_DigitalHandle> m_pwmHandle;
165 hal::Handle<HAL_AddressableLEDHandle> m_handle;
Definition: AddressableLEDTypes.h:14
void SetRGB(int r, int g, int b)
A helper method to set all values of the LED.
Definition: AddressableLED.h:47
void SetBitTiming(units::nanosecond_t lowTime0, units::nanosecond_t highTime0, units::nanosecond_t lowTime1, units::nanosecond_t highTime1)
Sets the bit timing.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:42
void Stop()
Stops the output.
void Start()
Starts the output.
Represents colors that can be used with Addressable LEDs.
Definition: Color.h:19
Base class for most objects.
Definition: ErrorBase.h:104
void SetData(wpi::ArrayRef< LEDData > ledData)
Sets the led output data.
Definition: AddressableLED.h:30
AddressableLED(int port)
Constructs a new driver for a specific port.
void SetLength(int length)
Sets the length of the LED strip.
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16
void SetSyncTime(units::microsecond_t syncTime)
Sets the sync time.
Represents colors that can be used with Addressable LEDs.
Definition: Color8Bit.h:19
A class for driving addressable LEDs, such as WS2812s and NeoPixels.
Definition: AddressableLED.h:28
void SetHSV(int h, int s, int v)
A helper method to set all values of the LED.