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;
66 units::dimensionless::scalar_t
Cooling = 0.3;
126 constexpr std::string_view
GetName()
const override
128 return "FireAnimation";
181 Slot = std::move(newSlot);
243 Cooling = std::move(newCooling);
Common interface implemented by all control requests.
Definition ControlRequest.hpp:27
Animation that looks similar to a flame flickering.
Definition FireAnimation.hpp:24
constexpr FireAnimation & WithSparking(units::dimensionless::scalar_t newSparking)
Modifies this Control Request's Sparking parameter and returns itself for method-chaining and easier ...
Definition FireAnimation.hpp:225
units::dimensionless::scalar_t Sparking
The proportion of time in which sparks reignite the fire, as a scalar from 0.0 to 1....
Definition FireAnimation.hpp:61
constexpr FireAnimation & WithDirection(signals::AnimationDirectionValue newDirection)
Modifies this Control Request's Direction parameter and returns itself for method-chaining and easier...
Definition FireAnimation.hpp:209
std::string ToString() const override
Returns a string representation of the object.
units::dimensionless::scalar_t Brightness
The brightness of the animation, as a scalar from 0.0 to 1.0.
Definition FireAnimation.hpp:52
units::frequency::hertz_t UpdateFreqHz
The frequency at which this control will update.
Definition FireAnimation.hpp:92
constexpr FireAnimation & WithBrightness(units::dimensionless::scalar_t newBrightness)
Modifies this Control Request's Brightness parameter and returns itself for method-chaining and easie...
Definition FireAnimation.hpp:194
constexpr ~FireAnimation() override
Definition FireAnimation.hpp:119
int LEDEndIndex
The index of the last LED this animation controls (inclusive).
Definition FireAnimation.hpp:43
int Slot
The slot of this animation, within [0, 7].
Definition FireAnimation.hpp:48
constexpr FireAnimation & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the frequency at which this control will update.
Definition FireAnimation.hpp:285
constexpr FireAnimation & WithLEDEndIndex(int newLEDEndIndex)
Modifies this Control Request's LEDEndIndex parameter and returns itself for method-chaining and easi...
Definition FireAnimation.hpp:163
units::frequency::hertz_t FrameRate
The frame rate of the animation, from [2, 1000] Hz.
Definition FireAnimation.hpp:77
units::dimensionless::scalar_t Cooling
The rate at which the fire cools along the travel, as a scalar from 0.0 to 1.0.
Definition FireAnimation.hpp:66
constexpr FireAnimation & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition FireAnimation.hpp:179
constexpr FireAnimation & WithCooling(units::dimensionless::scalar_t newCooling)
Modifies this Control Request's Cooling parameter and returns itself for method-chaining and easier t...
Definition FireAnimation.hpp:241
constexpr std::string_view GetName() const override
Gets the name of this control request.
Definition FireAnimation.hpp:126
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 FireAnimation.hpp:35
constexpr FireAnimation & WithFrameRate(units::frequency::hertz_t newFrameRate)
Modifies this Control Request's FrameRate parameter and returns itself for method-chaining and easier...
Definition FireAnimation.hpp:263
signals::AnimationDirectionValue Direction
The direction of the animation.
Definition FireAnimation.hpp:56
constexpr FireAnimation(int LEDStartIndex, int LEDEndIndex)
Animation that looks similar to a flame flickering.
Definition FireAnimation.hpp:114
constexpr FireAnimation & WithLEDStartIndex(int newLEDStartIndex)
Modifies this Control Request's LEDStartIndex parameter and returns itself for method-chaining and ea...
Definition FireAnimation.hpp:144
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