11#include <units/frequency.h>
12#include <units/time.h>
13#include <units/dimensionless.h>
26 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
105 constexpr std::string_view
GetName()
const override
107 return "TwinkleOffAnimation";
154 Slot = std::move(newSlot);
169 Color = std::move(newColor);
Common interface implemented by all control requests.
Definition ControlRequest.hpp:27
Animation that randomly turns on LEDs until it reaches the maximum count, and then turns them all off...
Definition TwinkleOffAnimation.hpp:25
constexpr TwinkleOffAnimation & WithColor(signals::RGBWColor newColor)
Modifies this Control Request's Color parameter and returns itself for method-chaining and easier to ...
Definition TwinkleOffAnimation.hpp:167
constexpr TwinkleOffAnimation & WithMaxLEDsOnProportion(units::dimensionless::scalar_t newMaxLEDsOnProportion)
Modifies this Control Request's MaxLEDsOnProportion parameter and returns itself for method-chaining ...
Definition TwinkleOffAnimation.hpp:182
units::frequency::hertz_t FrameRate
The frame rate of the animation, from [2, 1000] Hz.
Definition TwinkleOffAnimation.hpp:63
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition TwinkleOffAnimation.hpp:105
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
constexpr TwinkleOffAnimation(int LEDStartIndex, int LEDEndIndex)
Animation that randomly turns on LEDs until it reaches the maximum count, and then turns them all off...
Definition TwinkleOffAnimation.hpp:93
constexpr TwinkleOffAnimation & WithLEDStartIndex(int newLEDStartIndex)
Modifies this Control Request's LEDStartIndex parameter and returns itself for method-chaining and ea...
Definition TwinkleOffAnimation.hpp:120
int LEDEndIndex
The index of the last LED this animation controls (inclusive).
Definition TwinkleOffAnimation.hpp:39
constexpr TwinkleOffAnimation & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition TwinkleOffAnimation.hpp:152
std::string ToString() const override
Returns a string representation of the object.
constexpr TwinkleOffAnimation & WithFrameRate(units::frequency::hertz_t newFrameRate)
Modifies this Control Request's FrameRate parameter and returns itself for method-chaining and easier...
Definition TwinkleOffAnimation.hpp:204
signals::RGBWColor Color
The color to use in the animation.
Definition TwinkleOffAnimation.hpp:48
constexpr ~TwinkleOffAnimation() override
Definition TwinkleOffAnimation.hpp:98
units::frequency::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition TwinkleOffAnimation.hpp:78
int LEDStartIndex
The index of the first LED this animation controls (inclusive).
Definition TwinkleOffAnimation.hpp:34
constexpr TwinkleOffAnimation & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition TwinkleOffAnimation.hpp:226
constexpr TwinkleOffAnimation & WithLEDEndIndex(int newLEDEndIndex)
Modifies this Control Request's LEDEndIndex parameter and returns itself for method-chaining and easi...
Definition TwinkleOffAnimation.hpp:136
units::dimensionless::scalar_t MaxLEDsOnProportion
The max proportion of LEDs that can be on, in the range [0.1, 1.0].
Definition TwinkleOffAnimation.hpp:52
int Slot
The slot of this animation, within [0, 7].
Definition TwinkleOffAnimation.hpp:44
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