CTRE Phoenix C++ 5.33.1
BaseStandardAnimation.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3
5
6namespace ctre{ namespace phoenix{ namespace led{
7
8/**
9 * The base class for one generic type of animation.
10 * These animations do not allow the user to specify a color.
11 */
13 double _brightness, _param4, _param5;
14 bool _reverseDirection;
15public:
16 /**
17 * Constructor for the BaseStandardAnimation object
18 * @param idx The animation-specific ID
19 * @param brightness The brightness to run the animation at. This is a scalar from [0, 1]
20 * @param speed The rate at which the animation runs at. Higher is generally faster
21 * @param numLed The number of LEDs to run the animation on
22 * @param param4 Animation-specific parameter
23 * @param param5 Animation-specific parameter
24 * @param reverseDirection True to reverse the animation direction, so instead of going "away" from the CANdle, it will go "toward" the CANdle.
25 * @param ledOffset Where to start the animation
26 */
27 BaseStandardAnimation(int idx, double brightness, double speed, int numLed, double param4, double param5, bool reverseDirection, int ledOffset);
29
32
33 /**
34 * Sets the brightness of this animation
35 * @param brightness The brightness to run the animation at. This is a scalar from [0, 1]
36 */
37 void SetBrightness(double brightness);
38 void SetParam4(double param4);
39 void SetParam5(double param5);
40 /**
41 * Set the Direction of the animation
42 * @param reverseDirection True to reverse the animation direction, so instead of fire going "away" from the CANdle, it will go "toward" the CANdle.
43 */
44 void SetReverseDirection(bool reverseDirection);
45
46 double GetBrightness();
47 double GetParam4();
48 double GetParam5();
50};
51
52} // namespace led
53} // namespace phoenix
54} // namespace ctre
The base class for all animations that CANdle supports.
Definition: Animation.h:14
The base class for one generic type of animation.
Definition: BaseStandardAnimation.h:12
void SetBrightness(double brightness)
Sets the brightness of this animation.
void SetReverseDirection(bool reverseDirection)
Set the Direction of the animation.
BaseTwoSizeAnimation * GetBaseTwoSizeAnimation()
BaseStandardAnimation(int idx, double brightness, double speed, int numLed, double param4, double param5, bool reverseDirection, int ledOffset)
Constructor for the BaseStandardAnimation object.
BaseStandardAnimation * GetBaseStandardAnimation()
The base class for one generic type of animation.
Definition: BaseTwoSizeAnimation.h:12
namespace ctre
Definition: paramEnum.h:5