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;
116 constexpr std::string_view
GetName()
const override
118 return "RainbowAnimation";
171 Slot = std::move(newSlot);
Common interface implemented by all control requests.
Definition ControlRequest.hpp:27
Animation that creates a rainbow throughout all the LEDs.
Definition RainbowAnimation.hpp:24
signals::AnimationDirectionValue Direction
The direction of the animation.
Definition RainbowAnimation.hpp:56
constexpr RainbowAnimation & WithLEDStartIndex(int newLEDStartIndex)
Modifies this Control Request's LEDStartIndex parameter and returns itself for method-chaining and ea...
Definition RainbowAnimation.hpp:134
constexpr RainbowAnimation & WithLEDEndIndex(int newLEDEndIndex)
Modifies this Control Request's LEDEndIndex parameter and returns itself for method-chaining and easi...
Definition RainbowAnimation.hpp:153
units::frequency::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition RainbowAnimation.hpp:82
units::frequency::hertz_t FrameRate
The frame rate of the animation, from [2, 1000] Hz.
Definition RainbowAnimation.hpp:67
units::dimensionless::scalar_t Brightness
The brightness of the animation, as a scalar from 0.0 to 1.0.
Definition RainbowAnimation.hpp:52
constexpr RainbowAnimation & WithBrightness(units::dimensionless::scalar_t newBrightness)
Modifies this Control Request's Brightness parameter and returns itself for method-chaining and easie...
Definition RainbowAnimation.hpp:184
int Slot
The slot of this animation, within [0, 7].
Definition RainbowAnimation.hpp:48
constexpr RainbowAnimation & WithDirection(signals::AnimationDirectionValue newDirection)
Modifies this Control Request's Direction parameter and returns itself for method-chaining and easier...
Definition RainbowAnimation.hpp:199
constexpr RainbowAnimation & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition RainbowAnimation.hpp:169
constexpr RainbowAnimation(int LEDStartIndex, int LEDEndIndex)
Animation that creates a rainbow throughout all the LEDs.
Definition RainbowAnimation.hpp:104
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition RainbowAnimation.hpp:116
constexpr ~RainbowAnimation() override
Definition RainbowAnimation.hpp:109
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
constexpr RainbowAnimation & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition RainbowAnimation.hpp:243
constexpr RainbowAnimation & WithFrameRate(units::frequency::hertz_t newFrameRate)
Modifies this Control Request's FrameRate parameter and returns itself for method-chaining and easier...
Definition RainbowAnimation.hpp:221
std::string ToString() const override
Returns a string representation of the object.
int LEDStartIndex
The index of the first LED this animation controls (inclusive).
Definition RainbowAnimation.hpp:35
int LEDEndIndex
The index of the last LED this animation controls (inclusive).
Definition RainbowAnimation.hpp:43
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