CTRE Phoenix C++ 5.33.1
ctre::phoenix::led::Animation Class Referenceabstract

The base class for all animations that CANdle supports. More...

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

Inheritance diagram for ctre::phoenix::led::Animation:
ctre::phoenix::led::BaseStandardAnimation ctre::phoenix::led::BaseTwoSizeAnimation ctre::phoenix::led::FireAnimation ctre::phoenix::led::RainbowAnimation ctre::phoenix::led::RgbFadeAnimation 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

 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 all animations that CANdle supports.

Constructor & Destructor Documentation

◆ Animation()

ctre::phoenix::led::Animation::Animation ( int  idx,
double  speed,
int  numLed,
int  ledOffset 
)

Constructor for an Animation class.

Parameters
idxThe animation-specific ID
speedThe rate at which the animation runs at. Higher is generally faster
numLedThe number of LEDs to run the animation on
ledOffsetWhere to start the animation

◆ ~Animation()

virtual ctre::phoenix::led::Animation::~Animation ( )
virtual

Member Function Documentation

◆ GetAnimationIdx()

int ctre::phoenix::led::Animation::GetAnimationIdx ( )

◆ GetBaseStandardAnimation()

virtual BaseStandardAnimation * ctre::phoenix::led::Animation::GetBaseStandardAnimation ( )
pure virtual

◆ GetBaseTwoSizeAnimation()

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

◆ GetLedOffset()

int ctre::phoenix::led::Animation::GetLedOffset ( )

◆ GetNumLed()

int ctre::phoenix::led::Animation::GetNumLed ( )

◆ GetSpeed()

double ctre::phoenix::led::Animation::GetSpeed ( )

◆ SetLedOffset()

void ctre::phoenix::led::Animation::SetLedOffset ( int  ledOffset)

Sets where the animation starts along the strip.

Parameters
ledOffsetWhere to start the animation along the strip

◆ SetNumLed()

void ctre::phoenix::led::Animation::SetNumLed ( int  numLed)

Sets the number of LEDs the animation will run on.

Parameters
numLedThe number of LEDs to run the animation on

◆ SetSpeed()

void ctre::phoenix::led::Animation::SetSpeed ( double  speed)

Sets the speed of the animation.

Parameters
speedThe rate at which the animation runs at. Higher is generally faster

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