CTRE Phoenix C++ 5.36.0-beta-1
Loading...
Searching...
No Matches
Animation.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3
4#include <cstddef>
5
6namespace ctre{ namespace phoenix{ namespace led{
7
8class BaseStandardAnimation;
9class BaseTwoSizeAnimation;
10
11/**
12 * The base class for all animations that CANdle supports.
13 *
14 * @deprecated This device's Phoenix 5 API is deprecated for removal in the
15 * 2027 season. Users should update to Phoenix 6 firmware and migrate to the
16 * Phoenix 6 API. A migration guide is available at
17 * https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.
18 *
19 * If the Phoenix 5 API must be used for this device, the device must have 22.X
20 * firmware. This firmware is available in Tuner X after selecting Phoenix 5 in
21 * the firmware year dropdown.
22 */
23class [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2027 season."
24 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
25 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
27 int _animationIdx, _numLed, _ledOffset;
28 double _speed;
29public:
30 /**
31 * Constructor for an Animation class
32 * @param idx The animation-specific ID
33 * @param speed The rate at which the animation runs at. Higher is generally faster
34 * @param numLed The number of LEDs to run the animation on
35 * @param ledOffset Where to start the animation
36 */
37 Animation(int idx, double speed, int numLed, int ledOffset);
38 virtual ~Animation();
39 /**
40 * Sets the speed of the animation
41 * @param speed The rate at which the animation runs at. Higher is generally faster
42 */
43 void SetSpeed(double speed);
44 /**
45 * Sets the number of LEDs the animation will run on
46 * @param numLed The number of LEDs to run the animation on
47 */
48 void SetNumLed(int numLed);
49 /**
50 * Sets where the animation starts along the strip
51 * @param ledOffset Where to start the animation along the strip
52 */
53 void SetLedOffset(int ledOffset);
54
55 [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2027 season."
56 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
57 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
59 [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2027 season."
60 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
61 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
63
65 double GetSpeed();
66 int GetNumLed();
68};
69
70} // namespace led
71} // namespace phoenix
72} // namespace ctre
The base class for all animations that CANdle supports.
Definition Animation.h:26
void SetSpeed(double speed)
Sets the speed of the animation.
virtual BaseTwoSizeAnimation * GetBaseTwoSizeAnimation()=0
void SetNumLed(int numLed)
Sets the number of LEDs the animation will run on.
Animation(int idx, double speed, int numLed, int ledOffset)
Constructor for an Animation class.
void SetLedOffset(int ledOffset)
Sets where the animation starts along the strip.
virtual BaseStandardAnimation * GetBaseStandardAnimation()=0
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
WPI Compliant Pigeon class.
Definition PigeonIMU_StickyFaults.h:6