CTRE Phoenix C++ 5.36.0-beta-1
Loading...
Searching...
No Matches
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 *
12 * @deprecated This device's Phoenix 5 API is deprecated for removal in the
13 * 2027 season. Users should update to Phoenix 6 firmware and migrate to the
14 * Phoenix 6 API. A migration guide is available at
15 * https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.
16 *
17 * If the Phoenix 5 API must be used for this device, the device must have 22.X
18 * firmware. This firmware is available in Tuner X after selecting Phoenix 5 in
19 * the firmware year dropdown.
20 */
21class [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2027 season."
22 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
23 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
25 int _r, _g, _b, _w;
26 int _direction, _size;
27
28public:
29
30 /**
31 * Constructor for the BaseStandardAnimation object
32 * @param idx The animation-specific ID
33 * @param r The amount of red to set, a value between [0, 255]
34 * @param g The amount of green to set, a value between [0, 255]
35 * @param b The amount of blue to set, a value between [0, 255]
36 * @param w The amount of white to set, a value between [0, 255]
37 * @param speed The rate at which the animation runs at. Higher is generally faster
38 * @param numLed The number of LEDs to run the animation on
39 * @param direction An animation-specific parameter for its direction
40 * @param size An animation-specific parameter for its size
41 * @param ledOffset Where to start the animation
42 */
43 BaseTwoSizeAnimation(int idx, int r, int g, int b, int w, double speed, int numLed, int direction, int size, int ledOffset);
45
46 [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2027 season."
47 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
48 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
50 [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2027 season."
51 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
52 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
54
55 /**
56 * Sets the R value of the LEDs
57 * @param r The amount of red to set, a value between [0, 255]
58 */
59 void SetR(int r);
60 /**
61 * Sets the G value of the LEDs
62 * @param g The amount of green to set, a value between [0, 255]
63 */
64 void SetG(int g);
65 /**
66 * Sets the B value of the LEDs
67 * @param b The amount of blue to set, a value between [0, 255]
68 */
69 void SetB(int b);
70 /**
71 * Sets the W value of the LEDs
72 * @param w The amount of white to set, a value between [0, 255]
73 */
74 void SetW(int w);
75 void SetDirection(int direction);
76 void SetSize(int size);
77
78 int GetR();
79 int GetG();
80 int GetB();
81 int GetW();
83 int GetSize();
84};
85
86} // namespace led
87} // namespace phoenix
88} // namespace ctre
89
The base class for all animations that CANdle supports.
Definition Animation.h:26
The base class for one generic type of animation.
Definition BaseStandardAnimation.h:24
The base class for one generic type of animation.
Definition BaseTwoSizeAnimation.h:24
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.
WPI Compliant Pigeon class.
Definition PigeonIMU_StickyFaults.h:6