CTRE Phoenix C++ 5.33.1
ctre::phoenix::led::BaseTwoSizeAnimation Class Reference

The base class for one generic type of animation. More...

#include <ctre/phoenix/led/BaseTwoSizeAnimation.h>

Inheritance diagram for ctre::phoenix::led::BaseTwoSizeAnimation:
ctre::phoenix::led::Animation ctre::phoenix::led::ColorFlowAnimation ctre::phoenix::led::LarsonAnimation ctre::phoenix::led::SingleFadeAnimation ctre::phoenix::led::StrobeAnimation ctre::phoenix::led::TwinkleAnimation ctre::phoenix::led::TwinkleOffAnimation

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 ()
 
BaseStandardAnimationGetBaseStandardAnimation ()
 
BaseTwoSizeAnimationGetBaseTwoSizeAnimation ()
 
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 BaseStandardAnimationGetBaseStandardAnimation ()=0
 
virtual BaseTwoSizeAnimationGetBaseTwoSizeAnimation ()=0
 
int GetAnimationIdx ()
 
double GetSpeed ()
 
int GetNumLed ()
 
int GetLedOffset ()
 

Detailed Description

The base class for one generic type of animation.

These animations do allow the user to specify a color.

Constructor & Destructor Documentation

◆ BaseTwoSizeAnimation()

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.

Parameters
idxThe animation-specific ID
rThe amount of red to set, a value between [0, 255]
gThe amount of green to set, a value between [0, 255]
bThe amount of blue to set, a value between [0, 255]
wThe amount of white to set, a value between [0, 255]
speedThe rate at which the animation runs at. Higher is generally faster
numLedThe number of LEDs to run the animation on
directionAn animation-specific parameter for its direction
sizeAn animation-specific parameter for its size
ledOffsetWhere to start the animation

◆ ~BaseTwoSizeAnimation()

ctre::phoenix::led::BaseTwoSizeAnimation::~BaseTwoSizeAnimation ( )

Member Function Documentation

◆ GetB()

int ctre::phoenix::led::BaseTwoSizeAnimation::GetB ( )

◆ GetBaseStandardAnimation()

BaseStandardAnimation * ctre::phoenix::led::BaseTwoSizeAnimation::GetBaseStandardAnimation ( )
virtual

◆ GetBaseTwoSizeAnimation()

BaseTwoSizeAnimation * ctre::phoenix::led::BaseTwoSizeAnimation::GetBaseTwoSizeAnimation ( )
virtual

◆ GetDirection()

int ctre::phoenix::led::BaseTwoSizeAnimation::GetDirection ( )

◆ GetG()

int ctre::phoenix::led::BaseTwoSizeAnimation::GetG ( )

◆ GetR()

int ctre::phoenix::led::BaseTwoSizeAnimation::GetR ( )

◆ GetSize()

int ctre::phoenix::led::BaseTwoSizeAnimation::GetSize ( )

◆ GetW()

int ctre::phoenix::led::BaseTwoSizeAnimation::GetW ( )

◆ SetB()

void ctre::phoenix::led::BaseTwoSizeAnimation::SetB ( int  b)

Sets the B value of the LEDs.

Parameters
bThe amount of blue to set, a value between [0, 255]

◆ SetDirection()

void ctre::phoenix::led::BaseTwoSizeAnimation::SetDirection ( int  direction)

◆ SetG()

void ctre::phoenix::led::BaseTwoSizeAnimation::SetG ( int  g)

Sets the G value of the LEDs.

Parameters
gThe amount of green to set, a value between [0, 255]

◆ SetR()

void ctre::phoenix::led::BaseTwoSizeAnimation::SetR ( int  r)

Sets the R value of the LEDs.

Parameters
rThe amount of red to set, a value between [0, 255]

◆ SetSize()

void ctre::phoenix::led::BaseTwoSizeAnimation::SetSize ( int  size)

◆ SetW()

void ctre::phoenix::led::BaseTwoSizeAnimation::SetW ( int  w)

Sets the W value of the LEDs.

Parameters
wThe amount of white to set, a value between [0, 255]

The documentation for this class was generated from the following file: