12#include <units/frequency.h>
13#include <units/time.h>
25 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
117 constexpr std::string_view
GetName()
const override
119 return "ColorFlowAnimation";
172 Slot = std::move(newSlot);
187 Color = std::move(newColor);
Animation that gradually lights the entire LED strip one LED at a time.
Definition ColorFlowAnimation.hpp:24
units::frequency::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition ColorFlowAnimation.hpp:82
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
int LEDStartIndex
The index of the first LED this animation controls (inclusive).
Definition ColorFlowAnimation.hpp:35
constexpr ColorFlowAnimation & WithLEDEndIndex(int newLEDEndIndex)
Modifies this Control Request's LEDEndIndex parameter and returns itself for method-chaining and easi...
Definition ColorFlowAnimation.hpp:154
constexpr ColorFlowAnimation & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition ColorFlowAnimation.hpp:170
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition ColorFlowAnimation.hpp:117
units::frequency::hertz_t FrameRate
The frame rate of the animation, from [2, 1000] Hz.
Definition ColorFlowAnimation.hpp:67
constexpr ColorFlowAnimation & WithDirection(signals::AnimationDirectionValue newDirection)
Modifies this Control Request's Direction parameter and returns itself for method-chaining and easier...
Definition ColorFlowAnimation.hpp:200
signals::RGBWColor Color
The color to use in the animation.
Definition ColorFlowAnimation.hpp:52
constexpr ColorFlowAnimation & WithColor(signals::RGBWColor newColor)
Modifies this Control Request's Color parameter and returns itself for method-chaining and easier to ...
Definition ColorFlowAnimation.hpp:185
constexpr ColorFlowAnimation & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition ColorFlowAnimation.hpp:244
constexpr ColorFlowAnimation & WithLEDStartIndex(int newLEDStartIndex)
Modifies this Control Request's LEDStartIndex parameter and returns itself for method-chaining and ea...
Definition ColorFlowAnimation.hpp:135
constexpr ColorFlowAnimation & WithFrameRate(units::frequency::hertz_t newFrameRate)
Modifies this Control Request's FrameRate parameter and returns itself for method-chaining and easier...
Definition ColorFlowAnimation.hpp:222
constexpr ~ColorFlowAnimation() override
Definition ColorFlowAnimation.hpp:110
int Slot
The slot of this animation, within [0, 7].
Definition ColorFlowAnimation.hpp:48
constexpr ColorFlowAnimation(int LEDStartIndex, int LEDEndIndex)
Animation that gradually lights the entire LED strip one LED at a time.
Definition ColorFlowAnimation.hpp:105
std::string ToString() const override
Returns a string representation of the object.
int LEDEndIndex
The index of the last LED this animation controls (inclusive).
Definition ColorFlowAnimation.hpp:43
signals::AnimationDirectionValue Direction
The direction of the animation.
Definition ColorFlowAnimation.hpp:56
Common interface implemented by all control requests.
Definition ControlRequest.hpp:27
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
Direction of the animation.
Definition SpnEnums.hpp:4819
static constexpr int Forward
The animation starts at the specified LED start index and moves towards the LED end index.
Definition SpnEnums.hpp:4826