11#include <units/frequency.h>
12#include <units/time.h>
24 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
98 constexpr std::string_view
GetName()
const override
100 return "SingleFadeAnimation";
147 Slot = std::move(newSlot);
162 Color = std::move(newColor);
Common interface implemented by all control requests.
Definition ControlRequest.hpp:27
Animation that fades into and out of a specified color.
Definition SingleFadeAnimation.hpp:23
constexpr ~SingleFadeAnimation() override
Definition SingleFadeAnimation.hpp:91
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition SingleFadeAnimation.hpp:98
std::string ToString() const override
Returns a string representation of the object.
int Slot
The slot of this animation, within [0, 7].
Definition SingleFadeAnimation.hpp:42
constexpr SingleFadeAnimation & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition SingleFadeAnimation.hpp:204
constexpr SingleFadeAnimation & WithFrameRate(units::frequency::hertz_t newFrameRate)
Modifies this Control Request's FrameRate parameter and returns itself for method-chaining and easier...
Definition SingleFadeAnimation.hpp:182
units::frequency::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition SingleFadeAnimation.hpp:72
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
constexpr SingleFadeAnimation & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition SingleFadeAnimation.hpp:145
units::frequency::hertz_t FrameRate
The frame rate of the animation, from [2, 1000] Hz.
Definition SingleFadeAnimation.hpp:57
int LEDEndIndex
The index of the last LED this animation controls (inclusive).
Definition SingleFadeAnimation.hpp:37
constexpr SingleFadeAnimation(int LEDStartIndex, int LEDEndIndex)
Animation that fades into and out of a specified color.
Definition SingleFadeAnimation.hpp:86
constexpr SingleFadeAnimation & WithColor(signals::RGBWColor newColor)
Modifies this Control Request's Color parameter and returns itself for method-chaining and easier to ...
Definition SingleFadeAnimation.hpp:160
signals::RGBWColor Color
The color to use in the animation.
Definition SingleFadeAnimation.hpp:46
constexpr SingleFadeAnimation & WithLEDStartIndex(int newLEDStartIndex)
Modifies this Control Request's LEDStartIndex parameter and returns itself for method-chaining and ea...
Definition SingleFadeAnimation.hpp:113
constexpr SingleFadeAnimation & WithLEDEndIndex(int newLEDEndIndex)
Modifies this Control Request's LEDEndIndex parameter and returns itself for method-chaining and easi...
Definition SingleFadeAnimation.hpp:129
int LEDStartIndex
The index of the first LED this animation controls (inclusive).
Definition SingleFadeAnimation.hpp:32
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