CTRE Phoenix C++ 5.33.1
BaseTwoSizeAnimation.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 allow the user to specify a color.
11 */
13 int _r, _g, _b, _w;
14 int _direction, _size;
15
16public:
17
18 /**
19 * Constructor for the BaseStandardAnimation object
20 * @param idx The animation-specific ID
21 * @param r The amount of red to set, a value between [0, 255]
22 * @param g The amount of green to set, a value between [0, 255]
23 * @param b The amount of blue to set, a value between [0, 255]
24 * @param w The amount of white to set, a value between [0, 255]
25 * @param speed The rate at which the animation runs at. Higher is generally faster
26 * @param numLed The number of LEDs to run the animation on
27 * @param direction An animation-specific parameter for its direction
28 * @param size An animation-specific parameter for its size
29 * @param ledOffset Where to start the animation
30 */
31 BaseTwoSizeAnimation(int idx, int r, int g, int b, int w, double speed, int numLed, int direction, int size, int ledOffset);
33
36
37 /**
38 * Sets the R value of the LEDs
39 * @param r The amount of red to set, a value between [0, 255]
40 */
41 void SetR(int r);
42 /**
43 * Sets the G value of the LEDs
44 * @param g The amount of green to set, a value between [0, 255]
45 */
46 void SetG(int g);
47 /**
48 * Sets the B value of the LEDs
49 * @param b The amount of blue to set, a value between [0, 255]
50 */
51 void SetB(int b);
52 /**
53 * Sets the W value of the LEDs
54 * @param w The amount of white to set, a value between [0, 255]
55 */
56 void SetW(int w);
57 void SetDirection(int direction);
58 void SetSize(int size);
59
60 int GetR();
61 int GetG();
62 int GetB();
63 int GetW();
65 int GetSize();
66};
67
68} // namespace led
69} // namespace phoenix
70} // namespace ctre
71
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
The base class for one generic type of animation.
Definition: BaseTwoSizeAnimation.h:12
BaseTwoSizeAnimation * GetBaseTwoSizeAnimation()
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.
void SetG(int g)
Sets the G value of the LEDs.
void SetB(int b)
Sets the B value of the LEDs.
BaseStandardAnimation * GetBaseStandardAnimation()
void SetR(int r)
Sets the R value of the LEDs.
void SetW(int w)
Sets the W value of the LEDs.
namespace ctre
Definition: paramEnum.h:5