CTRE Phoenix C++ 5.36.0-beta-1
Loading...
Searching...
No Matches
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 *
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 double _brightness, _param4, _param5;
26 bool _reverseDirection;
27public:
28 /**
29 * Constructor for the BaseStandardAnimation object
30 * @param idx The animation-specific ID
31 * @param brightness The brightness to run the animation at. This is a scalar from [0, 1]
32 * @param speed The rate at which the animation runs at. Higher is generally faster
33 * @param numLed The number of LEDs to run the animation on
34 * @param param4 Animation-specific parameter
35 * @param param5 Animation-specific parameter
36 * @param reverseDirection True to reverse the animation direction, so instead of going "away" from the CANdle, it will go "toward" the CANdle.
37 * @param ledOffset Where to start the animation
38 */
39 BaseStandardAnimation(int idx, double brightness, double speed, int numLed, double param4, double param5, bool reverseDirection, int ledOffset);
41
42 [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2027 season."
43 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
44 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
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
51 /**
52 * Sets the brightness of this animation
53 * @param brightness The brightness to run the animation at. This is a scalar from [0, 1]
54 */
55 void SetBrightness(double brightness);
56 void SetParam4(double param4);
57 void SetParam5(double param5);
58 /**
59 * Set the Direction of the animation
60 * @param reverseDirection True to reverse the animation direction, so instead of fire going "away" from the CANdle, it will go "toward" the CANdle.
61 */
62 void SetReverseDirection(bool reverseDirection);
63
64 double GetBrightness();
65 double GetParam4();
66 double GetParam5();
68};
69
70} // namespace led
71} // namespace phoenix
72} // namespace ctre
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
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:24
WPI Compliant Pigeon class.
Definition PigeonIMU_StickyFaults.h:6