12#include <wpi/units/frequency.hpp>
13#include <wpi/units/time.hpp>
23 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override;
104 constexpr std::string_view
GetName()
const override
106 return "LarsonAnimation";
153 Slot = std::move(newSlot);
168 Color = std::move(newColor);
183 Size = std::move(newSize);
constexpr ControlRequest(ControlRequest const &)=default
int LEDEndIndex
The index of the last LED this animation controls (inclusive).
Definition LarsonAnimation.hpp:36
constexpr LarsonAnimation & WithColor(signals::RGBWColor newColor)
Modifies this Control Request's Color parameter and returns itself for method-chaining and easier to ...
Definition LarsonAnimation.hpp:166
constexpr LarsonAnimation & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition LarsonAnimation.hpp:151
wpi::units::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition LarsonAnimation.hpp:80
constexpr LarsonAnimation & WithFrameRate(wpi::units::hertz_t newFrameRate)
Modifies this Control Request's FrameRate parameter and returns itself for method-chaining and easier...
Definition LarsonAnimation.hpp:218
signals::RGBWColor Color
The color to use in the animation.
Definition LarsonAnimation.hpp:45
constexpr ~LarsonAnimation() override
Definition LarsonAnimation.hpp:97
int Size
The number of LEDs in the pocket of light, up to 15.
Definition LarsonAnimation.hpp:49
constexpr LarsonAnimation & WithUpdateFreqHz(wpi::units::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition LarsonAnimation.hpp:240
constexpr LarsonAnimation(int LEDStartIndex, int LEDEndIndex)
Animation that bounces a pocket of light across the LED strip.
Definition LarsonAnimation.hpp:92
constexpr LarsonAnimation & WithSize(int newSize)
Modifies this Control Request's Size parameter and returns itself for method-chaining and easier to u...
Definition LarsonAnimation.hpp:181
wpi::units::hertz_t FrameRate
The frame rate of the animation, from [2, 1000] Hz.
Definition LarsonAnimation.hpp:65
int Slot
The slot of this animation, within [0, 7].
Definition LarsonAnimation.hpp:41
constexpr LarsonAnimation & WithBounceMode(signals::LarsonBounceValue newBounceMode)
Modifies this Control Request's BounceMode parameter and returns itself for method-chaining and easie...
Definition LarsonAnimation.hpp:196
signals::LarsonBounceValue BounceMode
The behavior of the pocket of light when it reaches the end of the strip.
Definition LarsonAnimation.hpp:54
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition LarsonAnimation.hpp:104
std::map< std::string_view, std::string > GetControlInfo() const override
Gets information about this control request.
int LEDStartIndex
The index of the first LED this animation controls (inclusive).
Definition LarsonAnimation.hpp:31
std::string ToString() const override
Returns a string representation of the object.
constexpr LarsonAnimation & WithLEDEndIndex(int newLEDEndIndex)
Modifies this Control Request's LEDEndIndex parameter and returns itself for method-chaining and easi...
Definition LarsonAnimation.hpp:135
constexpr LarsonAnimation & WithLEDStartIndex(int newLEDStartIndex)
Modifies this Control Request's LEDStartIndex parameter and returns itself for method-chaining and ea...
Definition LarsonAnimation.hpp:119
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 MotionMagicDutyCycle.hpp:17
Definition ExternalFeedbackConfigs.hpp:16
Definition motor_constants.h:14
The behavior of the larson animation pocket of light when it reaches the end of the strip.
Definition SpnEnums.hpp:4650
static constexpr int Front
The animation bounces as soon as the first LED reaches the end of the strip.
Definition SpnEnums.hpp:4658