CTRE_Phoenix 5.20.2
ctre::phoenix::led::ColorFlowAnimation Class Reference

#include <ColorFlowAnimation.h>

Inherits ctre::phoenix::led::BaseTwoSizeAnimation.

Public Types

enum  Direction { Forward = 0 , Backward = 1 }
 

Public Member Functions

 ColorFlowAnimation (int r, int g, int b, int w, double speed=1, int numLed=-1, Direction direction=Direction::Forward)
 
void SetDirection (Direction direction)
 
- Public Member Functions inherited from ctre::phoenix::led::BaseTwoSizeAnimation
 BaseTwoSizeAnimation (int idx, int r, int g, int b, int w, double speed, int numLed, int direction, int size)
 
BaseStandardAnimationGetBaseStandardAnimation ()
 
BaseTwoSizeAnimationGetBaseTwoSizeAnimation ()
 
void SetR (int r)
 
void SetG (int g)
 
void SetB (int b)
 
void SetW (int w)
 
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)
 
void SetSpeed (double speed)
 
void SetNumLed (int numLed)
 
virtual BaseStandardAnimationGetBaseStandardAnimation ()=0
 
virtual BaseTwoSizeAnimationGetBaseTwoSizeAnimation ()=0
 
int GetAnimationIdx ()
 
double GetSpeed ()
 
int GetNumLed ()
 

Detailed Description

Animation that gradually lights the entire LED strip one LED at a time.

Member Enumeration Documentation

◆ Direction

What direction does the color go

Enumerator
Forward 

Color goes forward, away from CANdle

Backward 

Color goes backward, toward CANdle

Constructor & Destructor Documentation

◆ ColorFlowAnimation()

ctre::phoenix::led::ColorFlowAnimation::ColorFlowAnimation ( int  r,
int  g,
int  b,
int  w,
double  speed = 1,
int  numLed = -1,
Direction  direction = Direction::Forward 
)

Constructor for a ColorFlowAnimation

Parameters
rHow much red should the color have [0, 255]
gHow much green should the color have [0, 255]
bHow much blue should the color have [0, 255]
wHow much white should the color have [0, 255]
speedHow fast should the color travel the strip [0, 1]
numLedHow many LEDs is the CANdle controlling
directionWhat direction should the color move in

Member Function Documentation

◆ SetDirection()

void ctre::phoenix::led::ColorFlowAnimation::SetDirection ( Direction  direction)

Sets the direction the color flow moves in

Parameters
directionWhat direction should the color move in

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