CTRE Phoenix C++ 5.33.1
ControlMode.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3
4namespace ctre {
5 namespace phoenix {
6 namespace motorcontrol {
7 /**
8 * Choose the control mode for a motor controller.
9 * Consult product specific documentation to determine what is available/supported.
10 */
11 enum class ControlMode {
12 /**
13 * Percent output [-1,1]
14 */
15 PercentOutput = 0,
16 /**
17 * Position closed loop
18 */
19 Position = 1,
20 /**
21 * Velocity closed loop
22 */
23 Velocity = 2,
24 /**
25 * Input current closed loop
26 */
27 Current = 3,
28 /**
29 * Follow other motor controller
30 */
31 Follower = 5,
32 /**
33 * Motion Profile
34 */
35 MotionProfile = 6,
36 /**
37 * Motion Magic
38 */
39 MotionMagic = 7,
40 /**
41 * Motion Profile with auxiliary output
42 */
44 /**
45 * Plays a single tone. Frequency (hz) is passed into set.
46 */
47 MusicTone = 13,
48 /**
49 * Disable Motor Controller
50 */
51 Disabled = 15,
52 };
53 /**
54 * Choose the control mode for a TalonFX / Falcon 500.
55 *
56 * @deprecated This device's Phoenix 5 API is deprecated for removal in the
57 * 2025 season. Users should update to Phoenix 6 firmware and migrate to the
58 * Phoenix 6 API. A migration guide is available at
59 * https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.
60 *
61 * If the Phoenix 5 API must be used for this device, the device must have 22.X
62 * firmware. This firmware is available in Tuner X after selecting Phoenix 5 in
63 * the firmware year dropdown.
64 */
65 enum class [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2025 season."
66 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
67 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
69 /**
70 * Percent output [-1,1]
71 */
72 PercentOutput = 0,
73 /**
74 * Position closed loop
75 */
76 Position = 1,
77 /**
78 * Velocity closed loop
79 */
80 Velocity = 2,
81 /**
82 * Input current closed loop
83 */
84 Current = 3,
85 /**
86 * Follow other motor controller
87 */
88 Follower = 5,
89 /**
90 * Motion Profile
91 */
92 MotionProfile = 6,
93 /**
94 * Motion Magic
95 */
96 MotionMagic = 7,
97 /**
98 * Motion Profile with auxiliary output
99 */
100 MotionProfileArc = 10,
101 /**
102 * Plays a single tone. Frequency (hz) is passed into set.
103 */
104 MusicTone = 13,
105 /**
106 * Disable Motor Controller
107 */
108 Disabled = 15,
109 };
110
111 /**
112 * Choose the control mode for a Talon SRX.
113 */
115 /**
116 * Percent output [-1,1]
117 */
118 PercentOutput = 0,
119 /**
120 * Position closed loop
121 */
122 Position = 1,
123 /**
124 * Velocity closed loop
125 */
126 Velocity = 2,
127 /**
128 * Input current closed loop
129 */
130 Current = 3,
131 /**
132 * Follow other motor controller
133 */
134 Follower = 5,
135 /**
136 * Motion Profile
137 */
138 MotionProfile = 6,
139 /**
140 * Motion Magic
141 */
142 MotionMagic = 7,
143 /**
144 * Motion Profile with auxiliary output
145 */
146 MotionProfileArc = 10,
147 /**
148 * Disable Motor Controller
149 */
150 Disabled = 15,
151 };
152
153 /**
154 * Choose the control mode for a Victor SPX.
155 */
157 /**
158 * Percent output [-1,1]
159 */
160 PercentOutput = 0,
161 /**
162 * Position closed loop
163 */
164 Position = 1,
165 /**
166 * Velocity closed loop
167 */
168 Velocity = 2,
169 /**
170 * Follow other motor controller
171 */
172 Follower = 5,
173 /**
174 * Motion Profile
175 */
176 MotionProfile = 6,
177 /**
178 * Motion Magic
179 */
180 MotionMagic = 7,
181 /**
182 * Motion Profile with auxiliary output
183 */
184 MotionProfileArc = 10,
185 /**
186 * Disable Motor Controller
187 */
188 Disabled = 15,
189 };
190 }
191 }
192}
ControlMode
Choose the control mode for a motor controller.
Definition: ControlMode.h:11
@ Current
Input current closed loop.
@ MotionProfileArc
Motion Profile with auxiliary output.
@ Follower
Follow other motor controller.
@ PercentOutput
Percent output [-1,1].
@ Disabled
Disable Motor Controller.
TalonFXControlMode
Choose the control mode for a TalonFX / Falcon 500.
Definition: ControlMode.h:68
TalonSRXControlMode
Choose the control mode for a Talon SRX.
Definition: ControlMode.h:114
VictorSPXControlMode
Choose the control mode for a Victor SPX.
Definition: ControlMode.h:156
namespace ctre
Definition: paramEnum.h:5