CTRE Phoenix C++ 5.33.1
|
The base class for one generic type of animation. More...
#include <ctre/phoenix/led/BaseTwoSizeAnimation.h>
Public Member Functions | |
BaseTwoSizeAnimation (int idx, int r, int g, int b, int w, double speed, int numLed, int direction, int size, int ledOffset) | |
Constructor for the BaseStandardAnimation object. More... | |
~BaseTwoSizeAnimation () | |
BaseStandardAnimation * | GetBaseStandardAnimation () |
BaseTwoSizeAnimation * | GetBaseTwoSizeAnimation () |
void | SetR (int r) |
Sets the R value of the LEDs. More... | |
void | SetG (int g) |
Sets the G value of the LEDs. More... | |
void | SetB (int b) |
Sets the B value of the LEDs. More... | |
void | SetW (int w) |
Sets the W value of the LEDs. More... | |
void | SetDirection (int direction) |
void | SetSize (int size) |
int | GetR () |
int | GetG () |
int | GetB () |
int | GetW () |
int | GetDirection () |
int | GetSize () |
Public Member Functions inherited from ctre::phoenix::led::Animation | |
Animation (int idx, double speed, int numLed, int ledOffset) | |
Constructor for an Animation class. More... | |
virtual | ~Animation () |
void | SetSpeed (double speed) |
Sets the speed of the animation. More... | |
void | SetNumLed (int numLed) |
Sets the number of LEDs the animation will run on. More... | |
void | SetLedOffset (int ledOffset) |
Sets where the animation starts along the strip. More... | |
virtual BaseStandardAnimation * | GetBaseStandardAnimation ()=0 |
virtual BaseTwoSizeAnimation * | GetBaseTwoSizeAnimation ()=0 |
int | GetAnimationIdx () |
double | GetSpeed () |
int | GetNumLed () |
int | GetLedOffset () |
The base class for one generic type of animation.
These animations do allow the user to specify a color.
ctre::phoenix::led::BaseTwoSizeAnimation::BaseTwoSizeAnimation | ( | int | idx, |
int | r, | ||
int | g, | ||
int | b, | ||
int | w, | ||
double | speed, | ||
int | numLed, | ||
int | direction, | ||
int | size, | ||
int | ledOffset | ||
) |
Constructor for the BaseStandardAnimation object.
idx | The animation-specific ID |
r | The amount of red to set, a value between [0, 255] |
g | The amount of green to set, a value between [0, 255] |
b | The amount of blue to set, a value between [0, 255] |
w | The amount of white to set, a value between [0, 255] |
speed | The rate at which the animation runs at. Higher is generally faster |
numLed | The number of LEDs to run the animation on |
direction | An animation-specific parameter for its direction |
size | An animation-specific parameter for its size |
ledOffset | Where to start the animation |
ctre::phoenix::led::BaseTwoSizeAnimation::~BaseTwoSizeAnimation | ( | ) |
int ctre::phoenix::led::BaseTwoSizeAnimation::GetB | ( | ) |
|
virtual |
Implements ctre::phoenix::led::Animation.
|
virtual |
Implements ctre::phoenix::led::Animation.
int ctre::phoenix::led::BaseTwoSizeAnimation::GetDirection | ( | ) |
int ctre::phoenix::led::BaseTwoSizeAnimation::GetG | ( | ) |
int ctre::phoenix::led::BaseTwoSizeAnimation::GetR | ( | ) |
int ctre::phoenix::led::BaseTwoSizeAnimation::GetSize | ( | ) |
int ctre::phoenix::led::BaseTwoSizeAnimation::GetW | ( | ) |
void ctre::phoenix::led::BaseTwoSizeAnimation::SetB | ( | int | b | ) |
Sets the B value of the LEDs.
b | The amount of blue to set, a value between [0, 255] |
void ctre::phoenix::led::BaseTwoSizeAnimation::SetDirection | ( | int | direction | ) |
void ctre::phoenix::led::BaseTwoSizeAnimation::SetG | ( | int | g | ) |
Sets the G value of the LEDs.
g | The amount of green to set, a value between [0, 255] |
void ctre::phoenix::led::BaseTwoSizeAnimation::SetR | ( | int | r | ) |
Sets the R value of the LEDs.
r | The amount of red to set, a value between [0, 255] |
void ctre::phoenix::led::BaseTwoSizeAnimation::SetSize | ( | int | size | ) |
void ctre::phoenix::led::BaseTwoSizeAnimation::SetW | ( | int | w | ) |
Sets the W value of the LEDs.
w | The amount of white to set, a value between [0, 255] |