11#include <units/frequency.h>
12#include <units/time.h>
13#include <units/dimensionless.h>
25 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
103 constexpr std::string_view
GetName()
const override
105 return "TwinkleAnimation";
152 Slot = std::move(newSlot);
167 Color = std::move(newColor);
Common interface implemented by all control requests.
Definition ControlRequest.hpp:27
Animation that randomly turns LEDs on and off to a certain color.
Definition TwinkleAnimation.hpp:24
constexpr ~TwinkleAnimation() override
Definition TwinkleAnimation.hpp:96
constexpr TwinkleAnimation & WithFrameRate(units::frequency::hertz_t newFrameRate)
Modifies this Control Request's FrameRate parameter and returns itself for method-chaining and easier...
Definition TwinkleAnimation.hpp:202
units::dimensionless::scalar_t MaxLEDsOnProportion
The max proportion of LEDs that can be on, in the range [0.1, 1.0].
Definition TwinkleAnimation.hpp:51
int Slot
The slot of this animation, within [0, 7].
Definition TwinkleAnimation.hpp:43
int LEDEndIndex
The index of the last LED this animation controls (inclusive).
Definition TwinkleAnimation.hpp:38
units::frequency::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition TwinkleAnimation.hpp:77
signals::RGBWColor Color
The color to use in the animation.
Definition TwinkleAnimation.hpp:47
constexpr TwinkleAnimation & WithLEDEndIndex(int newLEDEndIndex)
Modifies this Control Request's LEDEndIndex parameter and returns itself for method-chaining and easi...
Definition TwinkleAnimation.hpp:134
constexpr TwinkleAnimation(int LEDStartIndex, int LEDEndIndex)
Animation that randomly turns LEDs on and off to a certain color.
Definition TwinkleAnimation.hpp:91
constexpr TwinkleAnimation & WithColor(signals::RGBWColor newColor)
Modifies this Control Request's Color parameter and returns itself for method-chaining and easier to ...
Definition TwinkleAnimation.hpp:165
constexpr TwinkleAnimation & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition TwinkleAnimation.hpp:150
constexpr TwinkleAnimation & WithLEDStartIndex(int newLEDStartIndex)
Modifies this Control Request's LEDStartIndex parameter and returns itself for method-chaining and ea...
Definition TwinkleAnimation.hpp:118
constexpr TwinkleAnimation & WithMaxLEDsOnProportion(units::dimensionless::scalar_t newMaxLEDsOnProportion)
Modifies this Control Request's MaxLEDsOnProportion parameter and returns itself for method-chaining ...
Definition TwinkleAnimation.hpp:180
std::string ToString() const override
Returns a string representation of the object.
constexpr TwinkleAnimation & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition TwinkleAnimation.hpp:224
int LEDStartIndex
The index of the first LED this animation controls (inclusive).
Definition TwinkleAnimation.hpp:33
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition TwinkleAnimation.hpp:103
units::frequency::hertz_t FrameRate
The frame rate of the animation, from [2, 1000] Hz.
Definition TwinkleAnimation.hpp:62
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Represents an RGBW color that can be applied to an LED.
Definition RGBWColor.hpp:27
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:28
Definition motor_constants.h:14