CTRE Phoenix 6 C++ 26.1.3
Loading...
Searching...
No Matches
SupportsFOC.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) Cross The Road Electronics.  All rights reserved.
3 * License information can be found in CTRE_LICENSE.txt
4 * For support and suggestions contact support@ctr-electronics.com or file
5 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases
6 */
7#pragma once
8
39
40
41namespace ctre {
42namespace phoenix6 {
43namespace hardware {
44namespace traits {
45
46/**
47 * Requires Phoenix Pro; Contains all FOC-exclusive control functions available
48 * for devices that support FOC.
49 */
50class SupportsFOC : public virtual CommonDevice
51{
52public:
53 virtual ~SupportsFOC() = default;
54
55 /**
56 * \brief Trips if a major mechanical or ESD event caused a brief loss
57 * of position data triggering a recovery while not in motion. If the
58 * event occurs often, inspect for excess axial force or sources of
59 * ESD at the rotor.
60 *
61 * - Default Value: False
62 *
63 * This refreshes and returns a cached StatusSignal object.
64 *
65 * \param refresh Whether to refresh the StatusSignal before returning it;
66 * defaults to true
67 * \returns Fault_RotorFault1 Status Signal Object
68 */
69 virtual StatusSignal<bool> &GetFault_RotorFault1(bool refresh = true) = 0;
70
71 /**
72 * \brief Trips if a major mechanical or ESD event caused a brief loss
73 * of position data triggering a recovery while not in motion. If the
74 * event occurs often, inspect for excess axial force or sources of
75 * ESD at the rotor.
76 *
77 * - Default Value: False
78 *
79 * This refreshes and returns a cached StatusSignal object.
80 *
81 * \param refresh Whether to refresh the StatusSignal before returning it;
82 * defaults to true
83 * \returns StickyFault_RotorFault1 Status Signal Object
84 */
85 virtual StatusSignal<bool> &GetStickyFault_RotorFault1(bool refresh = true) = 0;
86
87 /**
88 * \brief Trips if a major mechanical or ESD event caused a brief loss
89 * of position data triggering a recovery while in motion. If the
90 * event occurs often, inspect for excess axial force or sources of
91 * ESD at the rotor.
92 *
93 * - Default Value: False
94 *
95 * This refreshes and returns a cached StatusSignal object.
96 *
97 * \param refresh Whether to refresh the StatusSignal before returning it;
98 * defaults to true
99 * \returns Fault_RotorFault2 Status Signal Object
100 */
101 virtual StatusSignal<bool> &GetFault_RotorFault2(bool refresh = true) = 0;
102
103 /**
104 * \brief Trips if a major mechanical or ESD event caused a brief loss
105 * of position data triggering a recovery while in motion. If the
106 * event occurs often, inspect for excess axial force or sources of
107 * ESD at the rotor.
108 *
109 * - Default Value: False
110 *
111 * This refreshes and returns a cached StatusSignal object.
112 *
113 * \param refresh Whether to refresh the StatusSignal before returning it;
114 * defaults to true
115 * \returns StickyFault_RotorFault2 Status Signal Object
116 */
117 virtual StatusSignal<bool> &GetStickyFault_RotorFault2(bool refresh = true) = 0;
118
119 /**
120 * \brief Request a specified motor current (field oriented control).
121 *
122 * \details This control request will drive the motor to the requested
123 * motor (stator) current value. This leverages field oriented
124 * control (FOC), which means greater peak power than what is
125 * documented. This scales to torque based on Motor's kT constant.
126 *
127 * - TorqueCurrentFOC Parameters:
128 * - Output: Amount of motor current in Amperes
129 * - MaxAbsDutyCycle: The maximum absolute motor output that can be applied,
130 * which effectively limits the velocity. For example, 0.50
131 * means no more than 50% output in either direction. This
132 * is useful for preventing the motor from spinning to its
133 * terminal velocity when there is no external torque
134 * applied unto the rotor. Note this is absolute maximum,
135 * so the value should be between zero and one.
136 * - Deadband: Deadband in Amperes. If torque request is within deadband, the
137 * bridge output is neutral. If deadband is set to zero then there
138 * is effectively no deadband. Note if deadband is zero, a free
139 * spinning motor will spin for quite a while as the firmware
140 * attempts to hold the motor's bemf. If user expects motor to
141 * cease spinning quickly with a demand of zero, we recommend a
142 * deadband of one Ampere. This value will be converted to an
143 * integral value of amps.
144 * - OverrideCoastDurNeutral: Set to true to coast the rotor when output is
145 * zero (or within deadband). Set to false to use
146 * the NeutralMode configuration setting (default).
147 * This flag exists to provide the fundamental
148 * behavior of this control when output is zero,
149 * which is to provide 0A (zero torque).
150 * - LimitForwardMotion: Set to true to force forward limiting. This allows
151 * users to use other limit switch sensors connected to
152 * robot controller. This also allows use of active
153 * sensors that require external power.
154 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
155 * users to use other limit switch sensors connected to
156 * robot controller. This also allows use of active
157 * sensors that require external power.
158 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
159 * the LimitForwardMotion and LimitReverseMotion
160 * parameters, instead allowing motion.
161 *
162 * This can be useful on mechanisms such as an
163 * intake/feeder, where a limit switch stops motion
164 * while intaking but should be ignored when feeding
165 * to a shooter.
166 *
167 * The hardware limit faults and Forward/ReverseLimit
168 * signals will still report the values of the limit
169 * switches regardless of this parameter.
170 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
171 * allowing motion.
172 *
173 * This can be useful when calibrating the zero point
174 * of a mechanism such as an elevator.
175 *
176 * The software limit faults will still report the
177 * values of the software limits regardless of this
178 * parameter.
179 * - UseTimesync: Set to true to delay applying this control request until a
180 * timesync boundary (requires Phoenix Pro and CANivore). This
181 * eliminates the impact of nondeterministic network delays in
182 * exchange for a larger but deterministic control latency.
183 *
184 * This requires setting the ControlTimesyncFreqHz config in
185 * MotorOutputConfigs. Additionally, when this is enabled, the
186 * UpdateFreqHz of this request should be set to 0 Hz.
187 *
188 * \param request Control object to request of the device
189 * \returns Status Code of the request, 0 is OK
190 */
192
193 /**
194 * \brief Request PID to target position with torque current
195 * feedforward.
196 *
197 * \details This control mode will set the motor's position setpoint
198 * to the position specified by the user. In addition, it will apply
199 * an additional torque current as an arbitrary feedforward value.
200 *
201 * - PositionTorqueCurrentFOC Parameters:
202 * - Position: Position to drive toward in rotations.
203 * - Velocity: Velocity to drive toward in rotations per second. This is
204 * typically used for motion profiles generated by the robot
205 * program.
206 * - FeedForward: Feedforward to apply in torque current in Amperes. This is
207 * added to the output of the onboard feedforward terms.
208 *
209 * User can use motor's kT to scale Newton-meter to Amperes.
210 * - Slot: Select which gains are applied by selecting the slot. Use the
211 * configuration api to set the gain values for the selected slot
212 * before enabling this feature. Slot must be within [0,2].
213 * - OverrideCoastDurNeutral: Set to true to coast the rotor when output is
214 * zero (or within deadband). Set to false to use
215 * the NeutralMode configuration setting (default).
216 * This flag exists to provide the fundamental
217 * behavior of this control when output is zero,
218 * which is to provide 0A (zero torque).
219 * - LimitForwardMotion: Set to true to force forward limiting. This allows
220 * users to use other limit switch sensors connected to
221 * robot controller. This also allows use of active
222 * sensors that require external power.
223 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
224 * users to use other limit switch sensors connected to
225 * robot controller. This also allows use of active
226 * sensors that require external power.
227 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
228 * the LimitForwardMotion and LimitReverseMotion
229 * parameters, instead allowing motion.
230 *
231 * This can be useful on mechanisms such as an
232 * intake/feeder, where a limit switch stops motion
233 * while intaking but should be ignored when feeding
234 * to a shooter.
235 *
236 * The hardware limit faults and Forward/ReverseLimit
237 * signals will still report the values of the limit
238 * switches regardless of this parameter.
239 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
240 * allowing motion.
241 *
242 * This can be useful when calibrating the zero point
243 * of a mechanism such as an elevator.
244 *
245 * The software limit faults will still report the
246 * values of the software limits regardless of this
247 * parameter.
248 * - UseTimesync: Set to true to delay applying this control request until a
249 * timesync boundary (requires Phoenix Pro and CANivore). This
250 * eliminates the impact of nondeterministic network delays in
251 * exchange for a larger but deterministic control latency.
252 *
253 * This requires setting the ControlTimesyncFreqHz config in
254 * MotorOutputConfigs. Additionally, when this is enabled, the
255 * UpdateFreqHz of this request should be set to 0 Hz.
256 *
257 * \param request Control object to request of the device
258 * \returns Status Code of the request, 0 is OK
259 */
261
262 /**
263 * \brief Request PID to target velocity with torque current
264 * feedforward.
265 *
266 * \details This control mode will set the motor's velocity setpoint
267 * to the velocity specified by the user. In addition, it will apply
268 * an additional torque current as an arbitrary feedforward value.
269 *
270 * - VelocityTorqueCurrentFOC Parameters:
271 * - Velocity: Velocity to drive toward in rotations per second.
272 * - Acceleration: Acceleration to drive toward in rotations per second
273 * squared. This is typically used for motion profiles
274 * generated by the robot program.
275 * - FeedForward: Feedforward to apply in torque current in Amperes. This is
276 * added to the output of the onboard feedforward terms.
277 *
278 * User can use motor's kT to scale Newton-meter to Amperes.
279 * - Slot: Select which gains are applied by selecting the slot. Use the
280 * configuration api to set the gain values for the selected slot
281 * before enabling this feature. Slot must be within [0,2].
282 * - OverrideCoastDurNeutral: Set to true to coast the rotor when output is
283 * zero (or within deadband). Set to false to use
284 * the NeutralMode configuration setting (default).
285 * This flag exists to provide the fundamental
286 * behavior of this control when output is zero,
287 * which is to provide 0A (zero torque).
288 * - LimitForwardMotion: Set to true to force forward limiting. This allows
289 * users to use other limit switch sensors connected to
290 * robot controller. This also allows use of active
291 * sensors that require external power.
292 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
293 * users to use other limit switch sensors connected to
294 * robot controller. This also allows use of active
295 * sensors that require external power.
296 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
297 * the LimitForwardMotion and LimitReverseMotion
298 * parameters, instead allowing motion.
299 *
300 * This can be useful on mechanisms such as an
301 * intake/feeder, where a limit switch stops motion
302 * while intaking but should be ignored when feeding
303 * to a shooter.
304 *
305 * The hardware limit faults and Forward/ReverseLimit
306 * signals will still report the values of the limit
307 * switches regardless of this parameter.
308 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
309 * allowing motion.
310 *
311 * This can be useful when calibrating the zero point
312 * of a mechanism such as an elevator.
313 *
314 * The software limit faults will still report the
315 * values of the software limits regardless of this
316 * parameter.
317 * - UseTimesync: Set to true to delay applying this control request until a
318 * timesync boundary (requires Phoenix Pro and CANivore). This
319 * eliminates the impact of nondeterministic network delays in
320 * exchange for a larger but deterministic control latency.
321 *
322 * This requires setting the ControlTimesyncFreqHz config in
323 * MotorOutputConfigs. Additionally, when this is enabled, the
324 * UpdateFreqHz of this request should be set to 0 Hz.
325 *
326 * \param request Control object to request of the device
327 * \returns Status Code of the request, 0 is OK
328 */
330
331 /**
332 * \brief Requests Motion Magic® to target a final position using a
333 * motion profile. Users can optionally provide a torque current
334 * feedforward.
335 *
336 * \details Motion Magic® produces a motion profile in real-time while
337 * attempting to honor the Cruise Velocity, Acceleration, and
338 * (optional) Jerk specified via the Motion Magic® configuration
339 * values. This control mode does not use the Expo_kV or Expo_kA
340 * configs.
341 *
342 * Target position can be changed on-the-fly and Motion Magic® will do
343 * its best to adjust the profile. This control mode is based on
344 * torque current, so relevant closed-loop gains will use Amperes for
345 * the numerator.
346 *
347 * - MotionMagicTorqueCurrentFOC Parameters:
348 * - Position: Position to drive toward in rotations.
349 * - FeedForward: Feedforward to apply in torque current in Amperes. This is
350 * added to the output of the onboard feedforward terms.
351 *
352 * User can use motor's kT to scale Newton-meter to Amperes.
353 * - Slot: Select which gains are applied by selecting the slot. Use the
354 * configuration api to set the gain values for the selected slot
355 * before enabling this feature. Slot must be within [0,2].
356 * - OverrideCoastDurNeutral: Set to true to coast the rotor when output is
357 * zero (or within deadband). Set to false to use
358 * the NeutralMode configuration setting (default).
359 * This flag exists to provide the fundamental
360 * behavior of this control when output is zero,
361 * which is to provide 0A (zero torque).
362 * - LimitForwardMotion: Set to true to force forward limiting. This allows
363 * users to use other limit switch sensors connected to
364 * robot controller. This also allows use of active
365 * sensors that require external power.
366 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
367 * users to use other limit switch sensors connected to
368 * robot controller. This also allows use of active
369 * sensors that require external power.
370 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
371 * the LimitForwardMotion and LimitReverseMotion
372 * parameters, instead allowing motion.
373 *
374 * This can be useful on mechanisms such as an
375 * intake/feeder, where a limit switch stops motion
376 * while intaking but should be ignored when feeding
377 * to a shooter.
378 *
379 * The hardware limit faults and Forward/ReverseLimit
380 * signals will still report the values of the limit
381 * switches regardless of this parameter.
382 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
383 * allowing motion.
384 *
385 * This can be useful when calibrating the zero point
386 * of a mechanism such as an elevator.
387 *
388 * The software limit faults will still report the
389 * values of the software limits regardless of this
390 * parameter.
391 * - UseTimesync: Set to true to delay applying this control request until a
392 * timesync boundary (requires Phoenix Pro and CANivore). This
393 * eliminates the impact of nondeterministic network delays in
394 * exchange for a larger but deterministic control latency.
395 *
396 * This requires setting the ControlTimesyncFreqHz config in
397 * MotorOutputConfigs. Additionally, when this is enabled, the
398 * UpdateFreqHz of this request should be set to 0 Hz.
399 *
400 * \param request Control object to request of the device
401 * \returns Status Code of the request, 0 is OK
402 */
404
405 /**
406 * \brief Requests Motion Magic® to target a final velocity using a
407 * motion profile. This allows smooth transitions between velocity
408 * set points. Users can optionally provide a torque feedforward.
409 *
410 * \details Motion Magic® Velocity produces a motion profile in
411 * real-time while attempting to honor the specified Acceleration and
412 * (optional) Jerk. This control mode does not use the
413 * CruiseVelocity, Expo_kV, or Expo_kA configs.
414 *
415 * If the specified acceleration is zero, the Acceleration under
416 * Motion Magic® configuration parameter is used instead. This allows
417 * for runtime adjustment of acceleration for advanced users. Jerk is
418 * also specified in the Motion Magic® persistent configuration
419 * values. If Jerk is set to zero, Motion Magic® will produce a
420 * trapezoidal acceleration profile.
421 *
422 * Target velocity can also be changed on-the-fly and Motion Magic®
423 * will do its best to adjust the profile. This control mode is based
424 * on torque current, so relevant closed-loop gains will use Amperes
425 * for the numerator.
426 *
427 * - MotionMagicVelocityTorqueCurrentFOC Parameters:
428 * - Velocity: Target velocity to drive toward in rotations per second. This
429 * can be changed on-the fly.
430 * - Acceleration: This is the absolute Acceleration to use generating the
431 * profile. If this parameter is zero, the Acceleration
432 * persistent configuration parameter is used instead.
433 * Acceleration is in rotations per second squared. If
434 * nonzero, the signage does not matter as the absolute value
435 * is used.
436 * - FeedForward: Feedforward to apply in torque current in Amperes. This is
437 * added to the output of the onboard feedforward terms.
438 *
439 * User can use motor's kT to scale Newton-meter to Amperes.
440 * - Slot: Select which gains are applied by selecting the slot. Use the
441 * configuration api to set the gain values for the selected slot
442 * before enabling this feature. Slot must be within [0,2].
443 * - OverrideCoastDurNeutral: Set to true to coast the rotor when output is
444 * zero (or within deadband). Set to false to use
445 * the NeutralMode configuration setting (default).
446 * This flag exists to provide the fundamental
447 * behavior of this control when output is zero,
448 * which is to provide 0A (zero torque).
449 * - LimitForwardMotion: Set to true to force forward limiting. This allows
450 * users to use other limit switch sensors connected to
451 * robot controller. This also allows use of active
452 * sensors that require external power.
453 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
454 * users to use other limit switch sensors connected to
455 * robot controller. This also allows use of active
456 * sensors that require external power.
457 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
458 * the LimitForwardMotion and LimitReverseMotion
459 * parameters, instead allowing motion.
460 *
461 * This can be useful on mechanisms such as an
462 * intake/feeder, where a limit switch stops motion
463 * while intaking but should be ignored when feeding
464 * to a shooter.
465 *
466 * The hardware limit faults and Forward/ReverseLimit
467 * signals will still report the values of the limit
468 * switches regardless of this parameter.
469 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
470 * allowing motion.
471 *
472 * This can be useful when calibrating the zero point
473 * of a mechanism such as an elevator.
474 *
475 * The software limit faults will still report the
476 * values of the software limits regardless of this
477 * parameter.
478 * - UseTimesync: Set to true to delay applying this control request until a
479 * timesync boundary (requires Phoenix Pro and CANivore). This
480 * eliminates the impact of nondeterministic network delays in
481 * exchange for a larger but deterministic control latency.
482 *
483 * This requires setting the ControlTimesyncFreqHz config in
484 * MotorOutputConfigs. Additionally, when this is enabled, the
485 * UpdateFreqHz of this request should be set to 0 Hz.
486 *
487 * \param request Control object to request of the device
488 * \returns Status Code of the request, 0 is OK
489 */
491
492 /**
493 * \brief Requests Motion Magic® to target a final position using an
494 * exponential motion profile. Users can optionally provide a torque
495 * current feedforward.
496 *
497 * \details Motion Magic® Expo produces a motion profile in real-time
498 * while attempting to honor the Cruise Velocity (optional) and the
499 * mechanism kV and kA, specified via the Motion Magic® configuration
500 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA
501 * configs are always in output units of Volts.
502 *
503 * Setting Cruise Velocity to 0 will allow the profile to run to the
504 * max possible velocity based on Expo_kV. This control mode does not
505 * use the Acceleration or Jerk configs.
506 *
507 * Target position can be changed on-the-fly and Motion Magic® will do
508 * its best to adjust the profile. This control mode is based on
509 * torque current, so relevant closed-loop gains will use Amperes for
510 * the numerator.
511 *
512 * - MotionMagicExpoTorqueCurrentFOC Parameters:
513 * - Position: Position to drive toward in rotations.
514 * - FeedForward: Feedforward to apply in torque current in Amperes. This is
515 * added to the output of the onboard feedforward terms.
516 *
517 * User can use motor's kT to scale Newton-meter to Amperes.
518 * - Slot: Select which gains are applied by selecting the slot. Use the
519 * configuration api to set the gain values for the selected slot
520 * before enabling this feature. Slot must be within [0,2].
521 * - OverrideCoastDurNeutral: Set to true to coast the rotor when output is
522 * zero (or within deadband). Set to false to use
523 * the NeutralMode configuration setting (default).
524 * This flag exists to provide the fundamental
525 * behavior of this control when output is zero,
526 * which is to provide 0A (zero torque).
527 * - LimitForwardMotion: Set to true to force forward limiting. This allows
528 * users to use other limit switch sensors connected to
529 * robot controller. This also allows use of active
530 * sensors that require external power.
531 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
532 * users to use other limit switch sensors connected to
533 * robot controller. This also allows use of active
534 * sensors that require external power.
535 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
536 * the LimitForwardMotion and LimitReverseMotion
537 * parameters, instead allowing motion.
538 *
539 * This can be useful on mechanisms such as an
540 * intake/feeder, where a limit switch stops motion
541 * while intaking but should be ignored when feeding
542 * to a shooter.
543 *
544 * The hardware limit faults and Forward/ReverseLimit
545 * signals will still report the values of the limit
546 * switches regardless of this parameter.
547 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
548 * allowing motion.
549 *
550 * This can be useful when calibrating the zero point
551 * of a mechanism such as an elevator.
552 *
553 * The software limit faults will still report the
554 * values of the software limits regardless of this
555 * parameter.
556 * - UseTimesync: Set to true to delay applying this control request until a
557 * timesync boundary (requires Phoenix Pro and CANivore). This
558 * eliminates the impact of nondeterministic network delays in
559 * exchange for a larger but deterministic control latency.
560 *
561 * This requires setting the ControlTimesyncFreqHz config in
562 * MotorOutputConfigs. Additionally, when this is enabled, the
563 * UpdateFreqHz of this request should be set to 0 Hz.
564 *
565 * \param request Control object to request of the device
566 * \returns Status Code of the request, 0 is OK
567 */
569
570 /**
571 * \brief Requests Motion Magic® to target a final position using a
572 * motion profile. This dynamic request allows runtime changes to
573 * Cruise Velocity, Acceleration, and (optional) Jerk. Users can
574 * optionally provide a torque current feedforward.
575 *
576 * \details Motion Magic® produces a motion profile in real-time while
577 * attempting to honor the specified Cruise Velocity, Acceleration,
578 * and (optional) Jerk. This control mode does not use the Expo_kV or
579 * Expo_kA configs.
580 *
581 * Target position can be changed on-the-fly and Motion Magic® will do
582 * its best to adjust the profile. This control mode is based on
583 * torque current, so relevant closed-loop gains will use Amperes for
584 * the numerator.
585 *
586 * - DynamicMotionMagicTorqueCurrentFOC Parameters:
587 * - Position: Position to drive toward in rotations.
588 * - Velocity: Cruise velocity for profiling. The signage does not matter as
589 * the device will use the absolute value for profile generation.
590 * - Acceleration: Acceleration for profiling. The signage does not matter as
591 * the device will use the absolute value for profile
592 * generation.
593 * - Jerk: Jerk for profiling. The signage does not matter as the device will
594 * use the absolute value for profile generation.
595 *
596 * Jerk is optional; if this is set to zero, then Motion Magic® will
597 * not apply a Jerk limit.
598 * - FeedForward: Feedforward to apply in torque current in Amperes. This is
599 * added to the output of the onboard feedforward terms.
600 *
601 * User can use motor's kT to scale Newton-meter to Amperes.
602 * - Slot: Select which gains are applied by selecting the slot. Use the
603 * configuration api to set the gain values for the selected slot
604 * before enabling this feature. Slot must be within [0,2].
605 * - OverrideCoastDurNeutral: Set to true to coast the rotor when output is
606 * zero (or within deadband). Set to false to use
607 * the NeutralMode configuration setting (default).
608 * This flag exists to provide the fundamental
609 * behavior of this control when output is zero,
610 * which is to provide 0A (zero torque).
611 * - LimitForwardMotion: Set to true to force forward limiting. This allows
612 * users to use other limit switch sensors connected to
613 * robot controller. This also allows use of active
614 * sensors that require external power.
615 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
616 * users to use other limit switch sensors connected to
617 * robot controller. This also allows use of active
618 * sensors that require external power.
619 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
620 * the LimitForwardMotion and LimitReverseMotion
621 * parameters, instead allowing motion.
622 *
623 * This can be useful on mechanisms such as an
624 * intake/feeder, where a limit switch stops motion
625 * while intaking but should be ignored when feeding
626 * to a shooter.
627 *
628 * The hardware limit faults and Forward/ReverseLimit
629 * signals will still report the values of the limit
630 * switches regardless of this parameter.
631 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
632 * allowing motion.
633 *
634 * This can be useful when calibrating the zero point
635 * of a mechanism such as an elevator.
636 *
637 * The software limit faults will still report the
638 * values of the software limits regardless of this
639 * parameter.
640 * - UseTimesync: Set to true to delay applying this control request until a
641 * timesync boundary (requires Phoenix Pro and CANivore). This
642 * eliminates the impact of nondeterministic network delays in
643 * exchange for a larger but deterministic control latency.
644 *
645 * This requires setting the ControlTimesyncFreqHz config in
646 * MotorOutputConfigs. Additionally, when this is enabled, the
647 * UpdateFreqHz of this request should be set to 0 Hz.
648 *
649 * \param request Control object to request of the device
650 * \returns Status Code of the request, 0 is OK
651 */
653
654 /**
655 * \brief Requests Motion Magic® Expo to target a final position using
656 * an exponential motion profile. This dynamic request allows runtime
657 * changes to the profile kV, kA, and (optional) Cruise Velocity.
658 * Users can optionally provide a torque current feedforward.
659 *
660 * \details Motion Magic® Expo produces a motion profile in real-time
661 * while attempting to honor the specified Cruise Velocity (optional)
662 * and the mechanism kV and kA. Note that unlike the slot gains, the
663 * Expo_kV and Expo_kA parameters are always in output units of Volts.
664 *
665 * Setting the Cruise Velocity to 0 will allow the profile to run to
666 * the max possible velocity based on Expo_kV. This control mode does
667 * not use the Acceleration or Jerk configs.
668 *
669 * Target position can be changed on-the-fly and Motion Magic® will do
670 * its best to adjust the profile. This control mode is based on
671 * torque current, so relevant closed-loop gains will use Amperes for
672 * the numerator.
673 *
674 * - DynamicMotionMagicExpoTorqueCurrentFOC Parameters:
675 * - Position: Position to drive toward in rotations.
676 * - kV: Mechanism kV for profiling. Unlike the kV slot gain, this is always
677 * in units of V/rps.
678 *
679 * This represents the amount of voltage necessary to hold a velocity.
680 * In terms of the Motion Magic® Expo profile, a higher kV results in a
681 * slower maximum velocity.
682 * - kA: Mechanism kA for profiling. Unlike the kA slot gain, this is always
683 * in units of V/rps².
684 *
685 * This represents the amount of voltage necessary to achieve an
686 * acceleration. In terms of the Motion Magic® Expo profile, a higher
687 * kA results in a slower acceleration.
688 * - Velocity: Cruise velocity for profiling. The signage does not matter as
689 * the device will use the absolute value for profile generation.
690 * Setting this to 0 will allow the profile to run to the max
691 * possible velocity based on Expo_kV.
692 * - FeedForward: Feedforward to apply in torque current in Amperes. This is
693 * added to the output of the onboard feedforward terms.
694 *
695 * User can use motor's kT to scale Newton-meter to Amperes.
696 * - Slot: Select which gains are applied by selecting the slot. Use the
697 * configuration api to set the gain values for the selected slot
698 * before enabling this feature. Slot must be within [0,2].
699 * - OverrideCoastDurNeutral: Set to true to coast the rotor when output is
700 * zero (or within deadband). Set to false to use
701 * the NeutralMode configuration setting (default).
702 * This flag exists to provide the fundamental
703 * behavior of this control when output is zero,
704 * which is to provide 0A (zero torque).
705 * - LimitForwardMotion: Set to true to force forward limiting. This allows
706 * users to use other limit switch sensors connected to
707 * robot controller. This also allows use of active
708 * sensors that require external power.
709 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
710 * users to use other limit switch sensors connected to
711 * robot controller. This also allows use of active
712 * sensors that require external power.
713 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
714 * the LimitForwardMotion and LimitReverseMotion
715 * parameters, instead allowing motion.
716 *
717 * This can be useful on mechanisms such as an
718 * intake/feeder, where a limit switch stops motion
719 * while intaking but should be ignored when feeding
720 * to a shooter.
721 *
722 * The hardware limit faults and Forward/ReverseLimit
723 * signals will still report the values of the limit
724 * switches regardless of this parameter.
725 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
726 * allowing motion.
727 *
728 * This can be useful when calibrating the zero point
729 * of a mechanism such as an elevator.
730 *
731 * The software limit faults will still report the
732 * values of the software limits regardless of this
733 * parameter.
734 * - UseTimesync: Set to true to delay applying this control request until a
735 * timesync boundary (requires Phoenix Pro and CANivore). This
736 * eliminates the impact of nondeterministic network delays in
737 * exchange for a larger but deterministic control latency.
738 *
739 * This requires setting the ControlTimesyncFreqHz config in
740 * MotorOutputConfigs. Additionally, when this is enabled, the
741 * UpdateFreqHz of this request should be set to 0 Hz.
742 *
743 * \param request Control object to request of the device
744 * \returns Status Code of the request, 0 is OK
745 */
747
748 /**
749 * \brief Differential control with torque current average target and
750 * position difference target.
751 *
752 * - Diff_TorqueCurrentFOC_Position Parameters:
753 * - AverageRequest: Average TorqueCurrentFOC request of the mechanism.
754 * - DifferentialRequest: Differential PositionTorqueCurrentFOC request of the
755 * mechanism.
756 *
757 * \param request Control object to request of the device
758 * \returns Status Code of the request, 0 is OK
759 */
760 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_TorqueCurrentFOC_Position &request) = 0;
761
762 /**
763 * \brief Differential control with position average target and
764 * position difference target using torque current control.
765 *
766 * - Diff_PositionTorqueCurrentFOC_Position Parameters:
767 * - AverageRequest: Average PositionTorqueCurrentFOC request of the
768 * mechanism.
769 * - DifferentialRequest: Differential PositionTorqueCurrentFOC request of the
770 * mechanism.
771 *
772 * \param request Control object to request of the device
773 * \returns Status Code of the request, 0 is OK
774 */
775 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionTorqueCurrentFOC_Position &request) = 0;
776
777 /**
778 * \brief Differential control with velocity average target and
779 * position difference target using torque current control.
780 *
781 * - Diff_VelocityTorqueCurrentFOC_Position Parameters:
782 * - AverageRequest: Average VelocityTorqueCurrentFOC request of the
783 * mechanism.
784 * - DifferentialRequest: Differential PositionTorqueCurrentFOC request of the
785 * mechanism.
786 *
787 * \param request Control object to request of the device
788 * \returns Status Code of the request, 0 is OK
789 */
790 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityTorqueCurrentFOC_Position &request) = 0;
791
792 /**
793 * \brief Differential control with Motion Magic® average target and
794 * position difference target using torque current control.
795 *
796 * - Diff_MotionMagicTorqueCurrentFOC_Position Parameters:
797 * - AverageRequest: Average MotionMagicTorqueCurrentFOC request of the
798 * mechanism.
799 * - DifferentialRequest: Differential PositionTorqueCurrentFOC request of the
800 * mechanism.
801 *
802 * \param request Control object to request of the device
803 * \returns Status Code of the request, 0 is OK
804 */
805 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicTorqueCurrentFOC_Position &request) = 0;
806
807 /**
808 * \brief Differential control with Motion Magic® Expo average target
809 * and position difference target using torque current control.
810 *
811 * - Diff_MotionMagicExpoTorqueCurrentFOC_Position Parameters:
812 * - AverageRequest: Average MotionMagicExpoTorqueCurrentFOC request of the
813 * mechanism.
814 * - DifferentialRequest: Differential PositionTorqueCurrentFOC request of the
815 * mechanism.
816 *
817 * \param request Control object to request of the device
818 * \returns Status Code of the request, 0 is OK
819 */
820 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoTorqueCurrentFOC_Position &request) = 0;
821
822 /**
823 * \brief Differential control with Motion Magic® Velocity average
824 * target and position difference target using torque current control.
825 *
826 * - Diff_MotionMagicVelocityTorqueCurrentFOC_Position Parameters:
827 * - AverageRequest: Average MotionMagicVelocityTorqueCurrentFOC request of
828 * the mechanism.
829 * - DifferentialRequest: Differential PositionTorqueCurrentFOC request of the
830 * mechanism.
831 *
832 * \param request Control object to request of the device
833 * \returns Status Code of the request, 0 is OK
834 */
835 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityTorqueCurrentFOC_Position &request) = 0;
836
837 /**
838 * \brief Differential control with torque current average target and
839 * velocity difference target.
840 *
841 * - Diff_TorqueCurrentFOC_Velocity Parameters:
842 * - AverageRequest: Average TorqueCurrentFOC request of the mechanism.
843 * - DifferentialRequest: Differential VelocityTorqueCurrentFOC request of the
844 * mechanism.
845 *
846 * \param request Control object to request of the device
847 * \returns Status Code of the request, 0 is OK
848 */
849 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_TorqueCurrentFOC_Velocity &request) = 0;
850
851 /**
852 * \brief Differential control with position average target and
853 * velocity difference target using torque current control.
854 *
855 * - Diff_PositionTorqueCurrentFOC_Velocity Parameters:
856 * - AverageRequest: Average PositionTorqueCurrentFOC request of the
857 * mechanism.
858 * - DifferentialRequest: Differential VelocityTorqueCurrentFOC request of the
859 * mechanism.
860 *
861 * \param request Control object to request of the device
862 * \returns Status Code of the request, 0 is OK
863 */
864 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionTorqueCurrentFOC_Velocity &request) = 0;
865
866 /**
867 * \brief Differential control with velocity average target and
868 * velocity difference target using torque current control.
869 *
870 * - Diff_VelocityTorqueCurrentFOC_Velocity Parameters:
871 * - AverageRequest: Average VelocityTorqueCurrentFOC request of the
872 * mechanism.
873 * - DifferentialRequest: Differential VelocityTorqueCurrentFOC request of the
874 * mechanism.
875 *
876 * \param request Control object to request of the device
877 * \returns Status Code of the request, 0 is OK
878 */
879 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityTorqueCurrentFOC_Velocity &request) = 0;
880
881 /**
882 * \brief Differential control with Motion Magic® average target and
883 * velocity difference target using torque current control.
884 *
885 * - Diff_MotionMagicTorqueCurrentFOC_Velocity Parameters:
886 * - AverageRequest: Average MotionMagicTorqueCurrentFOC request of the
887 * mechanism.
888 * - DifferentialRequest: Differential VelocityTorqueCurrentFOC request of the
889 * mechanism.
890 *
891 * \param request Control object to request of the device
892 * \returns Status Code of the request, 0 is OK
893 */
894 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicTorqueCurrentFOC_Velocity &request) = 0;
895
896 /**
897 * \brief Differential control with Motion Magic® Expo average target
898 * and velocity difference target using torque current control.
899 *
900 * - Diff_MotionMagicExpoTorqueCurrentFOC_Velocity Parameters:
901 * - AverageRequest: Average MotionMagicExpoTorqueCurrentFOC request of the
902 * mechanism.
903 * - DifferentialRequest: Differential VelocityTorqueCurrentFOC request of the
904 * mechanism.
905 *
906 * \param request Control object to request of the device
907 * \returns Status Code of the request, 0 is OK
908 */
909 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoTorqueCurrentFOC_Velocity &request) = 0;
910
911 /**
912 * \brief Differential control with Motion Magic® Velocity average
913 * target and velocity difference target using torque current control.
914 *
915 * - Diff_MotionMagicVelocityTorqueCurrentFOC_Velocity Parameters:
916 * - AverageRequest: Average MotionMagicVelocityTorqueCurrentFOC request of
917 * the mechanism.
918 * - DifferentialRequest: Differential VelocityTorqueCurrentFOC request of the
919 * mechanism.
920 *
921 * \param request Control object to request of the device
922 * \returns Status Code of the request, 0 is OK
923 */
924 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityTorqueCurrentFOC_Velocity &request) = 0;
925
926 /**
927 * \brief Differential control with torque current average target and
928 * torque current difference target.
929 *
930 * - Diff_TorqueCurrentFOC_Open Parameters:
931 * - AverageRequest: Average TorqueCurrentFOC request of the mechanism.
932 * - DifferentialRequest: Differential TorqueCurrentFOC request of the
933 * mechanism.
934 *
935 * \param request Control object to request of the device
936 * \returns Status Code of the request, 0 is OK
937 */
938 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_TorqueCurrentFOC_Open &request) = 0;
939
940 /**
941 * \brief Differential control with position average target and torque
942 * current difference target.
943 *
944 * - Diff_PositionTorqueCurrentFOC_Open Parameters:
945 * - AverageRequest: Average PositionTorqueCurrentFOC request of the
946 * mechanism.
947 * - DifferentialRequest: Differential TorqueCurrentFOC request of the
948 * mechanism.
949 *
950 * \param request Control object to request of the device
951 * \returns Status Code of the request, 0 is OK
952 */
953 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionTorqueCurrentFOC_Open &request) = 0;
954
955 /**
956 * \brief Differential control with velocity average target and torque
957 * current difference target.
958 *
959 * - Diff_VelocityTorqueCurrentFOC_Open Parameters:
960 * - AverageRequest: Average VelocityTorqueCurrentFOC request of the
961 * mechanism.
962 * - DifferentialRequest: Differential TorqueCurrentFOC request of the
963 * mechanism.
964 *
965 * \param request Control object to request of the device
966 * \returns Status Code of the request, 0 is OK
967 */
968 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityTorqueCurrentFOC_Open &request) = 0;
969
970 /**
971 * \brief Differential control with Motion Magic® average target and
972 * torque current difference target.
973 *
974 * - Diff_MotionMagicTorqueCurrentFOC_Open Parameters:
975 * - AverageRequest: Average MotionMagicTorqueCurrentFOC request of the
976 * mechanism.
977 * - DifferentialRequest: Differential TorqueCurrentFOC request of the
978 * mechanism.
979 *
980 * \param request Control object to request of the device
981 * \returns Status Code of the request, 0 is OK
982 */
983 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicTorqueCurrentFOC_Open &request) = 0;
984
985 /**
986 * \brief Differential control with Motion Magic® Expo average target
987 * and torque current difference target.
988 *
989 * - Diff_MotionMagicExpoTorqueCurrentFOC_Open Parameters:
990 * - AverageRequest: Average MotionMagicExpoTorqueCurrentFOC request of the
991 * mechanism.
992 * - DifferentialRequest: Differential TorqueCurrentFOC request of the
993 * mechanism.
994 *
995 * \param request Control object to request of the device
996 * \returns Status Code of the request, 0 is OK
997 */
998 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoTorqueCurrentFOC_Open &request) = 0;
999
1000 /**
1001 * \brief Differential control with Motion Magic® Velocity average
1002 * target and torque current difference target.
1003 *
1004 * - Diff_MotionMagicVelocityTorqueCurrentFOC_Open Parameters:
1005 * - AverageRequest: Average MotionMagicVelocityTorqueCurrentFOC request of
1006 * the mechanism.
1007 * - DifferentialRequest: Differential TorqueCurrentFOC request of the
1008 * mechanism.
1009 *
1010 * \param request Control object to request of the device
1011 * \returns Status Code of the request, 0 is OK
1012 */
1013 virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityTorqueCurrentFOC_Open &request) = 0;
1014
1015 /**
1016 * \brief Control device with generic control request object. User must make
1017 * sure the specified object is castable to a valid control request,
1018 * otherwise this function will fail at run-time and return the NotSupported
1019 * StatusCode
1020 *
1021 * \param request Control object to request of the device
1022 * \returns Status Code of the request, 0 is OK
1023 */
1025
1026 /**
1027 * \brief Clear sticky fault: Trips if a major mechanical or ESD event
1028 * caused a brief loss of position data triggering a recovery while
1029 * not in motion. If the event occurs often, inspect for excess axial
1030 * force or sources of ESD at the rotor.
1031 *
1032 * \param timeoutSeconds Maximum time to wait up to in seconds.
1033 * \returns StatusCode of the set command
1034 */
1035 virtual ctre::phoenix::StatusCode ClearStickyFault_RotorFault1(units::time::second_t timeoutSeconds) = 0;
1036 /**
1037 * \brief Clear sticky fault: Trips if a major mechanical or ESD event
1038 * caused a brief loss of position data triggering a recovery while
1039 * not in motion. If the event occurs often, inspect for excess axial
1040 * force or sources of ESD at the rotor.
1041 *
1042 * This will wait up to 0.100 seconds (100ms) by default.
1043 *
1044 * \returns StatusCode of the set command
1045 */
1047
1048 /**
1049 * \brief Clear sticky fault: Trips if a major mechanical or ESD event
1050 * caused a brief loss of position data triggering a recovery while in
1051 * motion. If the event occurs often, inspect for excess axial force
1052 * or sources of ESD at the rotor.
1053 *
1054 * \param timeoutSeconds Maximum time to wait up to in seconds.
1055 * \returns StatusCode of the set command
1056 */
1057 virtual ctre::phoenix::StatusCode ClearStickyFault_RotorFault2(units::time::second_t timeoutSeconds) = 0;
1058 /**
1059 * \brief Clear sticky fault: Trips if a major mechanical or ESD event
1060 * caused a brief loss of position data triggering a recovery while in
1061 * motion. If the event occurs often, inspect for excess axial force
1062 * or sources of ESD at the rotor.
1063 *
1064 * This will wait up to 0.100 seconds (100ms) by default.
1065 *
1066 * \returns StatusCode of the set command
1067 */
1069};
1070
1071}
1072}
1073}
1074}
1075
Represents a status signal with data of type T, and operations available to retrieve information abou...
Definition StatusSignal.hpp:470
Common interface implemented by all control requests.
Definition ControlRequest.hpp:27
Requires Phoenix Pro and CANivore; Requests Motion Magic® Expo to target a final position using an ex...
Definition DynamicMotionMagicExpoTorqueCurrentFOC.hpp:38
Requires Phoenix Pro and CANivore; Requests Motion Magic® to target a final position using a motion p...
Definition DynamicMotionMagicTorqueCurrentFOC.hpp:36
Requires Phoenix Pro; Requests Motion Magic® to target a final position using an exponential motion p...
Definition MotionMagicExpoTorqueCurrentFOC.hpp:34
Requires Phoenix Pro; Requests Motion Magic® to target a final position using a motion profile.
Definition MotionMagicTorqueCurrentFOC.hpp:31
Requests Motion Magic® to target a final velocity using a motion profile.
Definition MotionMagicVelocityTorqueCurrentFOC.hpp:38
Requires Phoenix Pro; Request PID to target position with torque current feedforward.
Definition PositionTorqueCurrentFOC.hpp:27
Requires Phoenix Pro; Request a specified motor current (field oriented control).
Definition TorqueCurrentFOC.hpp:27
Requires Phoenix Pro; Request PID to target velocity with torque current feedforward.
Definition VelocityTorqueCurrentFOC.hpp:27
Contains everything common between Phoenix 6 devices.
Definition CommonDevice.hpp:23
Requires Phoenix Pro; Contains all FOC-exclusive control functions available for devices that support...
Definition SupportsFOC.hpp:51
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoTorqueCurrentFOC_Velocity &request)=0
Differential control with Motion Magic® Expo average target and velocity difference target using torq...
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_TorqueCurrentFOC_Open &request)=0
Differential control with torque current average target and torque current difference target.
virtual ctre::phoenix::StatusCode SetControl(const controls::MotionMagicTorqueCurrentFOC &request)=0
Requests Motion Magic® to target a final position using a motion profile.
virtual ctre::phoenix::StatusCode SetControl(const controls::ControlRequest &request)=0
Control device with generic control request object.
virtual ctre::phoenix::StatusCode SetControl(const controls::VelocityTorqueCurrentFOC &request)=0
Request PID to target velocity with torque current feedforward.
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionTorqueCurrentFOC_Open &request)=0
Differential control with position average target and torque current difference target.
virtual StatusSignal< bool > & GetStickyFault_RotorFault1(bool refresh=true)=0
Trips if a major mechanical or ESD event caused a brief loss of position data triggering a recovery w...
virtual StatusSignal< bool > & GetStickyFault_RotorFault2(bool refresh=true)=0
Trips if a major mechanical or ESD event caused a brief loss of position data triggering a recovery w...
virtual ctre::phoenix::StatusCode SetControl(const controls::DynamicMotionMagicExpoTorqueCurrentFOC &request)=0
Requests Motion Magic® Expo to target a final position using an exponential motion profile.
virtual ctre::phoenix::StatusCode ClearStickyFault_RotorFault1(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Trips if a major mechanical or ESD event caused a brief loss of position data tri...
virtual ctre::phoenix::StatusCode ClearStickyFault_RotorFault2(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Trips if a major mechanical or ESD event caused a brief loss of position data tri...
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityTorqueCurrentFOC_Velocity &request)=0
Differential control with velocity average target and velocity difference target using torque current...
virtual ctre::phoenix::StatusCode SetControl(const controls::DynamicMotionMagicTorqueCurrentFOC &request)=0
Requests Motion Magic® to target a final position using a motion profile.
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityTorqueCurrentFOC_Position &request)=0
Differential control with velocity average target and position difference target using torque current...
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityTorqueCurrentFOC_Open &request)=0
Differential control with Motion Magic® Velocity average target and torque current difference target.
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicTorqueCurrentFOC_Open &request)=0
Differential control with Motion Magic® average target and torque current difference target.
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoTorqueCurrentFOC_Open &request)=0
Differential control with Motion Magic® Expo average target and torque current difference target.
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoTorqueCurrentFOC_Position &request)=0
Differential control with Motion Magic® Expo average target and position difference target using torq...
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_TorqueCurrentFOC_Velocity &request)=0
Differential control with torque current average target and velocity difference target.
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityTorqueCurrentFOC_Position &request)=0
Differential control with Motion Magic® Velocity average target and position difference target using ...
virtual ctre::phoenix::StatusCode ClearStickyFault_RotorFault1()=0
Clear sticky fault: Trips if a major mechanical or ESD event caused a brief loss of position data tri...
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicTorqueCurrentFOC_Position &request)=0
Differential control with Motion Magic® average target and position difference target using torque cu...
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionTorqueCurrentFOC_Velocity &request)=0
Differential control with position average target and velocity difference target using torque current...
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityTorqueCurrentFOC_Open &request)=0
Differential control with velocity average target and torque current difference target.
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_TorqueCurrentFOC_Position &request)=0
Differential control with torque current average target and position difference target.
virtual ctre::phoenix::StatusCode SetControl(const controls::MotionMagicVelocityTorqueCurrentFOC &request)=0
Requests Motion Magic® to target a final velocity using a motion profile.
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicTorqueCurrentFOC_Velocity &request)=0
Differential control with Motion Magic® average target and velocity difference target using torque cu...
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionTorqueCurrentFOC_Position &request)=0
Differential control with position average target and position difference target using torque current...
virtual ctre::phoenix::StatusCode ClearStickyFault_RotorFault2()=0
Clear sticky fault: Trips if a major mechanical or ESD event caused a brief loss of position data tri...
virtual StatusSignal< bool > & GetFault_RotorFault2(bool refresh=true)=0
Trips if a major mechanical or ESD event caused a brief loss of position data triggering a recovery w...
virtual ctre::phoenix::StatusCode SetControl(const controls::PositionTorqueCurrentFOC &request)=0
Request PID to target position with torque current feedforward.
virtual ctre::phoenix::StatusCode SetControl(const controls::MotionMagicExpoTorqueCurrentFOC &request)=0
Requests Motion Magic® to target a final position using an exponential motion profile.
virtual ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityTorqueCurrentFOC_Velocity &request)=0
Differential control with Motion Magic® Velocity average target and velocity difference target using ...
virtual ctre::phoenix::StatusCode SetControl(const controls::TorqueCurrentFOC &request)=0
Request a specified motor current (field oriented control).
virtual StatusSignal< bool > & GetFault_RotorFault1(bool refresh=true)=0
Trips if a major mechanical or ESD event caused a brief loss of position data triggering a recovery w...
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:28
Definition motor_constants.h:14