CTRE Phoenix 6 C++ 26.70.0-alpha-2
Loading...
Searching...
No Matches
SpnEnums.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
10#include <compare>
11#include <iosfwd>
12#include <string>
13
14namespace ctre {
15namespace phoenix6 {
16namespace signals {
17
18
19/**
20 * \brief System state of the device.
21 */
23 /** \brief Unique integer value of this System_StateValue. */
24 int value;
25
26 static constexpr int Bootup_0 = 0;
27 static constexpr int Bootup_1 = 1;
28 static constexpr int Bootup_2 = 2;
29 static constexpr int Bootup_3 = 3;
30 static constexpr int Bootup_4 = 4;
31 static constexpr int Bootup_5 = 5;
32 static constexpr int Bootup_6 = 6;
33 static constexpr int Bootup_7 = 7;
34 static constexpr int BootBeep = 8;
35 static constexpr int ControlDisabled = 9;
36 static constexpr int ControlEnabled = 10;
37 static constexpr int ControlEnabled_11 = 11;
38 static constexpr int Fault = 12;
39 static constexpr int Recover = 13;
40 static constexpr int NotLicensed = 14;
41 static constexpr int Production = 15;
42
43 constexpr System_StateValue(int value) :
45 {}
46
47 constexpr System_StateValue() :
48 value{-1}
49 {}
50
51 constexpr bool operator==(System_StateValue other) const
52 {
53 return value == other.value;
54 }
55 constexpr auto operator<=>(System_StateValue other) const
56 {
57 return value <=> other.value;
58 }
59
60 /**
61 * \brief Gets the string representation of this enum
62 *
63 * \returns String representation of this enum
64 */
65 constexpr std::string_view ToString() const
66 {
67 switch (value) {
68 case System_StateValue::Bootup_0: return "Bootup_0";
69 case System_StateValue::Bootup_1: return "Bootup_1";
70 case System_StateValue::Bootup_2: return "Bootup_2";
71 case System_StateValue::Bootup_3: return "Bootup_3";
72 case System_StateValue::Bootup_4: return "Bootup_4";
73 case System_StateValue::Bootup_5: return "Bootup_5";
74 case System_StateValue::Bootup_6: return "Bootup_6";
75 case System_StateValue::Bootup_7: return "Bootup_7";
76 case System_StateValue::BootBeep: return "BootBeep";
77 case System_StateValue::ControlDisabled: return "ControlDisabled";
78 case System_StateValue::ControlEnabled: return "ControlEnabled";
79 case System_StateValue::ControlEnabled_11: return "ControlEnabled_11";
80 case System_StateValue::Fault: return "Fault";
81 case System_StateValue::Recover: return "Recover";
82 case System_StateValue::NotLicensed: return "NotLicensed";
83 case System_StateValue::Production: return "Production";
84 default: return "Invalid Value";
85 }
86 }
87
88 CTREXPORT friend std::ostream &operator<<(std::ostream &os, System_StateValue data);
89};
90
91/**
92 * \brief Whether the device is Pro licensed.
93 */
95 /** \brief Unique integer value of this IsPROLicensedValue. */
96 int value;
97
98 static constexpr int NotLicensed = 0;
99 static constexpr int Licensed = 1;
100
101 constexpr IsPROLicensedValue(int value) :
102 value{value}
103 {}
104
105 constexpr IsPROLicensedValue() :
106 value{-1}
107 {}
108
109 constexpr bool operator==(IsPROLicensedValue other) const
110 {
111 return value == other.value;
112 }
113 constexpr auto operator<=>(IsPROLicensedValue other) const
114 {
115 return value <=> other.value;
116 }
117
118 /**
119 * \brief Gets the string representation of this enum
120 *
121 * \returns String representation of this enum
122 */
123 constexpr std::string_view ToString() const
124 {
125 switch (value) {
126 case IsPROLicensedValue::NotLicensed: return "Not Licensed";
127 case IsPROLicensedValue::Licensed: return "Licensed";
128 default: return "Invalid Value";
129 }
130 }
131
132 CTREXPORT friend std::ostream &operator<<(std::ostream &os, IsPROLicensedValue data);
133};
134
135/**
136 * \brief Whether the device is Season Pass licensed.
137 */
139 /** \brief Unique integer value of this Licensing_IsSeasonPassedValue. */
140 int value;
141
142 static constexpr int NotLicensed = 0;
143 static constexpr int Licensed = 1;
144
146 value{value}
147 {}
148
150 value{-1}
151 {}
152
153 constexpr bool operator==(Licensing_IsSeasonPassedValue other) const
154 {
155 return value == other.value;
156 }
157 constexpr auto operator<=>(Licensing_IsSeasonPassedValue other) const
158 {
159 return value <=> other.value;
160 }
161
162 /**
163 * \brief Gets the string representation of this enum
164 *
165 * \returns String representation of this enum
166 */
167 constexpr std::string_view ToString() const
168 {
169 switch (value) {
170 case Licensing_IsSeasonPassedValue::NotLicensed: return "Not Licensed";
171 case Licensing_IsSeasonPassedValue::Licensed: return "Licensed";
172 default: return "Invalid Value";
173 }
174 }
175
176 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Licensing_IsSeasonPassedValue data);
177};
178
179/**
180 * \brief Direction of the sensor to determine positive rotation, as seen facing
181 * the LED side of the CANcoder.
182 */
184 /** \brief Unique integer value of this SensorDirectionValue. */
185 int value;
186
187 /**
188 * \brief Counter-clockwise motion reports positive rotation.
189 */
190 static constexpr int CounterClockwise_Positive = 0;
191 /**
192 * \brief Clockwise motion reports positive rotation.
193 */
194 static constexpr int Clockwise_Positive = 1;
195
197 value{value}
198 {}
199
201 value{-1}
202 {}
203
204 constexpr bool operator==(SensorDirectionValue other) const
205 {
206 return value == other.value;
207 }
208 constexpr auto operator<=>(SensorDirectionValue other) const
209 {
210 return value <=> other.value;
211 }
212
213 /**
214 * \brief Gets the string representation of this enum
215 *
216 * \returns String representation of this enum
217 */
218 constexpr std::string_view ToString() const
219 {
220 switch (value) {
221 case SensorDirectionValue::CounterClockwise_Positive: return "CounterClockwise_Positive";
222 case SensorDirectionValue::Clockwise_Positive: return "Clockwise_Positive";
223 default: return "Invalid Value";
224 }
225 }
226
227 CTREXPORT friend std::ostream &operator<<(std::ostream &os, SensorDirectionValue data);
228};
229
230/**
231 * \brief Whether device is locked by FRC.
232 */
234 /** \brief Unique integer value of this FrcLockValue. */
235 int value;
236
237 static constexpr int Frc_Locked = 1;
238 static constexpr int Frc_Unlocked = 0;
239
240 constexpr FrcLockValue(int value) :
241 value{value}
242 {}
243
244 constexpr FrcLockValue() :
245 value{-1}
246 {}
247
248 constexpr bool operator==(FrcLockValue other) const
249 {
250 return value == other.value;
251 }
252 constexpr auto operator<=>(FrcLockValue other) const
253 {
254 return value <=> other.value;
255 }
256
257 /**
258 * \brief Gets the string representation of this enum
259 *
260 * \returns String representation of this enum
261 */
262 constexpr std::string_view ToString() const
263 {
264 switch (value) {
265 case FrcLockValue::Frc_Locked: return "Frc_Locked";
266 case FrcLockValue::Frc_Unlocked: return "Frc_Unlocked";
267 default: return "Invalid Value";
268 }
269 }
270
271 CTREXPORT friend std::ostream &operator<<(std::ostream &os, FrcLockValue data);
272};
273
274/**
275 * \brief Whether the robot is enabled.
276 */
278 /** \brief Unique integer value of this RobotEnableValue. */
279 int value;
280
281 static constexpr int Enabled = 1;
282 static constexpr int Disabled = 0;
283
284 constexpr RobotEnableValue(int value) :
285 value{value}
286 {}
287
288 constexpr RobotEnableValue() :
289 value{-1}
290 {}
291
292 constexpr bool operator==(RobotEnableValue other) const
293 {
294 return value == other.value;
295 }
296 constexpr auto operator<=>(RobotEnableValue other) const
297 {
298 return value <=> other.value;
299 }
300
301 /**
302 * \brief Gets the string representation of this enum
303 *
304 * \returns String representation of this enum
305 */
306 constexpr std::string_view ToString() const
307 {
308 switch (value) {
309 case RobotEnableValue::Enabled: return "Enabled";
310 case RobotEnableValue::Disabled: return "Disabled";
311 default: return "Invalid Value";
312 }
313 }
314
315 CTREXPORT friend std::ostream &operator<<(std::ostream &os, RobotEnableValue data);
316};
317
318/**
319 * \brief The Color of LED1 when it's "On".
320 */
322 /** \brief Unique integer value of this Led1OnColorValue. */
323 int value;
324
325 static constexpr int Off = 0;
326 static constexpr int Red = 1;
327 static constexpr int Green = 2;
328 static constexpr int Orange = 3;
329 static constexpr int Blue = 4;
330 static constexpr int Pink = 5;
331 static constexpr int Cyan = 6;
332 static constexpr int White = 7;
333
334 constexpr Led1OnColorValue(int value) :
335 value{value}
336 {}
337
338 constexpr Led1OnColorValue() :
339 value{-1}
340 {}
341
342 constexpr bool operator==(Led1OnColorValue other) const
343 {
344 return value == other.value;
345 }
346 constexpr auto operator<=>(Led1OnColorValue other) const
347 {
348 return value <=> other.value;
349 }
350
351 /**
352 * \brief Gets the string representation of this enum
353 *
354 * \returns String representation of this enum
355 */
356 constexpr std::string_view ToString() const
357 {
358 switch (value) {
359 case Led1OnColorValue::Off: return "Off";
360 case Led1OnColorValue::Red: return "Red";
361 case Led1OnColorValue::Green: return "Green";
362 case Led1OnColorValue::Orange: return "Orange";
363 case Led1OnColorValue::Blue: return "Blue";
364 case Led1OnColorValue::Pink: return "Pink";
365 case Led1OnColorValue::Cyan: return "Cyan";
366 case Led1OnColorValue::White: return "White";
367 default: return "Invalid Value";
368 }
369 }
370
371 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Led1OnColorValue data);
372};
373
374/**
375 * \brief The Color of LED1 when it's "Off".
376 */
378 /** \brief Unique integer value of this Led1OffColorValue. */
379 int value;
380
381 static constexpr int Off = 0;
382 static constexpr int Red = 1;
383 static constexpr int Green = 2;
384 static constexpr int Orange = 3;
385 static constexpr int Blue = 4;
386 static constexpr int Pink = 5;
387 static constexpr int Cyan = 6;
388 static constexpr int White = 7;
389
390 constexpr Led1OffColorValue(int value) :
391 value{value}
392 {}
393
394 constexpr Led1OffColorValue() :
395 value{-1}
396 {}
397
398 constexpr bool operator==(Led1OffColorValue other) const
399 {
400 return value == other.value;
401 }
402 constexpr auto operator<=>(Led1OffColorValue other) const
403 {
404 return value <=> other.value;
405 }
406
407 /**
408 * \brief Gets the string representation of this enum
409 *
410 * \returns String representation of this enum
411 */
412 constexpr std::string_view ToString() const
413 {
414 switch (value) {
415 case Led1OffColorValue::Off: return "Off";
416 case Led1OffColorValue::Red: return "Red";
417 case Led1OffColorValue::Green: return "Green";
418 case Led1OffColorValue::Orange: return "Orange";
419 case Led1OffColorValue::Blue: return "Blue";
420 case Led1OffColorValue::Pink: return "Pink";
421 case Led1OffColorValue::Cyan: return "Cyan";
422 case Led1OffColorValue::White: return "White";
423 default: return "Invalid Value";
424 }
425 }
426
427 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Led1OffColorValue data);
428};
429
430/**
431 * \brief The Color of LED2 when it's "On".
432 */
434 /** \brief Unique integer value of this Led2OnColorValue. */
435 int value;
436
437 static constexpr int Off = 0;
438 static constexpr int Red = 1;
439 static constexpr int Green = 2;
440 static constexpr int Orange = 3;
441 static constexpr int Blue = 4;
442 static constexpr int Pink = 5;
443 static constexpr int Cyan = 6;
444 static constexpr int White = 7;
445
446 constexpr Led2OnColorValue(int value) :
447 value{value}
448 {}
449
450 constexpr Led2OnColorValue() :
451 value{-1}
452 {}
453
454 constexpr bool operator==(Led2OnColorValue other) const
455 {
456 return value == other.value;
457 }
458 constexpr auto operator<=>(Led2OnColorValue other) const
459 {
460 return value <=> other.value;
461 }
462
463 /**
464 * \brief Gets the string representation of this enum
465 *
466 * \returns String representation of this enum
467 */
468 constexpr std::string_view ToString() const
469 {
470 switch (value) {
471 case Led2OnColorValue::Off: return "Off";
472 case Led2OnColorValue::Red: return "Red";
473 case Led2OnColorValue::Green: return "Green";
474 case Led2OnColorValue::Orange: return "Orange";
475 case Led2OnColorValue::Blue: return "Blue";
476 case Led2OnColorValue::Pink: return "Pink";
477 case Led2OnColorValue::Cyan: return "Cyan";
478 case Led2OnColorValue::White: return "White";
479 default: return "Invalid Value";
480 }
481 }
482
483 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Led2OnColorValue data);
484};
485
486/**
487 * \brief The Color of LED2 when it's "Off".
488 */
490 /** \brief Unique integer value of this Led2OffColorValue. */
491 int value;
492
493 static constexpr int Off = 0;
494 static constexpr int Red = 1;
495 static constexpr int Green = 2;
496 static constexpr int Orange = 3;
497 static constexpr int Blue = 4;
498 static constexpr int Pink = 5;
499 static constexpr int Cyan = 6;
500 static constexpr int White = 7;
501
502 constexpr Led2OffColorValue(int value) :
503 value{value}
504 {}
505
506 constexpr Led2OffColorValue() :
507 value{-1}
508 {}
509
510 constexpr bool operator==(Led2OffColorValue other) const
511 {
512 return value == other.value;
513 }
514 constexpr auto operator<=>(Led2OffColorValue other) const
515 {
516 return value <=> other.value;
517 }
518
519 /**
520 * \brief Gets the string representation of this enum
521 *
522 * \returns String representation of this enum
523 */
524 constexpr std::string_view ToString() const
525 {
526 switch (value) {
527 case Led2OffColorValue::Off: return "Off";
528 case Led2OffColorValue::Red: return "Red";
529 case Led2OffColorValue::Green: return "Green";
530 case Led2OffColorValue::Orange: return "Orange";
531 case Led2OffColorValue::Blue: return "Blue";
532 case Led2OffColorValue::Pink: return "Pink";
533 case Led2OffColorValue::Cyan: return "Cyan";
534 case Led2OffColorValue::White: return "White";
535 default: return "Invalid Value";
536 }
537 }
538
539 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Led2OffColorValue data);
540};
541
542/**
543 * \brief Whether the device is enabled.
544 */
546 /** \brief Unique integer value of this DeviceEnableValue. */
547 int value;
548
549 static constexpr int Enabled = 1;
550 static constexpr int Disabled = 0;
551
552 constexpr DeviceEnableValue(int value) :
553 value{value}
554 {}
555
556 constexpr DeviceEnableValue() :
557 value{-1}
558 {}
559
560 constexpr bool operator==(DeviceEnableValue other) const
561 {
562 return value == other.value;
563 }
564 constexpr auto operator<=>(DeviceEnableValue other) const
565 {
566 return value <=> other.value;
567 }
568
569 /**
570 * \brief Gets the string representation of this enum
571 *
572 * \returns String representation of this enum
573 */
574 constexpr std::string_view ToString() const
575 {
576 switch (value) {
577 case DeviceEnableValue::Enabled: return "Enabled";
578 case DeviceEnableValue::Disabled: return "Disabled";
579 default: return "Invalid Value";
580 }
581 }
582
583 CTREXPORT friend std::ostream &operator<<(std::ostream &os, DeviceEnableValue data);
584};
585
586/**
587 * \brief Forward Limit Pin.
588 */
590 /** \brief Unique integer value of this ForwardLimitValue. */
591 int value;
592
593 static constexpr int ClosedToGround = 0;
594 static constexpr int Open = 1;
595
596 constexpr ForwardLimitValue(int value) :
597 value{value}
598 {}
599
600 constexpr ForwardLimitValue() :
601 value{-1}
602 {}
603
604 constexpr bool operator==(ForwardLimitValue other) const
605 {
606 return value == other.value;
607 }
608 constexpr auto operator<=>(ForwardLimitValue other) const
609 {
610 return value <=> other.value;
611 }
612
613 /**
614 * \brief Gets the string representation of this enum
615 *
616 * \returns String representation of this enum
617 */
618 constexpr std::string_view ToString() const
619 {
620 switch (value) {
621 case ForwardLimitValue::ClosedToGround: return "Closed To Ground";
622 case ForwardLimitValue::Open: return "Open";
623 default: return "Invalid Value";
624 }
625 }
626
627 CTREXPORT friend std::ostream &operator<<(std::ostream &os, ForwardLimitValue data);
628};
629
630/**
631 * \brief Reverse Limit Pin.
632 */
634 /** \brief Unique integer value of this ReverseLimitValue. */
635 int value;
636
637 static constexpr int ClosedToGround = 0;
638 static constexpr int Open = 1;
639
640 constexpr ReverseLimitValue(int value) :
641 value{value}
642 {}
643
644 constexpr ReverseLimitValue() :
645 value{-1}
646 {}
647
648 constexpr bool operator==(ReverseLimitValue other) const
649 {
650 return value == other.value;
651 }
652 constexpr auto operator<=>(ReverseLimitValue other) const
653 {
654 return value <=> other.value;
655 }
656
657 /**
658 * \brief Gets the string representation of this enum
659 *
660 * \returns String representation of this enum
661 */
662 constexpr std::string_view ToString() const
663 {
664 switch (value) {
665 case ReverseLimitValue::ClosedToGround: return "Closed To Ground";
666 case ReverseLimitValue::Open: return "Open";
667 default: return "Invalid Value";
668 }
669 }
670
671 CTREXPORT friend std::ostream &operator<<(std::ostream &os, ReverseLimitValue data);
672};
673
674/**
675 * \brief The applied rotor polarity as seen from the front of the motor. This
676 * typically is determined by the Inverted config, but can be overridden
677 * if using Follower features.
678 */
680 /** \brief Unique integer value of this AppliedRotorPolarityValue. */
681 int value;
682
683 /**
684 * \brief Positive motor output results in counter-clockwise motion.
685 */
686 static constexpr int PositiveIsCounterClockwise = 0;
687 /**
688 * \brief Positive motor output results in clockwise motion.
689 */
690 static constexpr int PositiveIsClockwise = 1;
691
693 value{value}
694 {}
695
697 value{-1}
698 {}
699
700 constexpr bool operator==(AppliedRotorPolarityValue other) const
701 {
702 return value == other.value;
703 }
704 constexpr auto operator<=>(AppliedRotorPolarityValue other) const
705 {
706 return value <=> other.value;
707 }
708
709 /**
710 * \brief Gets the string representation of this enum
711 *
712 * \returns String representation of this enum
713 */
714 constexpr std::string_view ToString() const
715 {
716 switch (value) {
717 case AppliedRotorPolarityValue::PositiveIsCounterClockwise: return "PositiveIsCounterClockwise";
718 case AppliedRotorPolarityValue::PositiveIsClockwise: return "PositiveIsClockwise";
719 default: return "Invalid Value";
720 }
721 }
722
723 CTREXPORT friend std::ostream &operator<<(std::ostream &os, AppliedRotorPolarityValue data);
724};
725
726/**
727 * \brief The active control mode of the motor controller.
728 */
730 /** \brief Unique integer value of this ControlModeValue. */
731 int value;
732
733 static constexpr int DisabledOutput = 0;
734 static constexpr int NeutralOut = 1;
735 static constexpr int StaticBrake = 2;
736 static constexpr int DutyCycleOut = 3;
737 static constexpr int PositionDutyCycle = 4;
738 static constexpr int VelocityDutyCycle = 5;
739 static constexpr int MotionMagicDutyCycle = 6;
740 static constexpr int DutyCycleFOC = 7;
741 static constexpr int PositionDutyCycleFOC = 8;
742 static constexpr int VelocityDutyCycleFOC = 9;
743 static constexpr int MotionMagicDutyCycleFOC = 10;
744 static constexpr int VoltageOut = 11;
745 static constexpr int PositionVoltage = 12;
746 static constexpr int VelocityVoltage = 13;
747 static constexpr int MotionMagicVoltage = 14;
748 static constexpr int VoltageFOC = 15;
749 static constexpr int PositionVoltageFOC = 16;
750 static constexpr int VelocityVoltageFOC = 17;
751 static constexpr int MotionMagicVoltageFOC = 18;
752 static constexpr int TorqueCurrentFOC = 19;
753 static constexpr int PositionTorqueCurrentFOC = 20;
754 static constexpr int VelocityTorqueCurrentFOC = 21;
755 static constexpr int MotionMagicTorqueCurrentFOC = 22;
756 static constexpr int Follower = 23;
757 static constexpr int Reserved = 24;
758 static constexpr int CoastOut = 25;
759 static constexpr int UnauthorizedDevice = 26;
760 static constexpr int MusicTone = 27;
761 static constexpr int MotionMagicVelocityDutyCycle = 28;
762 static constexpr int MotionMagicVelocityDutyCycleFOC = 29;
763 static constexpr int MotionMagicVelocityVoltage = 30;
764 static constexpr int MotionMagicVelocityVoltageFOC = 31;
765 static constexpr int MotionMagicVelocityTorqueCurrentFOC = 32;
766 static constexpr int MotionMagicExpoDutyCycle = 33;
767 static constexpr int MotionMagicExpoDutyCycleFOC = 34;
768 static constexpr int MotionMagicExpoVoltage = 35;
769 static constexpr int MotionMagicExpoVoltageFOC = 36;
770 static constexpr int MotionMagicExpoTorqueCurrentFOC = 37;
771
772 constexpr ControlModeValue(int value) :
773 value{value}
774 {}
775
776 constexpr ControlModeValue() :
777 value{-1}
778 {}
779
780 constexpr bool operator==(ControlModeValue other) const
781 {
782 return value == other.value;
783 }
784 constexpr auto operator<=>(ControlModeValue other) const
785 {
786 return value <=> other.value;
787 }
788
789 /**
790 * \brief Gets the string representation of this enum
791 *
792 * \returns String representation of this enum
793 */
794 constexpr std::string_view ToString() const
795 {
796 switch (value) {
797 case ControlModeValue::DisabledOutput: return "DisabledOutput";
798 case ControlModeValue::NeutralOut: return "NeutralOut";
799 case ControlModeValue::StaticBrake: return "StaticBrake";
800 case ControlModeValue::DutyCycleOut: return "DutyCycleOut";
801 case ControlModeValue::PositionDutyCycle: return "PositionDutyCycle";
802 case ControlModeValue::VelocityDutyCycle: return "VelocityDutyCycle";
803 case ControlModeValue::MotionMagicDutyCycle: return "MotionMagicDutyCycle";
804 case ControlModeValue::DutyCycleFOC: return "DutyCycleFOC";
805 case ControlModeValue::PositionDutyCycleFOC: return "PositionDutyCycleFOC";
806 case ControlModeValue::VelocityDutyCycleFOC: return "VelocityDutyCycleFOC";
807 case ControlModeValue::MotionMagicDutyCycleFOC: return "MotionMagicDutyCycleFOC";
808 case ControlModeValue::VoltageOut: return "VoltageOut";
809 case ControlModeValue::PositionVoltage: return "PositionVoltage";
810 case ControlModeValue::VelocityVoltage: return "VelocityVoltage";
811 case ControlModeValue::MotionMagicVoltage: return "MotionMagicVoltage";
812 case ControlModeValue::VoltageFOC: return "VoltageFOC";
813 case ControlModeValue::PositionVoltageFOC: return "PositionVoltageFOC";
814 case ControlModeValue::VelocityVoltageFOC: return "VelocityVoltageFOC";
815 case ControlModeValue::MotionMagicVoltageFOC: return "MotionMagicVoltageFOC";
816 case ControlModeValue::TorqueCurrentFOC: return "TorqueCurrentFOC";
817 case ControlModeValue::PositionTorqueCurrentFOC: return "PositionTorqueCurrentFOC";
818 case ControlModeValue::VelocityTorqueCurrentFOC: return "VelocityTorqueCurrentFOC";
819 case ControlModeValue::MotionMagicTorqueCurrentFOC: return "MotionMagicTorqueCurrentFOC";
820 case ControlModeValue::Follower: return "Follower";
821 case ControlModeValue::Reserved: return "Reserved";
822 case ControlModeValue::CoastOut: return "CoastOut";
823 case ControlModeValue::UnauthorizedDevice: return "UnauthorizedDevice";
824 case ControlModeValue::MusicTone: return "MusicTone";
825 case ControlModeValue::MotionMagicVelocityDutyCycle: return "MotionMagicVelocityDutyCycle";
826 case ControlModeValue::MotionMagicVelocityDutyCycleFOC: return "MotionMagicVelocityDutyCycleFOC";
827 case ControlModeValue::MotionMagicVelocityVoltage: return "MotionMagicVelocityVoltage";
828 case ControlModeValue::MotionMagicVelocityVoltageFOC: return "MotionMagicVelocityVoltageFOC";
829 case ControlModeValue::MotionMagicVelocityTorqueCurrentFOC: return "MotionMagicVelocityTorqueCurrentFOC";
830 case ControlModeValue::MotionMagicExpoDutyCycle: return "MotionMagicExpoDutyCycle";
831 case ControlModeValue::MotionMagicExpoDutyCycleFOC: return "MotionMagicExpoDutyCycleFOC";
832 case ControlModeValue::MotionMagicExpoVoltage: return "MotionMagicExpoVoltage";
833 case ControlModeValue::MotionMagicExpoVoltageFOC: return "MotionMagicExpoVoltageFOC";
834 case ControlModeValue::MotionMagicExpoTorqueCurrentFOC: return "MotionMagicExpoTorqueCurrentFOC";
835 default: return "Invalid Value";
836 }
837 }
838
839 CTREXPORT friend std::ostream &operator<<(std::ostream &os, ControlModeValue data);
840};
841
842/**
843 * \brief Status of the temperature sensor of the external motor.
844 */
846 /** \brief Unique integer value of this ExternalMotorTempStatusValue. */
847 int value;
848
849 /**
850 * \brief Talon is collecting information on the sensor.
851 */
852 static constexpr int Collecting = 0;
853 /**
854 * \brief Temperature sensor appears to be disconnected.
855 */
856 static constexpr int Disconnected = 1;
857 /**
858 * \brief Temperature sensor is too hot to allow motor operation.
859 */
860 static constexpr int TooHot = 2;
861 /**
862 * \brief Temperature sensor is normal.
863 */
864 static constexpr int Normal = 3;
865 /**
866 * \brief Temperature sensor is present but is not used. Most likely the motor
867 * arrangement is brushed or disabled.
868 */
869 static constexpr int NotUsed = 4;
870 /**
871 * \brief Temperature sensor appears to be for the wrong motor arrangement, or
872 * signals are shorted.
873 */
874 static constexpr int WrongMotorOrShorted = 5;
875
877 value{value}
878 {}
879
881 value{-1}
882 {}
883
884 constexpr bool operator==(ExternalMotorTempStatusValue other) const
885 {
886 return value == other.value;
887 }
888 constexpr auto operator<=>(ExternalMotorTempStatusValue other) const
889 {
890 return value <=> other.value;
891 }
892
893 /**
894 * \brief Gets the string representation of this enum
895 *
896 * \returns String representation of this enum
897 */
898 constexpr std::string_view ToString() const
899 {
900 switch (value) {
901 case ExternalMotorTempStatusValue::Collecting: return "Collecting";
902 case ExternalMotorTempStatusValue::Disconnected: return "Disconnected";
903 case ExternalMotorTempStatusValue::TooHot: return "Too Hot";
904 case ExternalMotorTempStatusValue::Normal: return "Normal";
905 case ExternalMotorTempStatusValue::NotUsed: return "Not Used";
906 case ExternalMotorTempStatusValue::WrongMotorOrShorted: return "Wrong Motor Or Shorted";
907 default: return "Invalid Value";
908 }
909 }
910
911 CTREXPORT friend std::ostream &operator<<(std::ostream &os, ExternalMotorTempStatusValue data);
912};
913
914/**
915 * \brief Whether the closed-loop is running on position or velocity.
916 */
918 /** \brief Unique integer value of this PIDRefPIDErr_ClosedLoopModeValue. */
919 int value;
920
921 static constexpr int Position = 0;
922 static constexpr int Velocity = 1;
923
925 value{value}
926 {}
927
929 value{-1}
930 {}
931
933 {
934 return value == other.value;
935 }
937 {
938 return value <=> other.value;
939 }
940
941 /**
942 * \brief Gets the string representation of this enum
943 *
944 * \returns String representation of this enum
945 */
946 constexpr std::string_view ToString() const
947 {
948 switch (value) {
949 case PIDRefPIDErr_ClosedLoopModeValue::Position: return "Position";
950 case PIDRefPIDErr_ClosedLoopModeValue::Velocity: return "Velocity";
951 default: return "Invalid Value";
952 }
953 }
954
955 CTREXPORT friend std::ostream &operator<<(std::ostream &os, PIDRefPIDErr_ClosedLoopModeValue data);
956};
957
958/**
959 * \brief The output mode of the PID controller.
960 */
962 /** \brief Unique integer value of this PIDOutput_PIDOutputModeValue. */
963 int value;
964
965 static constexpr int DutyCycle = 0;
966 static constexpr int Voltage = 1;
967 static constexpr int TorqueCurrentFOC = 2;
968
970 value{value}
971 {}
972
974 value{-1}
975 {}
976
977 constexpr bool operator==(PIDOutput_PIDOutputModeValue other) const
978 {
979 return value == other.value;
980 }
981 constexpr auto operator<=>(PIDOutput_PIDOutputModeValue other) const
982 {
983 return value <=> other.value;
984 }
985
986 /**
987 * \brief Gets the string representation of this enum
988 *
989 * \returns String representation of this enum
990 */
991 constexpr std::string_view ToString() const
992 {
993 switch (value) {
994 case PIDOutput_PIDOutputModeValue::DutyCycle: return "DutyCycle";
995 case PIDOutput_PIDOutputModeValue::Voltage: return "Voltage";
996 case PIDOutput_PIDOutputModeValue::TorqueCurrentFOC: return "TorqueCurrentFOC";
997 default: return "Invalid Value";
998 }
999 }
1000
1001 CTREXPORT friend std::ostream &operator<<(std::ostream &os, PIDOutput_PIDOutputModeValue data);
1002};
1003
1004/**
1005 * \brief Whether the closed-loop is running on position or velocity.
1006 */
1008 /** \brief Unique integer value of this PIDRefSlopeECUTime_ClosedLoopModeValue. */
1010
1011 static constexpr int Position = 0;
1012 static constexpr int Velocity = 1;
1013
1017
1019 value{-1}
1020 {}
1021
1023 {
1024 return value == other.value;
1025 }
1027 {
1028 return value <=> other.value;
1029 }
1030
1031 /**
1032 * \brief Gets the string representation of this enum
1033 *
1034 * \returns String representation of this enum
1035 */
1036 constexpr std::string_view ToString() const
1037 {
1038 switch (value) {
1041 default: return "Invalid Value";
1042 }
1043 }
1044
1045 CTREXPORT friend std::ostream &operator<<(std::ostream &os, PIDRefSlopeECUTime_ClosedLoopModeValue data);
1046};
1047
1048/**
1049 * \brief Assess the status of the motor output with respect to load and supply.
1050 *
1051 * \details This routine can be used to determine the general status of motor
1052 * commutation.
1053 */
1055 /** \brief Unique integer value of this MotorOutputStatusValue. */
1057
1058 /**
1059 * \brief The status of motor output could not be determined.
1060 */
1061 static constexpr int Unknown = 0;
1062 /**
1063 * \brief Motor output is disabled.
1064 */
1065 static constexpr int Off = 1;
1066 /**
1067 * \brief The motor is in neutral-brake.
1068 */
1069 static constexpr int StaticBraking = 2;
1070 /**
1071 * \brief The motor is loaded in a typical fashion, drawing current from the
1072 * supply, and successfully turning the rotor in the direction of applied
1073 * voltage.
1074 */
1075 static constexpr int Motoring = 3;
1076 /**
1077 * \brief The same as Motoring, except the rotor is being backdriven as the
1078 * motor output is not enough to defeat load forces.
1079 */
1080 static constexpr int DiscordantMotoring = 4;
1081 /**
1082 * \brief The motor is braking in such a way where motor current is traveling
1083 * back to the supply (typically a battery).
1084 */
1085 static constexpr int RegenBraking = 5;
1086
1088 value{value}
1089 {}
1090
1092 value{-1}
1093 {}
1094
1095 constexpr bool operator==(MotorOutputStatusValue other) const
1096 {
1097 return value == other.value;
1098 }
1099 constexpr auto operator<=>(MotorOutputStatusValue other) const
1100 {
1101 return value <=> other.value;
1102 }
1103
1104 /**
1105 * \brief Gets the string representation of this enum
1106 *
1107 * \returns String representation of this enum
1108 */
1109 constexpr std::string_view ToString() const
1110 {
1111 switch (value) {
1112 case MotorOutputStatusValue::Unknown: return "Unknown";
1113 case MotorOutputStatusValue::Off: return "Off";
1114 case MotorOutputStatusValue::StaticBraking: return "StaticBraking";
1115 case MotorOutputStatusValue::Motoring: return "Motoring";
1116 case MotorOutputStatusValue::DiscordantMotoring: return "DiscordantMotoring";
1117 case MotorOutputStatusValue::RegenBraking: return "RegenBraking";
1118 default: return "Invalid Value";
1119 }
1120 }
1121
1122 CTREXPORT friend std::ostream &operator<<(std::ostream &os, MotorOutputStatusValue data);
1123};
1124
1125/**
1126 * \brief The active control mode of the differential controller.
1127 */
1129 /** \brief Unique integer value of this DifferentialControlModeValue. */
1131
1132 static constexpr int DisabledOutput = 0;
1133 static constexpr int NeutralOut = 1;
1134 static constexpr int StaticBrake = 2;
1135 static constexpr int DutyCycleOut = 3;
1136 static constexpr int PositionDutyCycle = 4;
1137 static constexpr int VelocityDutyCycle = 5;
1138 static constexpr int MotionMagicDutyCycle = 6;
1139 static constexpr int DutyCycleFOC = 7;
1140 static constexpr int PositionDutyCycleFOC = 8;
1141 static constexpr int VelocityDutyCycleFOC = 9;
1142 static constexpr int MotionMagicDutyCycleFOC = 10;
1143 static constexpr int VoltageOut = 11;
1144 static constexpr int PositionVoltage = 12;
1145 static constexpr int VelocityVoltage = 13;
1146 static constexpr int MotionMagicVoltage = 14;
1147 static constexpr int VoltageFOC = 15;
1148 static constexpr int PositionVoltageFOC = 16;
1149 static constexpr int VelocityVoltageFOC = 17;
1150 static constexpr int MotionMagicVoltageFOC = 18;
1151 static constexpr int TorqueCurrentFOC = 19;
1152 static constexpr int PositionTorqueCurrentFOC = 20;
1153 static constexpr int VelocityTorqueCurrentFOC = 21;
1154 static constexpr int MotionMagicTorqueCurrentFOC = 22;
1155 static constexpr int Follower = 23;
1156 static constexpr int Reserved = 24;
1157 static constexpr int CoastOut = 25;
1158 static constexpr int UnauthorizedDevice = 26;
1159 static constexpr int MusicTone = 27;
1160 static constexpr int MotionMagicVelocityDutyCycle = 28;
1161 static constexpr int MotionMagicVelocityDutyCycleFOC = 29;
1162 static constexpr int MotionMagicVelocityVoltage = 30;
1163 static constexpr int MotionMagicVelocityVoltageFOC = 31;
1164 static constexpr int MotionMagicVelocityTorqueCurrentFOC = 32;
1165 static constexpr int MotionMagicExpoDutyCycle = 33;
1166 static constexpr int MotionMagicExpoDutyCycleFOC = 34;
1167 static constexpr int MotionMagicExpoVoltage = 35;
1168 static constexpr int MotionMagicExpoVoltageFOC = 36;
1169 static constexpr int MotionMagicExpoTorqueCurrentFOC = 37;
1170
1172 value{value}
1173 {}
1174
1176 value{-1}
1177 {}
1178
1179 constexpr bool operator==(DifferentialControlModeValue other) const
1180 {
1181 return value == other.value;
1182 }
1183 constexpr auto operator<=>(DifferentialControlModeValue other) const
1184 {
1185 return value <=> other.value;
1186 }
1187
1188 /**
1189 * \brief Gets the string representation of this enum
1190 *
1191 * \returns String representation of this enum
1192 */
1193 constexpr std::string_view ToString() const
1194 {
1195 switch (value) {
1196 case DifferentialControlModeValue::DisabledOutput: return "DisabledOutput";
1197 case DifferentialControlModeValue::NeutralOut: return "NeutralOut";
1198 case DifferentialControlModeValue::StaticBrake: return "StaticBrake";
1199 case DifferentialControlModeValue::DutyCycleOut: return "DutyCycleOut";
1200 case DifferentialControlModeValue::PositionDutyCycle: return "PositionDutyCycle";
1201 case DifferentialControlModeValue::VelocityDutyCycle: return "VelocityDutyCycle";
1202 case DifferentialControlModeValue::MotionMagicDutyCycle: return "MotionMagicDutyCycle";
1203 case DifferentialControlModeValue::DutyCycleFOC: return "DutyCycleFOC";
1204 case DifferentialControlModeValue::PositionDutyCycleFOC: return "PositionDutyCycleFOC";
1205 case DifferentialControlModeValue::VelocityDutyCycleFOC: return "VelocityDutyCycleFOC";
1206 case DifferentialControlModeValue::MotionMagicDutyCycleFOC: return "MotionMagicDutyCycleFOC";
1207 case DifferentialControlModeValue::VoltageOut: return "VoltageOut";
1208 case DifferentialControlModeValue::PositionVoltage: return "PositionVoltage";
1209 case DifferentialControlModeValue::VelocityVoltage: return "VelocityVoltage";
1210 case DifferentialControlModeValue::MotionMagicVoltage: return "MotionMagicVoltage";
1211 case DifferentialControlModeValue::VoltageFOC: return "VoltageFOC";
1212 case DifferentialControlModeValue::PositionVoltageFOC: return "PositionVoltageFOC";
1213 case DifferentialControlModeValue::VelocityVoltageFOC: return "VelocityVoltageFOC";
1214 case DifferentialControlModeValue::MotionMagicVoltageFOC: return "MotionMagicVoltageFOC";
1215 case DifferentialControlModeValue::TorqueCurrentFOC: return "TorqueCurrentFOC";
1216 case DifferentialControlModeValue::PositionTorqueCurrentFOC: return "PositionTorqueCurrentFOC";
1217 case DifferentialControlModeValue::VelocityTorqueCurrentFOC: return "VelocityTorqueCurrentFOC";
1218 case DifferentialControlModeValue::MotionMagicTorqueCurrentFOC: return "MotionMagicTorqueCurrentFOC";
1219 case DifferentialControlModeValue::Follower: return "Follower";
1220 case DifferentialControlModeValue::Reserved: return "Reserved";
1221 case DifferentialControlModeValue::CoastOut: return "CoastOut";
1222 case DifferentialControlModeValue::UnauthorizedDevice: return "UnauthorizedDevice";
1223 case DifferentialControlModeValue::MusicTone: return "MusicTone";
1224 case DifferentialControlModeValue::MotionMagicVelocityDutyCycle: return "MotionMagicVelocityDutyCycle";
1225 case DifferentialControlModeValue::MotionMagicVelocityDutyCycleFOC: return "MotionMagicVelocityDutyCycleFOC";
1226 case DifferentialControlModeValue::MotionMagicVelocityVoltage: return "MotionMagicVelocityVoltage";
1227 case DifferentialControlModeValue::MotionMagicVelocityVoltageFOC: return "MotionMagicVelocityVoltageFOC";
1228 case DifferentialControlModeValue::MotionMagicVelocityTorqueCurrentFOC: return "MotionMagicVelocityTorqueCurrentFOC";
1229 case DifferentialControlModeValue::MotionMagicExpoDutyCycle: return "MotionMagicExpoDutyCycle";
1230 case DifferentialControlModeValue::MotionMagicExpoDutyCycleFOC: return "MotionMagicExpoDutyCycleFOC";
1231 case DifferentialControlModeValue::MotionMagicExpoVoltage: return "MotionMagicExpoVoltage";
1232 case DifferentialControlModeValue::MotionMagicExpoVoltageFOC: return "MotionMagicExpoVoltageFOC";
1233 case DifferentialControlModeValue::MotionMagicExpoTorqueCurrentFOC: return "MotionMagicExpoTorqueCurrentFOC";
1234 default: return "Invalid Value";
1235 }
1236 }
1237
1238 CTREXPORT friend std::ostream &operator<<(std::ostream &os, DifferentialControlModeValue data);
1239};
1240
1241/**
1242 * \brief Whether the closed-loop is running on position or velocity.
1243 */
1245 /** \brief Unique integer value of this DiffPIDRefPIDErr_ClosedLoopModeValue. */
1247
1248 static constexpr int Position = 0;
1249 static constexpr int Velocity = 1;
1250
1254
1256 value{-1}
1257 {}
1258
1260 {
1261 return value == other.value;
1262 }
1264 {
1265 return value <=> other.value;
1266 }
1267
1268 /**
1269 * \brief Gets the string representation of this enum
1270 *
1271 * \returns String representation of this enum
1272 */
1273 constexpr std::string_view ToString() const
1274 {
1275 switch (value) {
1276 case DiffPIDRefPIDErr_ClosedLoopModeValue::Position: return "Position";
1277 case DiffPIDRefPIDErr_ClosedLoopModeValue::Velocity: return "Velocity";
1278 default: return "Invalid Value";
1279 }
1280 }
1281
1282 CTREXPORT friend std::ostream &operator<<(std::ostream &os, DiffPIDRefPIDErr_ClosedLoopModeValue data);
1283};
1284
1285/**
1286 * \brief The output mode of the differential PID controller.
1287 */
1289 /** \brief Unique integer value of this DiffPIDOutput_PIDOutputModeValue. */
1291
1292 static constexpr int DutyCycle = 0;
1293 static constexpr int Voltage = 1;
1294 static constexpr int TorqueCurrentFOC = 2;
1295
1297 value{value}
1298 {}
1299
1301 value{-1}
1302 {}
1303
1305 {
1306 return value == other.value;
1307 }
1309 {
1310 return value <=> other.value;
1311 }
1312
1313 /**
1314 * \brief Gets the string representation of this enum
1315 *
1316 * \returns String representation of this enum
1317 */
1318 constexpr std::string_view ToString() const
1319 {
1320 switch (value) {
1321 case DiffPIDOutput_PIDOutputModeValue::DutyCycle: return "DutyCycle";
1322 case DiffPIDOutput_PIDOutputModeValue::Voltage: return "Voltage";
1323 case DiffPIDOutput_PIDOutputModeValue::TorqueCurrentFOC: return "TorqueCurrentFOC";
1324 default: return "Invalid Value";
1325 }
1326 }
1327
1328 CTREXPORT friend std::ostream &operator<<(std::ostream &os, DiffPIDOutput_PIDOutputModeValue data);
1329};
1330
1331/**
1332 * \brief Whether the closed-loop is running on position or velocity.
1333 */
1335 /** \brief Unique integer value of this DiffPIDRefSlopeECUTime_ClosedLoopModeValue. */
1337
1338 static constexpr int Position = 0;
1339 static constexpr int Velocity = 1;
1340
1344
1348
1350 {
1351 return value == other.value;
1352 }
1354 {
1355 return value <=> other.value;
1356 }
1357
1358 /**
1359 * \brief Gets the string representation of this enum
1360 *
1361 * \returns String representation of this enum
1362 */
1363 constexpr std::string_view ToString() const
1364 {
1365 switch (value) {
1368 default: return "Invalid Value";
1369 }
1370 }
1371
1372 CTREXPORT friend std::ostream &operator<<(std::ostream &os, DiffPIDRefSlopeECUTime_ClosedLoopModeValue data);
1373};
1374
1375/**
1376 * \brief Gravity feedforward/feedback type.
1377 *
1378 * This determines the type of the gravity feedforward/feedback.
1379 *
1380 * Choose Elevator_Static for systems where the gravity feedforward is
1381 * constant, such as an elevator. The gravity feedforward output will
1382 * always have the same sign.
1383 *
1384 * Choose Arm_Cosine for systems where the gravity feedback is dependent
1385 * on the angular position of the mechanism, such as an arm. The gravity
1386 * feedback output will vary depending on the mechanism angular position.
1387 * Note that the sensor offset and ratios must be configured so that the
1388 * sensor reports a position of 0 when the mechanism is horizonal
1389 * (parallel to the ground), and the reported sensor position is 1:1 with
1390 * the mechanism.
1391 */
1393 /** \brief Unique integer value of this GravityTypeValue. */
1395
1396 /**
1397 * \brief The system's gravity feedforward is constant, such as an elevator. The
1398 * gravity feedforward output will always have the same sign.
1399 */
1400 static constexpr int Elevator_Static = 0;
1401 /**
1402 * \brief The system's gravity feedback is dependent on the angular position of
1403 * the mechanism, such as an arm. The gravity feedback output will vary
1404 * depending on the mechanism angular position. Note that the sensor
1405 * offset and ratios must be configured so that the sensor reports a
1406 * position of 0 when the mechanism is horizonal (parallel to the
1407 * ground), and the reported sensor position is 1:1 with the mechanism.
1408 */
1409 static constexpr int Arm_Cosine = 1;
1410
1411 constexpr GravityTypeValue(int value) :
1412 value{value}
1413 {}
1414
1415 constexpr GravityTypeValue() :
1416 value{-1}
1417 {}
1418
1419 constexpr bool operator==(GravityTypeValue other) const
1420 {
1421 return value == other.value;
1422 }
1423 constexpr auto operator<=>(GravityTypeValue other) const
1424 {
1425 return value <=> other.value;
1426 }
1427
1428 /**
1429 * \brief Gets the string representation of this enum
1430 *
1431 * \returns String representation of this enum
1432 */
1433 constexpr std::string_view ToString() const
1434 {
1435 switch (value) {
1436 case GravityTypeValue::Elevator_Static: return "Elevator_Static";
1437 case GravityTypeValue::Arm_Cosine: return "Arm_Cosine";
1438 default: return "Invalid Value";
1439 }
1440 }
1441
1442 CTREXPORT friend std::ostream &operator<<(std::ostream &os, GravityTypeValue data);
1443};
1444
1445/**
1446 * \brief Invert state of the device as seen from the front of the motor.
1447 */
1449 /** \brief Unique integer value of this InvertedValue. */
1451
1452 /**
1453 * \brief Positive motor output results in counter-clockwise motion.
1454 */
1455 static constexpr int CounterClockwise_Positive = 0;
1456 /**
1457 * \brief Positive motor output results in clockwise motion.
1458 */
1459 static constexpr int Clockwise_Positive = 1;
1460
1461 constexpr InvertedValue(int value) :
1462 value{value}
1463 {}
1464
1465 constexpr InvertedValue() :
1466 value{-1}
1467 {}
1468
1469 constexpr bool operator==(InvertedValue other) const
1470 {
1471 return value == other.value;
1472 }
1473 constexpr auto operator<=>(InvertedValue other) const
1474 {
1475 return value <=> other.value;
1476 }
1477
1478 /**
1479 * \brief Gets the string representation of this enum
1480 *
1481 * \returns String representation of this enum
1482 */
1483 constexpr std::string_view ToString() const
1484 {
1485 switch (value) {
1486 case InvertedValue::CounterClockwise_Positive: return "CounterClockwise_Positive";
1487 case InvertedValue::Clockwise_Positive: return "Clockwise_Positive";
1488 default: return "Invalid Value";
1489 }
1490 }
1491
1492 CTREXPORT friend std::ostream &operator<<(std::ostream &os, InvertedValue data);
1493};
1494
1495/**
1496 * \brief The state of the motor controller bridge when output is neutral or
1497 * disabled.
1498 */
1500 /** \brief Unique integer value of this NeutralModeValue. */
1502
1503 static constexpr int Coast = 0;
1504 static constexpr int Brake = 1;
1505
1506 constexpr NeutralModeValue(int value) :
1507 value{value}
1508 {}
1509
1510 constexpr NeutralModeValue() :
1511 value{-1}
1512 {}
1513
1514 constexpr bool operator==(NeutralModeValue other) const
1515 {
1516 return value == other.value;
1517 }
1518 constexpr auto operator<=>(NeutralModeValue other) const
1519 {
1520 return value <=> other.value;
1521 }
1522
1523 /**
1524 * \brief Gets the string representation of this enum
1525 *
1526 * \returns String representation of this enum
1527 */
1528 constexpr std::string_view ToString() const
1529 {
1530 switch (value) {
1531 case NeutralModeValue::Coast: return "Coast";
1532 case NeutralModeValue::Brake: return "Brake";
1533 default: return "Invalid Value";
1534 }
1535 }
1536
1537 CTREXPORT friend std::ostream &operator<<(std::ostream &os, NeutralModeValue data);
1538};
1539
1540/**
1541 * \brief Choose what sensor source is reported via API and used by closed-loop
1542 * and limit features. The default is RotorSensor, which uses the
1543 * internal rotor sensor in the Talon.
1544 *
1545 * Choose Remote* to use another sensor on the same CAN bus (this also
1546 * requires setting FeedbackRemoteSensorID). Talon will update its
1547 * position and velocity whenever the remote sensor publishes its
1548 * information on CAN bus, and the Talon internal rotor will not be used.
1549 *
1550 * Choose Fused* (requires Phoenix Pro) and Talon will fuse another
1551 * sensor's information with the internal rotor, which provides the best
1552 * possible position and velocity for accuracy and bandwidth (this also
1553 * requires setting FeedbackRemoteSensorID). This was developed for
1554 * applications such as swerve-azimuth.
1555 *
1556 * Choose Sync* (requires Phoenix Pro) and Talon will synchronize its
1557 * internal rotor position against another sensor, then continue to use
1558 * the rotor sensor for closed loop control (this also requires setting
1559 * FeedbackRemoteSensorID). The Talon will report if its internal
1560 * position differs significantly from the reported remote sensor
1561 * position. This was developed for mechanisms where there is a risk of
1562 * the sensor failing in such a way that it reports a position that does
1563 * not match the mechanism, such as the sensor mounting assembly breaking
1564 * off.
1565 *
1566 * Choose RemotePigeon2Yaw, RemotePigeon2Pitch, and RemotePigeon2Roll to
1567 * use another Pigeon2 on the same CAN bus (this also requires setting
1568 * FeedbackRemoteSensorID). Talon will update its position to match the
1569 * selected value whenever Pigeon2 publishes its information on CAN bus.
1570 * Note that the Talon position will be in rotations and not degrees.
1571 *
1572 * \details Note: When the feedback source is changed to Fused* or Sync*, the
1573 * Talon needs a period of time to fuse before sensor-based
1574 * (soft-limit, closed loop, etc.) features are used. This period of
1575 * time is determined by the update frequency of the remote sensor's
1576 * Position signal.
1577 */
1579 /** \brief Unique integer value of this FeedbackSensorSourceValue. */
1581
1582 /**
1583 * \brief Use the internal rotor sensor in the Talon.
1584 */
1585 static constexpr int RotorSensor = 0;
1586 /**
1587 * \brief Use another CANcoder on the same CAN bus (this also requires setting
1588 * FeedbackRemoteSensorID). Talon will update its position and velocity
1589 * whenever CANcoder publishes its information on CAN bus, and the Talon
1590 * internal rotor will not be used.
1591 */
1592 static constexpr int RemoteCANcoder = 1;
1593 /**
1594 * \brief Use another Pigeon2 on the same CAN bus (this also requires setting
1595 * FeedbackRemoteSensorID). Talon will update its position to match the
1596 * Pigeon2 yaw whenever Pigeon2 publishes its information on CAN bus.
1597 * Note that the Talon position will be in rotations and not degrees.
1598 */
1599 static constexpr int RemotePigeon2Yaw = 2;
1600 /**
1601 * \brief Use another Pigeon2 on the same CAN bus (this also requires setting
1602 * FeedbackRemoteSensorID). Talon will update its position to match the
1603 * Pigeon2 pitch whenever Pigeon2 publishes its information on CAN bus.
1604 * Note that the Talon position will be in rotations and not degrees.
1605 */
1606 static constexpr int RemotePigeon2Pitch = 3;
1607 /**
1608 * \brief Use another Pigeon2 on the same CAN bus (this also requires setting
1609 * FeedbackRemoteSensorID). Talon will update its position to match the
1610 * Pigeon2 roll whenever Pigeon2 publishes its information on CAN bus.
1611 * Note that the Talon position will be in rotations and not degrees.
1612 */
1613 static constexpr int RemotePigeon2Roll = 4;
1614 /**
1615 * \brief Requires Phoenix Pro; Talon will fuse another CANcoder's information
1616 * with the internal rotor, which provides the best possible position and
1617 * velocity for accuracy and bandwidth (this also requires setting
1618 * FeedbackRemoteSensorID). FusedCANcoder was developed for applications
1619 * such as swerve-azimuth.
1620 */
1621 static constexpr int FusedCANcoder = 5;
1622 /**
1623 * \brief Requires Phoenix Pro; Talon will synchronize its internal rotor
1624 * position against another CANcoder, then continue to use the rotor
1625 * sensor for closed loop control (this also requires setting
1626 * FeedbackRemoteSensorID). The Talon will report if its internal
1627 * position differs significantly from the reported CANcoder position.
1628 * SyncCANcoder was developed for mechanisms where there is a risk of the
1629 * CANcoder failing in such a way that it reports a position that does
1630 * not match the mechanism, such as the sensor mounting assembly breaking
1631 * off.
1632 */
1633 static constexpr int SyncCANcoder = 6;
1634 /**
1635 * \brief Use a pulse-width encoder remotely attached to the Sensor Input 1
1636 * (S1IN) on the CTR Electronics' CANdi™ (this also requires setting
1637 * FeedbackRemoteSensorID). Talon will update its position and velocity
1638 * whenever the CTR Electronics' CANdi™ publishes its information on CAN
1639 * bus, and the Talon internal rotor will not be used.
1640 */
1641 static constexpr int RemoteCANdiPWM1 = 9;
1642 /**
1643 * \brief Use a pulse-width encoder remotely attached to the Sensor Input 2
1644 * (S2IN) on the CTR Electronics' CANdi™ (this also requires setting
1645 * FeedbackRemoteSensorID). Talon will update its position and velocity
1646 * whenever the CTR Electronics' CANdi™ publishes its information on CAN
1647 * bus, and the Talon internal rotor will not be used.
1648 */
1649 static constexpr int RemoteCANdiPWM2 = 10;
1650 /**
1651 * \brief Use a quadrature encoder remotely attached to the two Sensor Inputs on
1652 * the CTR Electronics' CANdi™ (this also requires setting
1653 * FeedbackRemoteSensorID). Talon will update its position and velocity
1654 * whenever the CTR Electronics' CANdi™ publishes its information on CAN
1655 * bus, and the Talon internal rotor will not be used.
1656 */
1657 static constexpr int RemoteCANdiQuadrature = 11;
1658 /**
1659 * \brief Requires Phoenix Pro; Talon will fuse a pulse-width encoder remotely
1660 * attached to the Sensor Input 1 (S1IN) on the CTR Electronics' CANdi™,
1661 * which provides the best possible position and velocity for accuracy
1662 * and bandwidth (this also requires setting FeedbackRemoteSensorID).
1663 * FusedCANdi was developed for applications such as swerve-azimuth.
1664 */
1665 static constexpr int FusedCANdiPWM1 = 12;
1666 /**
1667 * \brief Requires Phoenix Pro; Talon will fuse a pulse-width encoder remotely
1668 * attached to the Sensor Input 2 (S2IN) on the CTR Electronics' CANdi™,
1669 * which provides the best possible position and velocity for accuracy
1670 * and bandwidth (this also requires setting FeedbackRemoteSensorID).
1671 * FusedCANdi was developed for applications such as swerve-azimuth.
1672 */
1673 static constexpr int FusedCANdiPWM2 = 13;
1674 /**
1675 * \brief Requires Phoenix Pro; Talon will fuse a qaudrature encoder remotely
1676 * attached to the two Sensor Inputs on the CTR Electronics' CANdi™. This
1677 * provides velocity and relative position measurements. This also
1678 * requires setting FeedbackRemoteSensorID.
1679 */
1680 static constexpr int FusedCANdiQuadrature = 14;
1681 /**
1682 * \brief Requires Phoenix Pro; Talon will synchronize its internal rotor
1683 * position against the pulse-width encoder attached to Sensor Input 1
1684 * (S1IN), then continue to use the rotor sensor for closed loop control
1685 * (this also requires setting FeedbackRemoteSensorID). The Talon will
1686 * report if its internal position differs significantly from the
1687 * reported PWM position. SyncCANdi was developed for mechanisms where
1688 * there is a risk of the CTR Electronics' CANdi™ failing in such a way
1689 * that it reports a position that does not match the mechanism, such as
1690 * the sensor mounting assembly breaking off.
1691 */
1692 static constexpr int SyncCANdiPWM1 = 15;
1693 /**
1694 * \brief Requires Phoenix Pro; Talon will synchronize its internal rotor
1695 * position against the pulse-width encoder attached to Sensor Input 1
1696 * (S1IN), then continue to use the rotor sensor for closed loop control
1697 * (this also requires setting FeedbackRemoteSensorID). The Talon will
1698 * report if its internal position differs significantly from the
1699 * reported PWM position. SyncCANdi was developed for mechanisms where
1700 * there is a risk of the CTR Electronics' CANdi™ failing in such a way
1701 * that it reports a position that does not match the mechanism, such as
1702 * the sensor mounting assembly breaking off.
1703 */
1704 static constexpr int SyncCANdiPWM2 = 16;
1705
1707 value{value}
1708 {}
1709
1711 value{-1}
1712 {}
1713
1714 constexpr bool operator==(FeedbackSensorSourceValue other) const
1715 {
1716 return value == other.value;
1717 }
1718 constexpr auto operator<=>(FeedbackSensorSourceValue other) const
1719 {
1720 return value <=> other.value;
1721 }
1722
1723 /**
1724 * \brief Gets the string representation of this enum
1725 *
1726 * \returns String representation of this enum
1727 */
1728 constexpr std::string_view ToString() const
1729 {
1730 switch (value) {
1731 case FeedbackSensorSourceValue::RotorSensor: return "RotorSensor";
1732 case FeedbackSensorSourceValue::RemoteCANcoder: return "RemoteCANcoder";
1733 case FeedbackSensorSourceValue::RemotePigeon2Yaw: return "RemotePigeon2Yaw";
1734 case FeedbackSensorSourceValue::RemotePigeon2Pitch: return "RemotePigeon2Pitch";
1735 case FeedbackSensorSourceValue::RemotePigeon2Roll: return "RemotePigeon2Roll";
1736 case FeedbackSensorSourceValue::FusedCANcoder: return "FusedCANcoder";
1737 case FeedbackSensorSourceValue::SyncCANcoder: return "SyncCANcoder";
1738 case FeedbackSensorSourceValue::RemoteCANdiPWM1: return "RemoteCANdiPWM1";
1739 case FeedbackSensorSourceValue::RemoteCANdiPWM2: return "RemoteCANdiPWM2";
1740 case FeedbackSensorSourceValue::RemoteCANdiQuadrature: return "RemoteCANdiQuadrature";
1741 case FeedbackSensorSourceValue::FusedCANdiPWM1: return "FusedCANdiPWM1";
1742 case FeedbackSensorSourceValue::FusedCANdiPWM2: return "FusedCANdiPWM2";
1743 case FeedbackSensorSourceValue::FusedCANdiQuadrature: return "FusedCANdiQuadrature";
1744 case FeedbackSensorSourceValue::SyncCANdiPWM1: return "SyncCANdiPWM1";
1745 case FeedbackSensorSourceValue::SyncCANdiPWM2: return "SyncCANdiPWM2";
1746 default: return "Invalid Value";
1747 }
1748 }
1749
1750 CTREXPORT friend std::ostream &operator<<(std::ostream &os, FeedbackSensorSourceValue data);
1751};
1752
1753/**
1754 * \brief Determines if the forward limit switch is normally-open (default) or
1755 * normally-closed.
1756 */
1758 /** \brief Unique integer value of this ForwardLimitTypeValue. */
1760
1761 static constexpr int NormallyOpen = 0;
1762 static constexpr int NormallyClosed = 1;
1763
1765 value{value}
1766 {}
1767
1769 value{-1}
1770 {}
1771
1772 constexpr bool operator==(ForwardLimitTypeValue other) const
1773 {
1774 return value == other.value;
1775 }
1776 constexpr auto operator<=>(ForwardLimitTypeValue other) const
1777 {
1778 return value <=> other.value;
1779 }
1780
1781 /**
1782 * \brief Gets the string representation of this enum
1783 *
1784 * \returns String representation of this enum
1785 */
1786 constexpr std::string_view ToString() const
1787 {
1788 switch (value) {
1789 case ForwardLimitTypeValue::NormallyOpen: return "NormallyOpen";
1790 case ForwardLimitTypeValue::NormallyClosed: return "NormallyClosed";
1791 default: return "Invalid Value";
1792 }
1793 }
1794
1795 CTREXPORT friend std::ostream &operator<<(std::ostream &os, ForwardLimitTypeValue data);
1796};
1797
1798/**
1799 * \brief Determines where to poll the forward limit switch. This defaults to
1800 * the forward limit switch pin on the limit switch connector.
1801 *
1802 * Choose RemoteTalonFX to use the forward limit switch attached to
1803 * another Talon FX on the same CAN bus (this also requires setting
1804 * ForwardLimitRemoteSensorID).
1805 *
1806 * Choose RemoteCANifier to use the forward limit switch attached to
1807 * another CANifier on the same CAN bus (this also requires setting
1808 * ForwardLimitRemoteSensorID).
1809 *
1810 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
1811 * (this also requires setting ForwardLimitRemoteSensorID). The forward
1812 * limit will assert when the CANcoder magnet strength changes from BAD
1813 * (red) to ADEQUATE (orange) or GOOD (green).
1814 */
1816 /** \brief Unique integer value of this ForwardLimitSourceValue. */
1818
1819 /**
1820 * \brief Use the forward limit switch pin on the limit switch connector.
1821 */
1822 static constexpr int LimitSwitchPin = 0;
1823 /**
1824 * \brief Use the forward limit switch attached to another Talon FX on the same
1825 * CAN bus (this also requires setting ForwardLimitRemoteSensorID).
1826 */
1827 static constexpr int RemoteTalonFX = 1;
1828 /**
1829 * \brief Use the forward limit switch attached to another CANifier on the same
1830 * CAN bus (this also requires setting ForwardLimitRemoteSensorID).
1831 */
1832 static constexpr int RemoteCANifier = 2;
1833 /**
1834 * \brief Use another CANcoder on the same CAN bus (this also requires setting
1835 * ForwardLimitRemoteSensorID). The forward limit will assert when the
1836 * CANcoder magnet strength changes from BAD (red) to ADEQUATE (orange)
1837 * or GOOD (green).
1838 */
1839 static constexpr int RemoteCANcoder = 4;
1840 /**
1841 * \brief Use another CANrange on the same CAN bus (this also requires setting
1842 * ForwardLimitRemoteSensorID). The forward limit will assert when the
1843 * CANrange proximity detect is tripped.
1844 */
1845 static constexpr int RemoteCANrange = 6;
1846 /**
1847 * \brief Use another CTR Electronics' CANdi™ on the same CAN bus (this also
1848 * requires setting ForwardLimitRemoteSensorID). The forward limit will
1849 * assert when the CTR Electronics' CANdi™ Signal 1 Input (S1IN) pin
1850 * matches the configured closed state.
1851 */
1852 static constexpr int RemoteCANdiS1 = 7;
1853 /**
1854 * \brief Use another CTR Electronics' CANdi™ on the same CAN bus (this also
1855 * requires setting ForwardLimitRemoteSensorID). The forward limit will
1856 * assert when the CTR Electronics' CANdi™ Signal 2 Input (S2IN) pin
1857 * matches the configured closed state.
1858 */
1859 static constexpr int RemoteCANdiS2 = 8;
1860 /**
1861 * \brief Disable the forward limit switch.
1862 */
1863 static constexpr int Disabled = 3;
1864
1866 value{value}
1867 {}
1868
1870 value{-1}
1871 {}
1872
1873 constexpr bool operator==(ForwardLimitSourceValue other) const
1874 {
1875 return value == other.value;
1876 }
1877 constexpr auto operator<=>(ForwardLimitSourceValue other) const
1878 {
1879 return value <=> other.value;
1880 }
1881
1882 /**
1883 * \brief Gets the string representation of this enum
1884 *
1885 * \returns String representation of this enum
1886 */
1887 constexpr std::string_view ToString() const
1888 {
1889 switch (value) {
1890 case ForwardLimitSourceValue::LimitSwitchPin: return "LimitSwitchPin";
1891 case ForwardLimitSourceValue::RemoteTalonFX: return "RemoteTalonFX";
1892 case ForwardLimitSourceValue::RemoteCANifier: return "RemoteCANifier";
1893 case ForwardLimitSourceValue::RemoteCANcoder: return "RemoteCANcoder";
1894 case ForwardLimitSourceValue::RemoteCANrange: return "RemoteCANrange";
1895 case ForwardLimitSourceValue::RemoteCANdiS1: return "RemoteCANdiS1";
1896 case ForwardLimitSourceValue::RemoteCANdiS2: return "RemoteCANdiS2";
1897 case ForwardLimitSourceValue::Disabled: return "Disabled";
1898 default: return "Invalid Value";
1899 }
1900 }
1901
1902 CTREXPORT friend std::ostream &operator<<(std::ostream &os, ForwardLimitSourceValue data);
1903};
1904
1905/**
1906 * \brief Determines if the reverse limit switch is normally-open (default) or
1907 * normally-closed.
1908 */
1910 /** \brief Unique integer value of this ReverseLimitTypeValue. */
1912
1913 static constexpr int NormallyOpen = 0;
1914 static constexpr int NormallyClosed = 1;
1915
1917 value{value}
1918 {}
1919
1921 value{-1}
1922 {}
1923
1924 constexpr bool operator==(ReverseLimitTypeValue other) const
1925 {
1926 return value == other.value;
1927 }
1928 constexpr auto operator<=>(ReverseLimitTypeValue other) const
1929 {
1930 return value <=> other.value;
1931 }
1932
1933 /**
1934 * \brief Gets the string representation of this enum
1935 *
1936 * \returns String representation of this enum
1937 */
1938 constexpr std::string_view ToString() const
1939 {
1940 switch (value) {
1941 case ReverseLimitTypeValue::NormallyOpen: return "NormallyOpen";
1942 case ReverseLimitTypeValue::NormallyClosed: return "NormallyClosed";
1943 default: return "Invalid Value";
1944 }
1945 }
1946
1947 CTREXPORT friend std::ostream &operator<<(std::ostream &os, ReverseLimitTypeValue data);
1948};
1949
1950/**
1951 * \brief Determines where to poll the reverse limit switch. This defaults to
1952 * the reverse limit switch pin on the limit switch connector.
1953 *
1954 * Choose RemoteTalonFX to use the reverse limit switch attached to
1955 * another Talon FX on the same CAN bus (this also requires setting
1956 * ReverseLimitRemoteSensorID).
1957 *
1958 * Choose RemoteCANifier to use the reverse limit switch attached to
1959 * another CANifier on the same CAN bus (this also requires setting
1960 * ReverseLimitRemoteSensorID).
1961 *
1962 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
1963 * (this also requires setting ReverseLimitRemoteSensorID). The reverse
1964 * limit will assert when the CANcoder magnet strength changes from BAD
1965 * (red) to ADEQUATE (orange) or GOOD (green).
1966 */
1968 /** \brief Unique integer value of this ReverseLimitSourceValue. */
1970
1971 /**
1972 * \brief Use the reverse limit switch pin on the limit switch connector.
1973 */
1974 static constexpr int LimitSwitchPin = 0;
1975 /**
1976 * \brief Use the reverse limit switch attached to another Talon FX on the same
1977 * CAN bus (this also requires setting ReverseLimitRemoteSensorID).
1978 */
1979 static constexpr int RemoteTalonFX = 1;
1980 /**
1981 * \brief Use the reverse limit switch attached to another CANifier on the same
1982 * CAN bus (this also requires setting ReverseLimitRemoteSensorID).
1983 */
1984 static constexpr int RemoteCANifier = 2;
1985 /**
1986 * \brief Use another CANcoder on the same CAN bus (this also requires setting
1987 * ReverseLimitRemoteSensorID). The reverse limit will assert when the
1988 * CANcoder magnet strength changes from BAD (red) to ADEQUATE (orange)
1989 * or GOOD (green).
1990 */
1991 static constexpr int RemoteCANcoder = 4;
1992 /**
1993 * \brief Use another CANrange on the same CAN bus (this also requires setting
1994 * ReverseLimitRemoteSensorID). The reverse limit will assert when the
1995 * CANrange proximity detect is tripped.
1996 */
1997 static constexpr int RemoteCANrange = 6;
1998 /**
1999 * \brief Use another CTR Electronics' CANdi™ on the same CAN bus (this also
2000 * requires setting ForwardLimitRemoteSensorID). The forward limit will
2001 * assert when the CTR Electronics' CANdi™ Signal 1 Input (S1IN) pin
2002 * matches the configured closed state.
2003 */
2004 static constexpr int RemoteCANdiS1 = 7;
2005 /**
2006 * \brief Use another CTR Electronics' CANdi™ on the same CAN bus (this also
2007 * requires setting ForwardLimitRemoteSensorID). The forward limit will
2008 * assert when CANdi™ Signal 2 Input (S2IN) pin matches the configured
2009 * closed state.
2010 */
2011 static constexpr int RemoteCANdiS2 = 8;
2012 /**
2013 * \brief Disable the reverse limit switch.
2014 */
2015 static constexpr int Disabled = 3;
2016
2018 value{value}
2019 {}
2020
2022 value{-1}
2023 {}
2024
2025 constexpr bool operator==(ReverseLimitSourceValue other) const
2026 {
2027 return value == other.value;
2028 }
2029 constexpr auto operator<=>(ReverseLimitSourceValue other) const
2030 {
2031 return value <=> other.value;
2032 }
2033
2034 /**
2035 * \brief Gets the string representation of this enum
2036 *
2037 * \returns String representation of this enum
2038 */
2039 constexpr std::string_view ToString() const
2040 {
2041 switch (value) {
2042 case ReverseLimitSourceValue::LimitSwitchPin: return "LimitSwitchPin";
2043 case ReverseLimitSourceValue::RemoteTalonFX: return "RemoteTalonFX";
2044 case ReverseLimitSourceValue::RemoteCANifier: return "RemoteCANifier";
2045 case ReverseLimitSourceValue::RemoteCANcoder: return "RemoteCANcoder";
2046 case ReverseLimitSourceValue::RemoteCANrange: return "RemoteCANrange";
2047 case ReverseLimitSourceValue::RemoteCANdiS1: return "RemoteCANdiS1";
2048 case ReverseLimitSourceValue::RemoteCANdiS2: return "RemoteCANdiS2";
2049 case ReverseLimitSourceValue::Disabled: return "Disabled";
2050 default: return "Invalid Value";
2051 }
2052 }
2053
2054 CTREXPORT friend std::ostream &operator<<(std::ostream &os, ReverseLimitSourceValue data);
2055};
2056
2057/**
2058 * \brief Magnet health as measured by CANcoder.
2059 *
2060 * Red indicates too close or too far, Orange is adequate but with
2061 * reduced accuracy, green is ideal. Invalid means the accuracy cannot be
2062 * determined.
2063 */
2065 /** \brief Unique integer value of this MagnetHealthValue. */
2067
2068 /**
2069 * \brief The magnet is too close or too far from the CANcoder.
2070 */
2071 static constexpr int Magnet_Red = 1;
2072 /**
2073 * \brief Magnet health is adequate but with reduced accuracy.
2074 */
2075 static constexpr int Magnet_Orange = 2;
2076 /**
2077 * \brief Magnet health is ideal.
2078 */
2079 static constexpr int Magnet_Green = 3;
2080 /**
2081 * \brief The accuracy cannot be determined.
2082 */
2083 static constexpr int Magnet_Invalid = 0;
2084
2085 constexpr MagnetHealthValue(int value) :
2086 value{value}
2087 {}
2088
2089 constexpr MagnetHealthValue() :
2090 value{-1}
2091 {}
2092
2093 constexpr bool operator==(MagnetHealthValue other) const
2094 {
2095 return value == other.value;
2096 }
2097 constexpr auto operator<=>(MagnetHealthValue other) const
2098 {
2099 return value <=> other.value;
2100 }
2101
2102 /**
2103 * \brief Gets the string representation of this enum
2104 *
2105 * \returns String representation of this enum
2106 */
2107 constexpr std::string_view ToString() const
2108 {
2109 switch (value) {
2110 case MagnetHealthValue::Magnet_Red: return "Magnet_Red";
2111 case MagnetHealthValue::Magnet_Orange: return "Magnet_Orange";
2112 case MagnetHealthValue::Magnet_Green: return "Magnet_Green";
2113 case MagnetHealthValue::Magnet_Invalid: return "Magnet_Invalid";
2114 default: return "Invalid Value";
2115 }
2116 }
2117
2118 CTREXPORT friend std::ostream &operator<<(std::ostream &os, MagnetHealthValue data);
2119};
2120
2121/**
2122 * \brief The applied output of the bridge.
2123 */
2125 /** \brief Unique integer value of this BridgeOutputValue. */
2127
2128 /**
2129 * \brief Coasting.
2130 */
2131 static constexpr int BridgeReq_Coast = 0;
2132 /**
2133 * \brief Braking.
2134 */
2135 static constexpr int BridgeReq_Brake = 1;
2136 /**
2137 * \brief Driving with non-FOC duty cycle/voltage control.
2138 */
2139 static constexpr int BridgeReq_Trapez = 6;
2140 /**
2141 * \brief Driving with FOC torque control.
2142 */
2143 static constexpr int BridgeReq_FOCTorque = 7;
2144 /**
2145 * \brief Playing music.
2146 */
2147 static constexpr int BridgeReq_MusicTone = 8;
2148 /**
2149 * \brief Driving with FOC duty cycle/voltage control.
2150 */
2151 static constexpr int BridgeReq_FOCEasy = 9;
2152 /**
2153 * \brief Fault braking.
2154 */
2155 static constexpr int BridgeReq_FaultBrake = 12;
2156 /**
2157 * \brief Fault coasting.
2158 */
2159 static constexpr int BridgeReq_FaultCoast = 13;
2160 /**
2161 * \brief Active braking.
2162 */
2163 static constexpr int BridgeReq_ActiveBrake = 14;
2164 /**
2165 * \brief Variable braking.
2166 */
2167 static constexpr int BridgeReq_VariableBrake = 15;
2168
2169 constexpr BridgeOutputValue(int value) :
2170 value{value}
2171 {}
2172
2173 constexpr BridgeOutputValue() :
2174 value{-1}
2175 {}
2176
2177 constexpr bool operator==(BridgeOutputValue other) const
2178 {
2179 return value == other.value;
2180 }
2181 constexpr auto operator<=>(BridgeOutputValue other) const
2182 {
2183 return value <=> other.value;
2184 }
2185
2186 /**
2187 * \brief Gets the string representation of this enum
2188 *
2189 * \returns String representation of this enum
2190 */
2191 constexpr std::string_view ToString() const
2192 {
2193 switch (value) {
2194 case BridgeOutputValue::BridgeReq_Coast: return "BridgeReq_Coast";
2195 case BridgeOutputValue::BridgeReq_Brake: return "BridgeReq_Brake";
2196 case BridgeOutputValue::BridgeReq_Trapez: return "BridgeReq_Trapez";
2197 case BridgeOutputValue::BridgeReq_FOCTorque: return "BridgeReq_FOCTorque";
2198 case BridgeOutputValue::BridgeReq_MusicTone: return "BridgeReq_MusicTone";
2199 case BridgeOutputValue::BridgeReq_FOCEasy: return "BridgeReq_FOCEasy";
2200 case BridgeOutputValue::BridgeReq_FaultBrake: return "BridgeReq_FaultBrake";
2201 case BridgeOutputValue::BridgeReq_FaultCoast: return "BridgeReq_FaultCoast";
2202 case BridgeOutputValue::BridgeReq_ActiveBrake: return "BridgeReq_ActiveBrake";
2203 case BridgeOutputValue::BridgeReq_VariableBrake: return "BridgeReq_VariableBrake";
2204 default: return "Invalid Value";
2205 }
2206 }
2207
2208 CTREXPORT friend std::ostream &operator<<(std::ostream &os, BridgeOutputValue data);
2209};
2210
2211/**
2212 * \brief Choose what sensor source is used for differential control of a
2213 * mechanism. The default is Disabled. All other options require
2214 * setting the DifferentialTalonFXSensorID, as the average of this Talon
2215 * FX's sensor and the remote TalonFX's sensor is used for the
2216 * differential controller's primary targets.
2217 *
2218 * Choose RemoteTalonFX_HalfDiff to use another TalonFX on the same CAN
2219 * bus. Talon FX will update its differential position and velocity
2220 * whenever the remote TalonFX publishes its information on CAN bus. The
2221 * differential controller will use half of the difference between this
2222 * TalonFX's sensor and the remote Talon FX's sensor for the differential
2223 * component of the output.
2224 *
2225 * Choose RemotePigeon2Yaw, RemotePigeon2Pitch, and RemotePigeon2Roll to
2226 * use another Pigeon2 on the same CAN bus (this also requires setting
2227 * DifferentialRemoteSensorID). Talon FX will update its differential
2228 * position to match the selected value whenever Pigeon2 publishes its
2229 * information on CAN bus. Note that the Talon FX differential position
2230 * will be in rotations and not degrees.
2231 *
2232 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
2233 * (this also requires setting DifferentialRemoteSensorID). Talon FX
2234 * will update its differential position and velocity to match the
2235 * CANcoder whenever CANcoder publishes its information on CAN bus.
2236 */
2238 /** \brief Unique integer value of this DifferentialSensorSourceValue. */
2240
2241 /**
2242 * \brief Disable differential control.
2243 */
2244 static constexpr int Disabled = 0;
2245 /**
2246 * \brief Use another TalonFX on the same CAN bus. Talon FX will update its
2247 * differential position and velocity whenever the remote TalonFX
2248 * publishes its information on CAN bus. The differential controller
2249 * will use half of the difference between this TalonFX's sensor and the
2250 * remote Talon FX's sensor for the differential component of the output.
2251 */
2252 static constexpr int RemoteTalonFX_HalfDiff = 1;
2253 /**
2254 * \brief Use another Pigeon2 on the same CAN bus (this also requires setting
2255 * DifferentialRemoteSensorID). Talon FX will update its differential
2256 * position to match the Pigeon2 yaw whenever Pigeon2 publishes its
2257 * information on CAN bus. Note that the Talon FX differential position
2258 * will be in rotations and not degrees.
2259 */
2260 static constexpr int RemotePigeon2Yaw = 2;
2261 /**
2262 * \brief Use another Pigeon2 on the same CAN bus (this also requires setting
2263 * DifferentialRemoteSensorID). Talon FX will update its differential
2264 * position to match the Pigeon2 pitch whenever Pigeon2 publishes its
2265 * information on CAN bus. Note that the Talon FX differential position
2266 * will be in rotations and not degrees.
2267 */
2268 static constexpr int RemotePigeon2Pitch = 3;
2269 /**
2270 * \brief Use another Pigeon2 on the same CAN bus (this also requires setting
2271 * DifferentialRemoteSensorID). Talon FX will update its differential
2272 * position to match the Pigeon2 roll whenever Pigeon2 publishes its
2273 * information on CAN bus. Note that the Talon FX differential position
2274 * will be in rotations and not degrees.
2275 */
2276 static constexpr int RemotePigeon2Roll = 4;
2277 /**
2278 * \brief Use another CANcoder on the same CAN bus (this also requires setting
2279 * DifferentialRemoteSensorID). Talon FX will update its differential
2280 * position and velocity to match the CANcoder whenever CANcoder
2281 * publishes its information on CAN bus.
2282 */
2283 static constexpr int RemoteCANcoder = 5;
2284 /**
2285 * \brief Use a pulse-width encoder remotely attached to the Sensor Input 1
2286 * (S1IN) on the CTR Electronics' CANdi™ (this also requires setting the
2287 * DifferentialRemoteSensorID). Talon FX will update its differential
2288 * position and velocity to match the CTR Electronics' CANdi™ whenever
2289 * the CTR Electronics' CANdi™ publishes its information on CAN bus.
2290 */
2291 static constexpr int RemoteCANdiPWM1 = 6;
2292 /**
2293 * \brief Use a pulse-width encoder remotely attached to the Sensor Input 2
2294 * (S2IN) on the CTR Electronics' CANdi™ (this also requires setting the
2295 * DifferentialRemoteSensorID). Talon FX will update its differential
2296 * position and velocity to match the CTR Electronics' CANdi™ whenever
2297 * the CTR Electronics' CANdi™ publishes its information on CAN bus.
2298 */
2299 static constexpr int RemoteCANdiPWM2 = 7;
2300 /**
2301 * \brief Use a quadrature encoder remotely attached to the two Sensor Inputs on
2302 * the CTR Electronics' CANdi™ (this also requires setting the
2303 * DifferentialRemoteSensorID). Talon FX will update its differential
2304 * position and velocity to match the CTR Electronics' CANdi™ whenever
2305 * the CTR Electronics' CANdi™ publishes its information on CAN bus.
2306 */
2307 static constexpr int RemoteCANdiQuadrature = 8;
2308
2310 value{value}
2311 {}
2312
2314 value{-1}
2315 {}
2316
2317 constexpr bool operator==(DifferentialSensorSourceValue other) const
2318 {
2319 return value == other.value;
2320 }
2321 constexpr auto operator<=>(DifferentialSensorSourceValue other) const
2322 {
2323 return value <=> other.value;
2324 }
2325
2326 /**
2327 * \brief Gets the string representation of this enum
2328 *
2329 * \returns String representation of this enum
2330 */
2331 constexpr std::string_view ToString() const
2332 {
2333 switch (value) {
2334 case DifferentialSensorSourceValue::Disabled: return "Disabled";
2335 case DifferentialSensorSourceValue::RemoteTalonFX_HalfDiff: return "RemoteTalonFX_HalfDiff";
2336 case DifferentialSensorSourceValue::RemotePigeon2Yaw: return "RemotePigeon2Yaw";
2337 case DifferentialSensorSourceValue::RemotePigeon2Pitch: return "RemotePigeon2Pitch";
2338 case DifferentialSensorSourceValue::RemotePigeon2Roll: return "RemotePigeon2Roll";
2339 case DifferentialSensorSourceValue::RemoteCANcoder: return "RemoteCANcoder";
2340 case DifferentialSensorSourceValue::RemoteCANdiPWM1: return "RemoteCANdiPWM1";
2341 case DifferentialSensorSourceValue::RemoteCANdiPWM2: return "RemoteCANdiPWM2";
2342 case DifferentialSensorSourceValue::RemoteCANdiQuadrature: return "RemoteCANdiQuadrature";
2343 default: return "Invalid Value";
2344 }
2345 }
2346
2347 CTREXPORT friend std::ostream &operator<<(std::ostream &os, DifferentialSensorSourceValue data);
2348};
2349
2350/**
2351 * \brief Static feedforward sign during position closed loop.
2352 *
2353 * This determines the sign of the applied kS during position closed-loop
2354 * modes. The default behavior uses the velocity reference sign. This
2355 * works well with velocity closed loop, Motion Magic® controls, and
2356 * position closed loop when velocity reference is specified (motion
2357 * profiling).
2358 *
2359 * However, when using position closed loop with zero velocity reference
2360 * (no motion profiling), the application may want to apply static
2361 * feedforward based on the sign of closed loop error instead. When doing
2362 * so, we recommend using the minimal amount of kS, otherwise the motor
2363 * output may dither when closed loop error is near zero.
2364 */
2366 /** \brief Unique integer value of this StaticFeedforwardSignValue. */
2368
2369 /**
2370 * \brief Use the velocity reference sign. This works well with velocity closed
2371 * loop, Motion Magic® controls, and position closed loop when velocity
2372 * reference is specified (motion profiling).
2373 */
2374 static constexpr int UseVelocitySign = 0;
2375 /**
2376 * \brief Use the sign of closed loop error. This is useful when using position
2377 * closed loop with zero velocity reference (no motion profiling). We
2378 * recommend the minimal amount of kS, otherwise the motor output may
2379 * dither when closed loop error is near zero.
2380 */
2381 static constexpr int UseClosedLoopSign = 1;
2382
2384 value{value}
2385 {}
2386
2388 value{-1}
2389 {}
2390
2391 constexpr bool operator==(StaticFeedforwardSignValue other) const
2392 {
2393 return value == other.value;
2394 }
2395 constexpr auto operator<=>(StaticFeedforwardSignValue other) const
2396 {
2397 return value <=> other.value;
2398 }
2399
2400 /**
2401 * \brief Gets the string representation of this enum
2402 *
2403 * \returns String representation of this enum
2404 */
2405 constexpr std::string_view ToString() const
2406 {
2407 switch (value) {
2408 case StaticFeedforwardSignValue::UseVelocitySign: return "UseVelocitySign";
2409 case StaticFeedforwardSignValue::UseClosedLoopSign: return "UseClosedLoopSign";
2410 default: return "Invalid Value";
2411 }
2412 }
2413
2414 CTREXPORT friend std::ostream &operator<<(std::ostream &os, StaticFeedforwardSignValue data);
2415};
2416
2417/**
2418 * \brief The type of motor attached to the Talon.
2419 *
2420 * \details This can be used to determine what motor is attached to the Talon
2421 * FX. Return will be "Unknown" if firmware is too old or device is
2422 * not present.
2423 */
2425 /** \brief Unique integer value of this ConnectedMotorValue. */
2427
2428 /**
2429 * \brief Talon could not determine the type of motor attached.
2430 */
2431 static constexpr int Unknown = 0;
2432 /**
2433 * \brief Talon is attached to an integrated Falcon motor.
2434 */
2435 static constexpr int Falcon500_Integrated = 1;
2436 /**
2437 * \brief Talon is attached to an integrated Kraken X60 motor.
2438 */
2439 static constexpr int KrakenX60_Integrated = 2;
2440 /**
2441 * \brief Talon is attached to an integrated Kraken X44 motor.
2442 */
2443 static constexpr int KrakenX44_Integrated = 3;
2444 /**
2445 * \brief Talon is connected to a CTR Electronics Minion® brushless three phase
2446 * motor.
2447 */
2448 static constexpr int Minion_JST = 4;
2449 /**
2450 * \brief Talon is connected to a third party brushed DC motor with leads A and
2451 * B.
2452 */
2453 static constexpr int Brushed_AB = 5;
2454 /**
2455 * \brief Talon is connected to a third party brushed DC motor with leads A and
2456 * C.
2457 */
2458 static constexpr int Brushed_AC = 6;
2459 /**
2460 * \brief Talon is connected to a third party brushed DC motor with leads B and
2461 * C.
2462 */
2463 static constexpr int Brushed_BC = 7;
2464 /**
2465 * \brief Talon is connected to a third party NEO brushless three phase motor.
2466 */
2467 static constexpr int NEO_JST = 8;
2468 /**
2469 * \brief Talon is connected to a third party NEO550 brushless three phase
2470 * motor.
2471 */
2472 static constexpr int NEO550_JST = 9;
2473 /**
2474 * \brief Talon is connected to a third party VORTEX brushless three phase
2475 * motor.
2476 */
2477 static constexpr int VORTEX_JST = 10;
2478 /**
2479 * \brief Talon is connected to a custom brushless three phase motor. This
2480 * requires that the device is not FRC-Locked.
2481 */
2482 static constexpr int CustomBrushless = 11;
2483
2485 value{value}
2486 {}
2487
2489 value{-1}
2490 {}
2491
2492 constexpr bool operator==(ConnectedMotorValue other) const
2493 {
2494 return value == other.value;
2495 }
2496 constexpr auto operator<=>(ConnectedMotorValue other) const
2497 {
2498 return value <=> other.value;
2499 }
2500
2501 /**
2502 * \brief Gets the string representation of this enum
2503 *
2504 * \returns String representation of this enum
2505 */
2506 constexpr std::string_view ToString() const
2507 {
2508 switch (value) {
2509 case ConnectedMotorValue::Unknown: return "Unknown";
2510 case ConnectedMotorValue::Falcon500_Integrated: return "Falcon500_Integrated";
2511 case ConnectedMotorValue::KrakenX60_Integrated: return "KrakenX60_Integrated";
2512 case ConnectedMotorValue::KrakenX44_Integrated: return "KrakenX44_Integrated";
2513 case ConnectedMotorValue::Minion_JST: return "Minion_JST";
2514 case ConnectedMotorValue::Brushed_AB: return "Brushed_AB";
2515 case ConnectedMotorValue::Brushed_AC: return "Brushed_AC";
2516 case ConnectedMotorValue::Brushed_BC: return "Brushed_BC";
2517 case ConnectedMotorValue::NEO_JST: return "NEO_JST";
2518 case ConnectedMotorValue::NEO550_JST: return "NEO550_JST";
2519 case ConnectedMotorValue::VORTEX_JST: return "VORTEX_JST";
2520 case ConnectedMotorValue::CustomBrushless: return "Custom Brushless";
2521 default: return "Invalid Value";
2522 }
2523 }
2524
2525 CTREXPORT friend std::ostream &operator<<(std::ostream &os, ConnectedMotorValue data);
2526};
2527
2528/**
2529 * \brief Health of the distance measurement.
2530 */
2532 /** \brief Unique integer value of this MeasurementHealthValue. */
2534
2535 /**
2536 * \brief Measurement is good.
2537 */
2538 static constexpr int Good = 0;
2539 /**
2540 * \brief Measurement is likely okay, but the target is either very far away or
2541 * moving very quickly.
2542 */
2543 static constexpr int Limited = 1;
2544 /**
2545 * \brief Measurement is compromised.
2546 */
2547 static constexpr int Bad = 2;
2548
2550 value{value}
2551 {}
2552
2554 value{-1}
2555 {}
2556
2557 constexpr bool operator==(MeasurementHealthValue other) const
2558 {
2559 return value == other.value;
2560 }
2561 constexpr auto operator<=>(MeasurementHealthValue other) const
2562 {
2563 return value <=> other.value;
2564 }
2565
2566 /**
2567 * \brief Gets the string representation of this enum
2568 *
2569 * \returns String representation of this enum
2570 */
2571 constexpr std::string_view ToString() const
2572 {
2573 switch (value) {
2574 case MeasurementHealthValue::Good: return "Good";
2575 case MeasurementHealthValue::Limited: return "Limited";
2576 case MeasurementHealthValue::Bad: return "Bad";
2577 default: return "Invalid Value";
2578 }
2579 }
2580
2581 CTREXPORT friend std::ostream &operator<<(std::ostream &os, MeasurementHealthValue data);
2582};
2583
2584/**
2585 * \brief Update mode of the CANrange. The CANrange supports short-range and
2586 * long-range detection at various update frequencies.
2587 */
2589 /** \brief Unique integer value of this UpdateModeValue. */
2591
2592 /**
2593 * \brief Updates distance/proximity at 100hz using short-range detection mode.
2594 */
2595 static constexpr int ShortRange100Hz = 0;
2596 /**
2597 * \brief Uses short-range detection mode for improved detection under high
2598 * ambient infrared light conditions. Uses user-specified update
2599 * frequency.
2600 */
2601 static constexpr int ShortRangeUserFreq = 1;
2602 /**
2603 * \brief Uses long-range detection mode and user-specified update frequency.
2604 */
2605 static constexpr int LongRangeUserFreq = 2;
2606
2607 constexpr UpdateModeValue(int value) :
2608 value{value}
2609 {}
2610
2611 constexpr UpdateModeValue() :
2612 value{-1}
2613 {}
2614
2615 constexpr bool operator==(UpdateModeValue other) const
2616 {
2617 return value == other.value;
2618 }
2619 constexpr auto operator<=>(UpdateModeValue other) const
2620 {
2621 return value <=> other.value;
2622 }
2623
2624 /**
2625 * \brief Gets the string representation of this enum
2626 *
2627 * \returns String representation of this enum
2628 */
2629 constexpr std::string_view ToString() const
2630 {
2631 switch (value) {
2632 case UpdateModeValue::ShortRange100Hz: return "ShortRange100Hz";
2633 case UpdateModeValue::ShortRangeUserFreq: return "ShortRangeUserFreq";
2634 case UpdateModeValue::LongRangeUserFreq: return "LongRangeUserFreq";
2635 default: return "Invalid Value";
2636 }
2637 }
2638
2639 CTREXPORT friend std::ostream &operator<<(std::ostream &os, UpdateModeValue data);
2640};
2641
2642/**
2643 * \brief Requires Phoenix Pro; Improves commutation and velocity measurement
2644 * for motors with hall sensors. Talon can use advanced features to
2645 * improve commutation and velocity measurement when using a motor with
2646 * hall sensors. This can improve peak efficiency by as high as 2% and
2647 * reduce noise in the measured velocity.
2648 */
2650 /** \brief Unique integer value of this AdvancedHallSupportValue. */
2652
2653 /**
2654 * \brief Talon will utilize hall sensors without advanced features.
2655 */
2656 static constexpr int Disabled = 0;
2657 /**
2658 * \brief Requires Phoenix Pro; Talon uses advanced features to improve
2659 * commutation and velocity measurement when using hall sensors. This
2660 * can improve peak efficiency by as high as 2% and reduce noise in the
2661 * measured velocity.
2662 */
2663 static constexpr int Enabled = 1;
2664
2666 value{value}
2667 {}
2668
2670 value{-1}
2671 {}
2672
2673 constexpr bool operator==(AdvancedHallSupportValue other) const
2674 {
2675 return value == other.value;
2676 }
2677 constexpr auto operator<=>(AdvancedHallSupportValue other) const
2678 {
2679 return value <=> other.value;
2680 }
2681
2682 /**
2683 * \brief Gets the string representation of this enum
2684 *
2685 * \returns String representation of this enum
2686 */
2687 constexpr std::string_view ToString() const
2688 {
2689 switch (value) {
2690 case AdvancedHallSupportValue::Disabled: return "Disabled";
2691 case AdvancedHallSupportValue::Enabled: return "Enabled";
2692 default: return "Invalid Value";
2693 }
2694 }
2695
2696 CTREXPORT friend std::ostream &operator<<(std::ostream &os, AdvancedHallSupportValue data);
2697};
2698
2699/**
2700 * \brief Selects the motor and motor connections used with Talon.
2701 *
2702 * This setting determines what kind of motor and sensors are used with
2703 * the Talon. This also determines what signals are used on the JST and
2704 * Gadgeteer port.
2705 *
2706 * Motor drive will not function correctly if this setting does not match
2707 * the physical setup.
2708 */
2710 /** \brief Unique integer value of this MotorArrangementValue. */
2712
2713 /**
2714 * \brief Motor is not selected. This is the default setting to ensure the user
2715 * has an opportunity to select the correct motor arrangement before
2716 * attempting to drive motor.
2717 */
2718 static constexpr int Disabled = 0;
2719 /**
2720 * \brief CTR Electronics Minion® brushless three phase motor.
2721 * Motor leads: red(terminal A), black (terminal B), and white (terminal
2722 * C).
2723 * JST Connector: hall [A, B, C] is on pins [4, 3, 2] and temperature is
2724 * on pin [5]. Motor JST cable can be plugged directly into the JST
2725 * connector.
2726 * Gadgeteer Connector: quadrature [A, B] are on pins [7, 5], limit
2727 * [forward, reverse] are on pins [4, 8], and pulse width position is on
2728 * pin [9].
2729 */
2730 static constexpr int Minion_JST = 1;
2731 /**
2732 * \brief Third party brushed DC motor with two leads.
2733 * Use the Brushed Motor Wiring config to determine which leads to use on
2734 * the Talon (motor leads may be flipped to correct for clockwise vs
2735 * counterclockwise).
2736 * Note that the invert configuration can still be used to invert rotor
2737 * orientation.
2738 * Gadgeteer Connector: quadrature [A, B] are on pins [7, 5], limit
2739 * [forward, reverse] are on pins [4, 8], and pulse width position is on
2740 * pin [9].
2741 */
2742 static constexpr int Brushed_DC = 2;
2743 /**
2744 * \brief Third party NEO brushless three phase motor (~6000 RPM at 12V).
2745 * Motor leads: red(terminal A), black (terminal B), and white (terminal
2746 * C).
2747 * JST Connector: hall [A, B, C] is on pins [4, 3, 2] and temperature is
2748 * on pin [5]. Motor JST cable can be plugged directly into the JST
2749 * connector.
2750 * Gadgeteer Connector: quadrature [A, B] are on pins [7, 5], limit
2751 * [forward, reverse] are on pins [4, 8], and pulse width position is on
2752 * pin [9].
2753 */
2754 static constexpr int NEO_JST = 5;
2755 /**
2756 * \brief Third party NEO550 brushless three phase motor (~11000 RPM at 12V).
2757 * Motor leads: red(terminal A), black (terminal B), and white (terminal
2758 * C).
2759 * JST Connector: hall [A, B, C] is on pins [4, 3, 2] and temperature is
2760 * on pin [5]. Motor JST cable can be plugged directly into the JST
2761 * connector.
2762 * Gadgeteer Connector: quadrature [A, B] are on pins [7, 5], limit
2763 * [forward, reverse] are on pins [4, 8], and pulse width position is on
2764 * pin [9].
2765 */
2766 static constexpr int NEO550_JST = 6;
2767 /**
2768 * \brief Third party VORTEX brushless three phase motor.
2769 * Motor leads: red(terminal A), black (terminal B), and white (terminal
2770 * C).
2771 * JST Connector: hall [A, B, C] is on pins [4, 3, 2] and temperature is
2772 * on pin [5]. Motor JST cable can be plugged directly into the JST
2773 * connector.
2774 * Gadgeteer Connector: quadrature [A, B] are on pins [7, 5], limit
2775 * [forward, reverse] are on pins [4, 8], and pulse width position is on
2776 * pin [9].
2777 */
2778 static constexpr int VORTEX_JST = 7;
2779 /**
2780 * \brief Third party custom brushless three phase motor.
2781 * This setting allows use of TalonFXS with motors that are not
2782 * explicitly supported above. Note that this requires user to set the
2783 * Custom Motor configuration parameters.
2784 * This setting will only work outside of the FRC use case. If selected
2785 * during FRC use, motor output will be neutral.
2786 * Motor leads: red(terminal A), black (terminal B), and white (terminal
2787 * C).
2788 * JST Connector: hall [A, B, C] is on pins [4, 3, 2] and temperature is
2789 * on pin [5]. Motor JST cable can be plugged directly into the JST
2790 * connector.
2791 * Gadgeteer Connector: quadrature [A, B] are on pins [7, 5], limit
2792 * [forward, reverse] are on pins [4, 8], and pulse width position is on
2793 * pin [9].
2794 */
2795 static constexpr int CustomBrushless = 8;
2796
2798 value{value}
2799 {}
2800
2802 value{-1}
2803 {}
2804
2805 constexpr bool operator==(MotorArrangementValue other) const
2806 {
2807 return value == other.value;
2808 }
2809 constexpr auto operator<=>(MotorArrangementValue other) const
2810 {
2811 return value <=> other.value;
2812 }
2813
2814 /**
2815 * \brief Gets the string representation of this enum
2816 *
2817 * \returns String representation of this enum
2818 */
2819 constexpr std::string_view ToString() const
2820 {
2821 switch (value) {
2822 case MotorArrangementValue::Disabled: return "Disabled";
2823 case MotorArrangementValue::Minion_JST: return "Minion_JST";
2824 case MotorArrangementValue::Brushed_DC: return "Brushed_DC";
2825 case MotorArrangementValue::NEO_JST: return "NEO_JST";
2826 case MotorArrangementValue::NEO550_JST: return "NEO550_JST";
2827 case MotorArrangementValue::VORTEX_JST: return "VORTEX_JST";
2828 case MotorArrangementValue::CustomBrushless: return "Custom Brushless";
2829 default: return "Invalid Value";
2830 }
2831 }
2832
2833 CTREXPORT friend std::ostream &operator<<(std::ostream &os, MotorArrangementValue data);
2834};
2835
2836/**
2837 * \brief State of the Signal 1 input (S1IN).
2838 */
2840 /** \brief Unique integer value of this S1StateValue. */
2842
2843 /**
2844 * \brief Input is not driven high or low, it is disconnected from load.
2845 */
2846 static constexpr int Floating = 0;
2847 /**
2848 * \brief Input is driven low (below 0.5V).
2849 */
2850 static constexpr int Low = 1;
2851 /**
2852 * \brief Input is driven high (above 3V).
2853 */
2854 static constexpr int High = 2;
2855
2856 constexpr S1StateValue(int value) :
2857 value{value}
2858 {}
2859
2860 constexpr S1StateValue() :
2861 value{-1}
2862 {}
2863
2864 constexpr bool operator==(S1StateValue other) const
2865 {
2866 return value == other.value;
2867 }
2868 constexpr auto operator<=>(S1StateValue other) const
2869 {
2870 return value <=> other.value;
2871 }
2872
2873 /**
2874 * \brief Gets the string representation of this enum
2875 *
2876 * \returns String representation of this enum
2877 */
2878 constexpr std::string_view ToString() const
2879 {
2880 switch (value) {
2881 case S1StateValue::Floating: return "Floating";
2882 case S1StateValue::Low: return "Low";
2883 case S1StateValue::High: return "High";
2884 default: return "Invalid Value";
2885 }
2886 }
2887
2888 CTREXPORT friend std::ostream &operator<<(std::ostream &os, S1StateValue data);
2889};
2890
2891/**
2892 * \brief State of the Signal 2 input (S2IN).
2893 */
2895 /** \brief Unique integer value of this S2StateValue. */
2897
2898 /**
2899 * \brief Input is not driven high or low, it is disconnected from load.
2900 */
2901 static constexpr int Floating = 0;
2902 /**
2903 * \brief Input is driven low (below 0.5V).
2904 */
2905 static constexpr int Low = 1;
2906 /**
2907 * \brief Input is driven high (above 3V).
2908 */
2909 static constexpr int High = 2;
2910
2911 constexpr S2StateValue(int value) :
2912 value{value}
2913 {}
2914
2915 constexpr S2StateValue() :
2916 value{-1}
2917 {}
2918
2919 constexpr bool operator==(S2StateValue other) const
2920 {
2921 return value == other.value;
2922 }
2923 constexpr auto operator<=>(S2StateValue other) const
2924 {
2925 return value <=> other.value;
2926 }
2927
2928 /**
2929 * \brief Gets the string representation of this enum
2930 *
2931 * \returns String representation of this enum
2932 */
2933 constexpr std::string_view ToString() const
2934 {
2935 switch (value) {
2936 case S2StateValue::Floating: return "Floating";
2937 case S2StateValue::Low: return "Low";
2938 case S2StateValue::High: return "High";
2939 default: return "Invalid Value";
2940 }
2941 }
2942
2943 CTREXPORT friend std::ostream &operator<<(std::ostream &os, S2StateValue data);
2944};
2945
2946/**
2947 * \brief The floating state of the Signal 1 input (S1IN).
2948 */
2950 /** \brief Unique integer value of this S1FloatStateValue. */
2952
2953 /**
2954 * \brief The input will attempt to detect when it is floating. This is enabled
2955 * by default.
2956 */
2957 static constexpr int FloatDetect = 0;
2958 /**
2959 * \brief The input will be pulled high when not loaded by an outside device.
2960 * This is useful for NPN-style devices.
2961 */
2962 static constexpr int PullHigh = 1;
2963 /**
2964 * \brief The input will be pulled low when not loaded by an outside device.
2965 * This is useful for PNP-style devices.
2966 */
2967 static constexpr int PullLow = 2;
2968 /**
2969 * \brief The input will pull in the direction of the last measured state. This
2970 * may be useful for devices that can enter into a high-Z tri-state.
2971 */
2972 static constexpr int BusKeeper = 3;
2973
2974 constexpr S1FloatStateValue(int value) :
2975 value{value}
2976 {}
2977
2978 constexpr S1FloatStateValue() :
2979 value{-1}
2980 {}
2981
2982 constexpr bool operator==(S1FloatStateValue other) const
2983 {
2984 return value == other.value;
2985 }
2986 constexpr auto operator<=>(S1FloatStateValue other) const
2987 {
2988 return value <=> other.value;
2989 }
2990
2991 /**
2992 * \brief Gets the string representation of this enum
2993 *
2994 * \returns String representation of this enum
2995 */
2996 constexpr std::string_view ToString() const
2997 {
2998 switch (value) {
2999 case S1FloatStateValue::FloatDetect: return "Float Detect";
3000 case S1FloatStateValue::PullHigh: return "Pull High";
3001 case S1FloatStateValue::PullLow: return "Pull Low";
3002 case S1FloatStateValue::BusKeeper: return "Bus Keeper";
3003 default: return "Invalid Value";
3004 }
3005 }
3006
3007 CTREXPORT friend std::ostream &operator<<(std::ostream &os, S1FloatStateValue data);
3008};
3009
3010/**
3011 * \brief The floating state of the Signal 2 input (S2IN).
3012 */
3014 /** \brief Unique integer value of this S2FloatStateValue. */
3016
3017 /**
3018 * \brief The input will attempt to detect when it is floating. This is enabled
3019 * by default.
3020 */
3021 static constexpr int FloatDetect = 0;
3022 /**
3023 * \brief The input will be pulled high when not loaded by an outside device.
3024 * This is useful for NPN-style devices.
3025 */
3026 static constexpr int PullHigh = 1;
3027 /**
3028 * \brief The input will be pulled low when not loaded by an outside device.
3029 * This is useful for PNP-style devices.
3030 */
3031 static constexpr int PullLow = 2;
3032 /**
3033 * \brief The input will pull in the direction of the last measured state. This
3034 * may be useful for devices that can enter into a high-Z tri-state.
3035 */
3036 static constexpr int BusKeeper = 3;
3037
3038 constexpr S2FloatStateValue(int value) :
3039 value{value}
3040 {}
3041
3042 constexpr S2FloatStateValue() :
3043 value{-1}
3044 {}
3045
3046 constexpr bool operator==(S2FloatStateValue other) const
3047 {
3048 return value == other.value;
3049 }
3050 constexpr auto operator<=>(S2FloatStateValue other) const
3051 {
3052 return value <=> other.value;
3053 }
3054
3055 /**
3056 * \brief Gets the string representation of this enum
3057 *
3058 * \returns String representation of this enum
3059 */
3060 constexpr std::string_view ToString() const
3061 {
3062 switch (value) {
3063 case S2FloatStateValue::FloatDetect: return "Float Detect";
3064 case S2FloatStateValue::PullHigh: return "Pull High";
3065 case S2FloatStateValue::PullLow: return "Pull Low";
3066 case S2FloatStateValue::BusKeeper: return "Bus Keeper";
3067 default: return "Invalid Value";
3068 }
3069 }
3070
3071 CTREXPORT friend std::ostream &operator<<(std::ostream &os, S2FloatStateValue data);
3072};
3073
3074/**
3075 * \brief Choose what sensor source is reported via API and used by closed-loop
3076 * and limit features. The default is Commutation, which uses the
3077 * external sensor used for motor commutation.
3078 *
3079 * Choose Remote* to use another sensor on the same CAN bus (this also
3080 * requires setting FeedbackRemoteSensorID). Talon will update its
3081 * position and velocity whenever the remote sensor publishes its
3082 * information on CAN bus, and the Talon commutation sensor will not be
3083 * used.
3084 *
3085 * Choose Fused* (requires Phoenix Pro) and Talon will fuse another
3086 * sensor's information with the commutation sensor, which provides the
3087 * best possible position and velocity for accuracy and bandwidth (this
3088 * also requires setting FeedbackRemoteSensorID). This was developed for
3089 * applications such as swerve-azimuth.
3090 *
3091 * Choose Sync* (requires Phoenix Pro) and Talon will synchronize its
3092 * commutation sensor position against another sensor, then continue to
3093 * use the rotor sensor for closed loop control (this also requires
3094 * setting FeedbackRemoteSensorID). The Talon will report if its
3095 * internal position differs significantly from the reported remote
3096 * sensor position. This was developed for mechanisms where there is a
3097 * risk of the sensor failing in such a way that it reports a position
3098 * that does not match the mechanism, such as the sensor mounting
3099 * assembly breaking off.
3100 *
3101 * Choose RemotePigeon2Yaw, RemotePigeon2Pitch, and RemotePigeon2Roll to
3102 * use another Pigeon2 on the same CAN bus (this also requires setting
3103 * FeedbackRemoteSensorID). Talon will update its position to match the
3104 * selected value whenever Pigeon2 publishes its information on CAN bus.
3105 * Note that the Talon position will be in rotations and not degrees.
3106 *
3107 * Choose Quadrature to use a quadrature encoder directly attached to the
3108 * Talon data port. This provides velocity and relative position
3109 * measurements.
3110 *
3111 * Choose PulseWidth to use a pulse-width encoder directly attached to
3112 * the Talon data port. This provides velocity and absolute position
3113 * measurements.
3114 *
3115 * \details Note: When the feedback source is changed to Fused* or Sync*, the
3116 * Talon needs a period of time to fuse before sensor-based
3117 * (soft-limit, closed loop, etc.) features are used. This period of
3118 * time is determined by the update frequency of the remote sensor's
3119 * Position signal.
3120 */
3122 /** \brief Unique integer value of this ExternalFeedbackSensorSourceValue. */
3124
3125 /**
3126 * \brief Use the external sensor used for motor commutation.
3127 */
3128 static constexpr int Commutation = 0;
3129 /**
3130 * \brief Use another CANcoder on the same CAN bus (this also requires setting
3131 * FeedbackRemoteSensorID). Talon will update its position and velocity
3132 * whenever CANcoder publishes its information on CAN bus, and the Talon
3133 * commutation sensor will not be used.
3134 */
3135 static constexpr int RemoteCANcoder = 1;
3136 /**
3137 * \brief Use another Pigeon2 on the same CAN bus (this also requires setting
3138 * FeedbackRemoteSensorID). Talon will update its position to match the
3139 * Pigeon2 yaw whenever Pigeon2 publishes its information on CAN bus.
3140 * Note that the Talon position will be in rotations and not degrees.
3141 */
3142 static constexpr int RemotePigeon2Yaw = 2;
3143 /**
3144 * \brief Use another Pigeon2 on the same CAN bus (this also requires setting
3145 * FeedbackRemoteSensorID). Talon will update its position to match the
3146 * Pigeon2 pitch whenever Pigeon2 publishes its information on CAN bus.
3147 * Note that the Talon position will be in rotations and not degrees.
3148 */
3149 static constexpr int RemotePigeon2Pitch = 3;
3150 /**
3151 * \brief Use another Pigeon2 on the same CAN bus (this also requires setting
3152 * FeedbackRemoteSensorID). Talon will update its position to match the
3153 * Pigeon2 roll whenever Pigeon2 publishes its information on CAN bus.
3154 * Note that the Talon position will be in rotations and not degrees.
3155 */
3156 static constexpr int RemotePigeon2Roll = 4;
3157 /**
3158 * \brief Requires Phoenix Pro; Talon will fuse another CANcoder's information
3159 * with the commutation sensor, which provides the best possible position
3160 * and velocity for accuracy and bandwidth (this also requires setting
3161 * FeedbackRemoteSensorID). FusedCANcoder was developed for applications
3162 * such as swerve-azimuth.
3163 */
3164 static constexpr int FusedCANcoder = 5;
3165 /**
3166 * \brief Requires Phoenix Pro; Talon will synchronize its commutation sensor
3167 * position against another CANcoder, then continue to use the rotor
3168 * sensor for closed loop control (this also requires setting
3169 * FeedbackRemoteSensorID). The Talon will report if its internal
3170 * position differs significantly from the reported CANcoder position.
3171 * SyncCANcoder was developed for mechanisms where there is a risk of the
3172 * CANcoder failing in such a way that it reports a position that does
3173 * not match the mechanism, such as the sensor mounting assembly breaking
3174 * off.
3175 */
3176 static constexpr int SyncCANcoder = 6;
3177 /**
3178 * \brief Use a quadrature encoder directly attached to the Talon data port.
3179 * This provides velocity and relative position measurements.
3180 */
3181 static constexpr int Quadrature = 7;
3182 /**
3183 * \brief Use a pulse-width encoder directly attached to the Talon data port.
3184 * This provides velocity and absolute position measurements.
3185 */
3186 static constexpr int PulseWidth = 8;
3187 /**
3188 * \brief Use a pulse-width encoder remotely attached to the Sensor Input 1
3189 * (S1IN) on CANdi™ (this also requires setting FeedbackRemoteSensorID).
3190 * Talon will update its position and velocity whenever CANdi™ publishes
3191 * its information on CAN bus, and the Talon internal rotor will not be
3192 * used.
3193 */
3194 static constexpr int RemoteCANdiPWM1 = 9;
3195 /**
3196 * \brief Use a pulse-width encoder remotely attached to the Sensor Input 2
3197 * (S2IN) on CANdi™ (this also requires setting FeedbackRemoteSensorID).
3198 * Talon will update its position and velocity whenever CANdi™ publishes
3199 * its information on CAN bus, and the Talon internal rotor will not be
3200 * used.
3201 */
3202 static constexpr int RemoteCANdiPWM2 = 10;
3203 /**
3204 * \brief Use a quadrature encoder remotely attached to the two Sensor Inputs on
3205 * CANdi™ (this also requires setting FeedbackRemoteSensorID). Talon will
3206 * update its position and velocity whenever CANdi™ publishes its
3207 * information on CAN bus, and the Talon internal rotor will not be used.
3208 */
3209 static constexpr int RemoteCANdiQuadrature = 11;
3210 /**
3211 * \brief Requires Phoenix Pro; Talon will fuse a pulse-width encoder remotely
3212 * attached to the Sensor Input 1 (S1IN) on CANdi™, which provides the
3213 * best possible position and velocity for accuracy and bandwidth (this
3214 * also requires setting FeedbackRemoteSensorID). FusedCANdi was
3215 * developed for applications such as swerve-azimuth.
3216 */
3217 static constexpr int FusedCANdiPWM1 = 12;
3218 /**
3219 * \brief Requires Phoenix Pro; Talon will fuse a pulse-width encoder remotely
3220 * attached to the Sensor Input 2 (S2IN) on CANdi™, which provides the
3221 * best possible position and velocity for accuracy and bandwidth (this
3222 * also requires setting FeedbackRemoteSensorID). FusedCANdi was
3223 * developed for applications such as swerve-azimuth.
3224 */
3225 static constexpr int FusedCANdiPWM2 = 13;
3226 /**
3227 * \brief Requires Phoenix Pro; Talon will fuse a qaudrature encoder remotely
3228 * attached to the two Sensor Inputs on CANdi™. This provides velocity
3229 * and relative position measurements. This also requires setting
3230 * FeedbackRemoteSensorID.
3231 */
3232 static constexpr int FusedCANdiQuadrature = 14;
3233 /**
3234 * \brief Requires Phoenix Pro; Talon will synchronize its internal rotor
3235 * position against the pulse-width encoder attached to Sensor Input 1
3236 * (S1IN), then continue to use the rotor sensor for closed loop control
3237 * (this also requires setting FeedbackRemoteSensorID). The Talon will
3238 * report if its internal position differs significantly from the
3239 * reported PWM position. SyncCANdi was developed for mechanisms where
3240 * there is a risk of the CTR Electronics' CANdi™ failing in such a way
3241 * that it reports a position that does not match the mechanism, such as
3242 * the sensor mounting assembly breaking off.
3243 */
3244 static constexpr int SyncCANdiPWM1 = 15;
3245 /**
3246 * \brief Requires Phoenix Pro; Talon will synchronize its internal rotor
3247 * position against the pulse-width encoder attached to Sensor Input 1
3248 * (S1IN), then continue to use the rotor sensor for closed loop control
3249 * (this also requires setting FeedbackRemoteSensorID). The Talon will
3250 * report if its internal position differs significantly from the
3251 * reported PWM position. SyncCANdi was developed for mechanisms where
3252 * there is a risk of the CTR Electronics' CANdi™ failing in such a way
3253 * that it reports a position that does not match the mechanism, such as
3254 * the sensor mounting assembly breaking off.
3255 */
3256 static constexpr int SyncCANdiPWM2 = 16;
3257
3259 value{value}
3260 {}
3261
3263 value{-1}
3264 {}
3265
3267 {
3268 return value == other.value;
3269 }
3271 {
3272 return value <=> other.value;
3273 }
3274
3275 /**
3276 * \brief Gets the string representation of this enum
3277 *
3278 * \returns String representation of this enum
3279 */
3280 constexpr std::string_view ToString() const
3281 {
3282 switch (value) {
3283 case ExternalFeedbackSensorSourceValue::Commutation: return "Commutation";
3284 case ExternalFeedbackSensorSourceValue::RemoteCANcoder: return "RemoteCANcoder";
3285 case ExternalFeedbackSensorSourceValue::RemotePigeon2Yaw: return "RemotePigeon2Yaw";
3286 case ExternalFeedbackSensorSourceValue::RemotePigeon2Pitch: return "RemotePigeon2Pitch";
3287 case ExternalFeedbackSensorSourceValue::RemotePigeon2Roll: return "RemotePigeon2Roll";
3288 case ExternalFeedbackSensorSourceValue::FusedCANcoder: return "FusedCANcoder";
3289 case ExternalFeedbackSensorSourceValue::SyncCANcoder: return "SyncCANcoder";
3290 case ExternalFeedbackSensorSourceValue::Quadrature: return "Quadrature";
3291 case ExternalFeedbackSensorSourceValue::PulseWidth: return "PulseWidth";
3292 case ExternalFeedbackSensorSourceValue::RemoteCANdiPWM1: return "RemoteCANdiPWM1";
3293 case ExternalFeedbackSensorSourceValue::RemoteCANdiPWM2: return "RemoteCANdiPWM2";
3294 case ExternalFeedbackSensorSourceValue::RemoteCANdiQuadrature: return "RemoteCANdiQuadrature";
3295 case ExternalFeedbackSensorSourceValue::FusedCANdiPWM1: return "FusedCANdiPWM1";
3296 case ExternalFeedbackSensorSourceValue::FusedCANdiPWM2: return "FusedCANdiPWM2";
3297 case ExternalFeedbackSensorSourceValue::FusedCANdiQuadrature: return "FusedCANdiQuadrature";
3298 case ExternalFeedbackSensorSourceValue::SyncCANdiPWM1: return "SyncCANdiPWM1";
3299 case ExternalFeedbackSensorSourceValue::SyncCANdiPWM2: return "SyncCANdiPWM2";
3300 default: return "Invalid Value";
3301 }
3302 }
3303
3304 CTREXPORT friend std::ostream &operator<<(std::ostream &os, ExternalFeedbackSensorSourceValue data);
3305};
3306
3307/**
3308 * \brief The relationship between the motor controlled by a Talon and the
3309 * external sensor connected to the data port. This does not affect the
3310 * commutation sensor or remote sensors.
3311 *
3312 * To determine the sensor phase, set this config to Aligned and drive
3313 * the motor with positive output. If the reported sensor velocity is
3314 * positive, then the phase is Aligned. If the reported sensor velocity
3315 * is negative, then the phase is Opposed.
3316 *
3317 * The sensor direction is automatically inverted along with motor
3318 * invert, so the sensor phase does not need to be changed when motor
3319 * invert changes.
3320 */
3322 /** \brief Unique integer value of this SensorPhaseValue. */
3324
3325 /**
3326 * \brief The sensor direction is normally aligned with the motor.
3327 */
3328 static constexpr int Aligned = 0;
3329 /**
3330 * \brief The sensor direction is normally opposed to the motor.
3331 */
3332 static constexpr int Opposed = 1;
3333
3334 constexpr SensorPhaseValue(int value) :
3335 value{value}
3336 {}
3337
3338 constexpr SensorPhaseValue() :
3339 value{-1}
3340 {}
3341
3342 constexpr bool operator==(SensorPhaseValue other) const
3343 {
3344 return value == other.value;
3345 }
3346 constexpr auto operator<=>(SensorPhaseValue other) const
3347 {
3348 return value <=> other.value;
3349 }
3350
3351 /**
3352 * \brief Gets the string representation of this enum
3353 *
3354 * \returns String representation of this enum
3355 */
3356 constexpr std::string_view ToString() const
3357 {
3358 switch (value) {
3359 case SensorPhaseValue::Aligned: return "Aligned";
3360 case SensorPhaseValue::Opposed: return "Opposed";
3361 default: return "Invalid Value";
3362 }
3363 }
3364
3365 CTREXPORT friend std::ostream &operator<<(std::ostream &os, SensorPhaseValue data);
3366};
3367
3368/**
3369 * \brief What value the Signal 1 input (S1IN) needs to be for the CTR
3370 * Electronics' CANdi™ to detect as Closed.
3371 *
3372 * \details Devices using the S1 input as a remote limit switch will treat the
3373 * switch as closed when the S1 input is this state.
3374 */
3376 /** \brief Unique integer value of this S1CloseStateValue. */
3378
3379 /**
3380 * \brief The S1 input will be treated as closed when it is not floating.
3381 */
3382 static constexpr int CloseWhenNotFloating = 0;
3383 /**
3384 * \brief The S1 input will be treated as closed when it is floating.
3385 */
3386 static constexpr int CloseWhenFloating = 1;
3387 /**
3388 * \brief The S1 input will be treated as closed when it is not High.
3389 */
3390 static constexpr int CloseWhenNotHigh = 2;
3391 /**
3392 * \brief The S1 input will be treated as closed when it is High.
3393 */
3394 static constexpr int CloseWhenHigh = 3;
3395 /**
3396 * \brief The S1 input will be treated as closed when it is not Low.
3397 */
3398 static constexpr int CloseWhenNotLow = 4;
3399 /**
3400 * \brief The S1 input will be treated as closed when it is Low.
3401 */
3402 static constexpr int CloseWhenLow = 5;
3403
3404 constexpr S1CloseStateValue(int value) :
3405 value{value}
3406 {}
3407
3408 constexpr S1CloseStateValue() :
3409 value{-1}
3410 {}
3411
3412 constexpr bool operator==(S1CloseStateValue other) const
3413 {
3414 return value == other.value;
3415 }
3416 constexpr auto operator<=>(S1CloseStateValue other) const
3417 {
3418 return value <=> other.value;
3419 }
3420
3421 /**
3422 * \brief Gets the string representation of this enum
3423 *
3424 * \returns String representation of this enum
3425 */
3426 constexpr std::string_view ToString() const
3427 {
3428 switch (value) {
3429 case S1CloseStateValue::CloseWhenNotFloating: return "CloseWhenNotFloating";
3430 case S1CloseStateValue::CloseWhenFloating: return "CloseWhenFloating";
3431 case S1CloseStateValue::CloseWhenNotHigh: return "CloseWhenNotHigh";
3432 case S1CloseStateValue::CloseWhenHigh: return "CloseWhenHigh";
3433 case S1CloseStateValue::CloseWhenNotLow: return "CloseWhenNotLow";
3434 case S1CloseStateValue::CloseWhenLow: return "CloseWhenLow";
3435 default: return "Invalid Value";
3436 }
3437 }
3438
3439 CTREXPORT friend std::ostream &operator<<(std::ostream &os, S1CloseStateValue data);
3440};
3441
3442/**
3443 * \brief What value the Signal 2 input (S2IN) needs to be for the CTR
3444 * Electronics' CANdi™ to detect as Closed.
3445 *
3446 * \details Devices using the S2 input as a remote limit switch will treat the
3447 * switch as closed when the S2 input is this state.
3448 */
3450 /** \brief Unique integer value of this S2CloseStateValue. */
3452
3453 /**
3454 * \brief The S2 input will be treated as closed when it is not floating.
3455 */
3456 static constexpr int CloseWhenNotFloating = 0;
3457 /**
3458 * \brief The S2 input will be treated as closed when it is floating.
3459 */
3460 static constexpr int CloseWhenFloating = 1;
3461 /**
3462 * \brief The S2 input will be treated as closed when it is not High.
3463 */
3464 static constexpr int CloseWhenNotHigh = 2;
3465 /**
3466 * \brief The S2 input will be treated as closed when it is High.
3467 */
3468 static constexpr int CloseWhenHigh = 3;
3469 /**
3470 * \brief The S2 input will be treated as closed when it is not Low.
3471 */
3472 static constexpr int CloseWhenNotLow = 4;
3473 /**
3474 * \brief The S2 input will be treated as closed when it is Low.
3475 */
3476 static constexpr int CloseWhenLow = 5;
3477
3478 constexpr S2CloseStateValue(int value) :
3479 value{value}
3480 {}
3481
3482 constexpr S2CloseStateValue() :
3483 value{-1}
3484 {}
3485
3486 constexpr bool operator==(S2CloseStateValue other) const
3487 {
3488 return value == other.value;
3489 }
3490 constexpr auto operator<=>(S2CloseStateValue other) const
3491 {
3492 return value <=> other.value;
3493 }
3494
3495 /**
3496 * \brief Gets the string representation of this enum
3497 *
3498 * \returns String representation of this enum
3499 */
3500 constexpr std::string_view ToString() const
3501 {
3502 switch (value) {
3503 case S2CloseStateValue::CloseWhenNotFloating: return "CloseWhenNotFloating";
3504 case S2CloseStateValue::CloseWhenFloating: return "CloseWhenFloating";
3505 case S2CloseStateValue::CloseWhenNotHigh: return "CloseWhenNotHigh";
3506 case S2CloseStateValue::CloseWhenHigh: return "CloseWhenHigh";
3507 case S2CloseStateValue::CloseWhenNotLow: return "CloseWhenNotLow";
3508 case S2CloseStateValue::CloseWhenLow: return "CloseWhenLow";
3509 default: return "Invalid Value";
3510 }
3511 }
3512
3513 CTREXPORT friend std::ostream &operator<<(std::ostream &os, S2CloseStateValue data);
3514};
3515
3516/**
3517 * \brief If a brushed motor is selected with Motor Arrangement, this config
3518 * determines which of three leads to use.
3519 */
3521 /** \brief Unique integer value of this BrushedMotorWiringValue. */
3523
3524 /**
3525 * \brief Third party brushed DC motor with two leads.
3526 * Motor leads: Use terminal A for the motor red lead and terminal B for
3527 * the motor black lead (motor leads may be flipped to correct for
3528 * clockwise vs counterclockwise).
3529 * Note that the invert configuration can still be used to invert rotor
3530 * orientation.
3531 * Gadgeteer Connector: quadrature [A, B] are on pins [7, 5], limit
3532 * [forward, reverse] are on pins [4, 8], and pulse width position is on
3533 * pin [9].
3534 */
3535 static constexpr int Leads_A_and_B = 0;
3536 /**
3537 * \brief Third party brushed DC motor with two leads.
3538 * Motor leads: Use terminal A for the motor red lead and terminal C for
3539 * the motor black lead (motor leads may be flipped to correct for
3540 * clockwise vs counterclockwise).
3541 * Note that the invert configuration can still be used to reverse rotor
3542 * orientation.
3543 * Gadgeteer Connector: quadrature [A, B] are on pins [7, 5], limit
3544 * [forward, reverse] are on pins [4, 8], and pulse width position is on
3545 * pin [9].
3546 */
3547 static constexpr int Leads_A_and_C = 1;
3548 /**
3549 * \brief Third party brushed DC motor with two leads.
3550 * Motor leads: Use terminal B for the motor red lead and terminal C for
3551 * the motor black lead (motor leads may be flipped to correct for
3552 * clockwise vs counterclockwise).
3553 * Note that the invert configuration can still be used to reverse rotor
3554 * orientation.
3555 * Gadgeteer Connector: quadrature [A, B] are on pins [7, 5], limit
3556 * [forward, reverse] are on pins [4, 8], and pulse width position is on
3557 * pin [9].
3558 */
3559 static constexpr int Leads_B_and_C = 2;
3560
3562 value{value}
3563 {}
3564
3566 value{-1}
3567 {}
3568
3569 constexpr bool operator==(BrushedMotorWiringValue other) const
3570 {
3571 return value == other.value;
3572 }
3573 constexpr auto operator<=>(BrushedMotorWiringValue other) const
3574 {
3575 return value <=> other.value;
3576 }
3577
3578 /**
3579 * \brief Gets the string representation of this enum
3580 *
3581 * \returns String representation of this enum
3582 */
3583 constexpr std::string_view ToString() const
3584 {
3585 switch (value) {
3586 case BrushedMotorWiringValue::Leads_A_and_B: return "Leads_A_and_B";
3587 case BrushedMotorWiringValue::Leads_A_and_C: return "Leads_A_and_C";
3588 case BrushedMotorWiringValue::Leads_B_and_C: return "Leads_B_and_C";
3589 default: return "Invalid Value";
3590 }
3591 }
3592
3593 CTREXPORT friend std::ostream &operator<<(std::ostream &os, BrushedMotorWiringValue data);
3594};
3595
3596/**
3597 * \brief The type of LEDs that are being controlled.
3598 */
3600 /** \brief Unique integer value of this StripTypeValue. */
3602
3603 /**
3604 * \brief LEDs that are controlled by Green-Red-Blue values.
3605 */
3606 static constexpr int GRB = 0;
3607 /**
3608 * \brief LEDs that are controlled by Red-Green-Blue values.
3609 */
3610 static constexpr int RGB = 1;
3611 /**
3612 * \brief LEDs that are controlled by Blue-Red-Green values.
3613 */
3614 static constexpr int BRG = 2;
3615 /**
3616 * \brief LEDs that are controlled by Green-Red-Blue-White values.
3617 */
3618 static constexpr int GRBW = 6;
3619 /**
3620 * \brief LEDs that are controlled by Red-Green-Blue-White values.
3621 */
3622 static constexpr int RGBW = 7;
3623 /**
3624 * \brief LEDs that are controlled by Blue-Red-Green-White values.
3625 */
3626 static constexpr int BRGW = 8;
3627
3628 constexpr StripTypeValue(int value) :
3629 value{value}
3630 {}
3631
3632 constexpr StripTypeValue() :
3633 value{-1}
3634 {}
3635
3636 constexpr bool operator==(StripTypeValue other) const
3637 {
3638 return value == other.value;
3639 }
3640 constexpr auto operator<=>(StripTypeValue other) const
3641 {
3642 return value <=> other.value;
3643 }
3644
3645 /**
3646 * \brief Gets the string representation of this enum
3647 *
3648 * \returns String representation of this enum
3649 */
3650 constexpr std::string_view ToString() const
3651 {
3652 switch (value) {
3653 case StripTypeValue::GRB: return "GRB";
3654 case StripTypeValue::RGB: return "RGB";
3655 case StripTypeValue::BRG: return "BRG";
3656 case StripTypeValue::GRBW: return "GRBW";
3657 case StripTypeValue::RGBW: return "RGBW";
3658 case StripTypeValue::BRGW: return "BRGW";
3659 default: return "Invalid Value";
3660 }
3661 }
3662
3663 CTREXPORT friend std::ostream &operator<<(std::ostream &os, StripTypeValue data);
3664};
3665
3666/**
3667 * \brief The behavior of the LEDs when the control signal is lost.
3668 */
3670 /** \brief Unique integer value of this LossOfSignalBehaviorValue. */
3672
3673 /**
3674 * \brief LEDs remain enabled, and animations continue to run.
3675 */
3676 static constexpr int KeepRunning = 0;
3677 /**
3678 * \brief LEDs and animations are disabled after the control signal is lost.
3679 */
3680 static constexpr int DisableLEDs = 1;
3681
3683 value{value}
3684 {}
3685
3687 value{-1}
3688 {}
3689
3690 constexpr bool operator==(LossOfSignalBehaviorValue other) const
3691 {
3692 return value == other.value;
3693 }
3694 constexpr auto operator<=>(LossOfSignalBehaviorValue other) const
3695 {
3696 return value <=> other.value;
3697 }
3698
3699 /**
3700 * \brief Gets the string representation of this enum
3701 *
3702 * \returns String representation of this enum
3703 */
3704 constexpr std::string_view ToString() const
3705 {
3706 switch (value) {
3707 case LossOfSignalBehaviorValue::KeepRunning: return "KeepRunning";
3708 case LossOfSignalBehaviorValue::DisableLEDs: return "DisableLEDs";
3709 default: return "Invalid Value";
3710 }
3711 }
3712
3713 CTREXPORT friend std::ostream &operator<<(std::ostream &os, LossOfSignalBehaviorValue data);
3714};
3715
3716/**
3717 * \brief Whether the 5V rail is enabled. Disabling the 5V rail will also turn
3718 * off the onboard LEDs.
3719 */
3721 /** \brief Unique integer value of this Enable5VRailValue. */
3723
3724 /**
3725 * \brief The 5V rail is enabled, allowing for LED control.
3726 */
3727 static constexpr int Enabled = 0;
3728 /**
3729 * \brief The 5V rail is disabled. This will also turn off the onboard LEDs.
3730 */
3731 static constexpr int Disabled = 1;
3732
3733 constexpr Enable5VRailValue(int value) :
3734 value{value}
3735 {}
3736
3737 constexpr Enable5VRailValue() :
3738 value{-1}
3739 {}
3740
3741 constexpr bool operator==(Enable5VRailValue other) const
3742 {
3743 return value == other.value;
3744 }
3745 constexpr auto operator<=>(Enable5VRailValue other) const
3746 {
3747 return value <=> other.value;
3748 }
3749
3750 /**
3751 * \brief Gets the string representation of this enum
3752 *
3753 * \returns String representation of this enum
3754 */
3755 constexpr std::string_view ToString() const
3756 {
3757 switch (value) {
3758 case Enable5VRailValue::Enabled: return "Enabled";
3759 case Enable5VRailValue::Disabled: return "Disabled";
3760 default: return "Invalid Value";
3761 }
3762 }
3763
3764 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Enable5VRailValue data);
3765};
3766
3767/**
3768 * \brief The behavior of the VBat output. CANdle supports modulating VBat
3769 * output for single-color LED strips.
3770 */
3772 /** \brief Unique integer value of this VBatOutputModeValue. */
3774
3775 /**
3776 * \brief VBat output is on at full power.
3777 */
3778 static constexpr int On = 0;
3779 /**
3780 * \brief VBat output is off.
3781 */
3782 static constexpr int Off = 1;
3783 /**
3784 * \brief VBat output is on at the specified modulation.
3785 */
3786 static constexpr int Modulated = 2;
3787
3789 value{value}
3790 {}
3791
3793 value{-1}
3794 {}
3795
3796 constexpr bool operator==(VBatOutputModeValue other) const
3797 {
3798 return value == other.value;
3799 }
3800 constexpr auto operator<=>(VBatOutputModeValue other) const
3801 {
3802 return value <=> other.value;
3803 }
3804
3805 /**
3806 * \brief Gets the string representation of this enum
3807 *
3808 * \returns String representation of this enum
3809 */
3810 constexpr std::string_view ToString() const
3811 {
3812 switch (value) {
3813 case VBatOutputModeValue::On: return "On";
3814 case VBatOutputModeValue::Off: return "Off";
3815 case VBatOutputModeValue::Modulated: return "Modulated";
3816 default: return "Invalid Value";
3817 }
3818 }
3819
3820 CTREXPORT friend std::ostream &operator<<(std::ostream &os, VBatOutputModeValue data);
3821};
3822
3823/**
3824 * \brief Whether the Status LED is enabled when the CANdle is actively being
3825 * controlled.
3826 */
3828 /** \brief Unique integer value of this StatusLedWhenActiveValue. */
3830
3831 /**
3832 * \brief The status LED is enabled during control.
3833 */
3834 static constexpr int Enabled = 0;
3835 /**
3836 * \brief The status LED is disabled during control.
3837 */
3838 static constexpr int Disabled = 1;
3839
3841 value{value}
3842 {}
3843
3845 value{-1}
3846 {}
3847
3848 constexpr bool operator==(StatusLedWhenActiveValue other) const
3849 {
3850 return value == other.value;
3851 }
3852 constexpr auto operator<=>(StatusLedWhenActiveValue other) const
3853 {
3854 return value <=> other.value;
3855 }
3856
3857 /**
3858 * \brief Gets the string representation of this enum
3859 *
3860 * \returns String representation of this enum
3861 */
3862 constexpr std::string_view ToString() const
3863 {
3864 switch (value) {
3865 case StatusLedWhenActiveValue::Enabled: return "Enabled";
3866 case StatusLedWhenActiveValue::Disabled: return "Disabled";
3867 default: return "Invalid Value";
3868 }
3869 }
3870
3871 CTREXPORT friend std::ostream &operator<<(std::ostream &os, StatusLedWhenActiveValue data);
3872};
3873
3874/**
3875 * \brief The type of animation running in slot 0 of the CANdle.
3876 */
3878 /** \brief Unique integer value of this Animation0TypeValue. */
3880
3881 /**
3882 * \brief No animation.
3883 */
3884 static constexpr int Empty = 0;
3885 /**
3886 * \brief Color flow animation.
3887 */
3888 static constexpr int ColorFlow = 1;
3889 /**
3890 * \brief Fire animation.
3891 */
3892 static constexpr int Fire = 2;
3893 /**
3894 * \brief Larson animation.
3895 */
3896 static constexpr int Larson = 3;
3897 /**
3898 * \brief Rainbow animation.
3899 */
3900 static constexpr int Rainbow = 4;
3901 /**
3902 * \brief RGB Fade animation.
3903 */
3904 static constexpr int RgbFade = 5;
3905 /**
3906 * \brief Single fade animation.
3907 */
3908 static constexpr int SingleFade = 6;
3909 /**
3910 * \brief Strobe animation.
3911 */
3912 static constexpr int Strobe = 7;
3913 /**
3914 * \brief Twinkle animation.
3915 */
3916 static constexpr int Twinkle = 8;
3917 /**
3918 * \brief Twinkle off animation.
3919 */
3920 static constexpr int TwinkleOff = 9;
3921
3923 value{value}
3924 {}
3925
3927 value{-1}
3928 {}
3929
3930 constexpr bool operator==(Animation0TypeValue other) const
3931 {
3932 return value == other.value;
3933 }
3934 constexpr auto operator<=>(Animation0TypeValue other) const
3935 {
3936 return value <=> other.value;
3937 }
3938
3939 /**
3940 * \brief Gets the string representation of this enum
3941 *
3942 * \returns String representation of this enum
3943 */
3944 constexpr std::string_view ToString() const
3945 {
3946 switch (value) {
3947 case Animation0TypeValue::Empty: return "Empty";
3948 case Animation0TypeValue::ColorFlow: return "ColorFlow";
3949 case Animation0TypeValue::Fire: return "Fire";
3950 case Animation0TypeValue::Larson: return "Larson";
3951 case Animation0TypeValue::Rainbow: return "Rainbow";
3952 case Animation0TypeValue::RgbFade: return "RgbFade";
3953 case Animation0TypeValue::SingleFade: return "SingleFade";
3954 case Animation0TypeValue::Strobe: return "Strobe";
3955 case Animation0TypeValue::Twinkle: return "Twinkle";
3956 case Animation0TypeValue::TwinkleOff: return "TwinkleOff";
3957 default: return "Invalid Value";
3958 }
3959 }
3960
3961 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Animation0TypeValue data);
3962};
3963
3964/**
3965 * \brief The type of animation running in slot 1 of the CANdle.
3966 */
3968 /** \brief Unique integer value of this Animation1TypeValue. */
3970
3971 /**
3972 * \brief No animation.
3973 */
3974 static constexpr int Empty = 0;
3975 /**
3976 * \brief Color flow animation.
3977 */
3978 static constexpr int ColorFlow = 1;
3979 /**
3980 * \brief Fire animation.
3981 */
3982 static constexpr int Fire = 2;
3983 /**
3984 * \brief Larson animation.
3985 */
3986 static constexpr int Larson = 3;
3987 /**
3988 * \brief Rainbow animation.
3989 */
3990 static constexpr int Rainbow = 4;
3991 /**
3992 * \brief RGB Fade animation.
3993 */
3994 static constexpr int RgbFade = 5;
3995 /**
3996 * \brief Single fade animation.
3997 */
3998 static constexpr int SingleFade = 6;
3999 /**
4000 * \brief Strobe animation.
4001 */
4002 static constexpr int Strobe = 7;
4003 /**
4004 * \brief Twinkle animation.
4005 */
4006 static constexpr int Twinkle = 8;
4007 /**
4008 * \brief Twinkle off animation.
4009 */
4010 static constexpr int TwinkleOff = 9;
4011
4013 value{value}
4014 {}
4015
4017 value{-1}
4018 {}
4019
4020 constexpr bool operator==(Animation1TypeValue other) const
4021 {
4022 return value == other.value;
4023 }
4024 constexpr auto operator<=>(Animation1TypeValue other) const
4025 {
4026 return value <=> other.value;
4027 }
4028
4029 /**
4030 * \brief Gets the string representation of this enum
4031 *
4032 * \returns String representation of this enum
4033 */
4034 constexpr std::string_view ToString() const
4035 {
4036 switch (value) {
4037 case Animation1TypeValue::Empty: return "Empty";
4038 case Animation1TypeValue::ColorFlow: return "ColorFlow";
4039 case Animation1TypeValue::Fire: return "Fire";
4040 case Animation1TypeValue::Larson: return "Larson";
4041 case Animation1TypeValue::Rainbow: return "Rainbow";
4042 case Animation1TypeValue::RgbFade: return "RgbFade";
4043 case Animation1TypeValue::SingleFade: return "SingleFade";
4044 case Animation1TypeValue::Strobe: return "Strobe";
4045 case Animation1TypeValue::Twinkle: return "Twinkle";
4046 case Animation1TypeValue::TwinkleOff: return "TwinkleOff";
4047 default: return "Invalid Value";
4048 }
4049 }
4050
4051 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Animation1TypeValue data);
4052};
4053
4054/**
4055 * \brief The type of animation running in slot 2 of the CANdle.
4056 */
4058 /** \brief Unique integer value of this Animation2TypeValue. */
4060
4061 /**
4062 * \brief No animation.
4063 */
4064 static constexpr int Empty = 0;
4065 /**
4066 * \brief Color flow animation.
4067 */
4068 static constexpr int ColorFlow = 1;
4069 /**
4070 * \brief Fire animation.
4071 */
4072 static constexpr int Fire = 2;
4073 /**
4074 * \brief Larson animation.
4075 */
4076 static constexpr int Larson = 3;
4077 /**
4078 * \brief Rainbow animation.
4079 */
4080 static constexpr int Rainbow = 4;
4081 /**
4082 * \brief RGB Fade animation.
4083 */
4084 static constexpr int RgbFade = 5;
4085 /**
4086 * \brief Single fade animation.
4087 */
4088 static constexpr int SingleFade = 6;
4089 /**
4090 * \brief Strobe animation.
4091 */
4092 static constexpr int Strobe = 7;
4093 /**
4094 * \brief Twinkle animation.
4095 */
4096 static constexpr int Twinkle = 8;
4097 /**
4098 * \brief Twinkle off animation.
4099 */
4100 static constexpr int TwinkleOff = 9;
4101
4103 value{value}
4104 {}
4105
4107 value{-1}
4108 {}
4109
4110 constexpr bool operator==(Animation2TypeValue other) const
4111 {
4112 return value == other.value;
4113 }
4114 constexpr auto operator<=>(Animation2TypeValue other) const
4115 {
4116 return value <=> other.value;
4117 }
4118
4119 /**
4120 * \brief Gets the string representation of this enum
4121 *
4122 * \returns String representation of this enum
4123 */
4124 constexpr std::string_view ToString() const
4125 {
4126 switch (value) {
4127 case Animation2TypeValue::Empty: return "Empty";
4128 case Animation2TypeValue::ColorFlow: return "ColorFlow";
4129 case Animation2TypeValue::Fire: return "Fire";
4130 case Animation2TypeValue::Larson: return "Larson";
4131 case Animation2TypeValue::Rainbow: return "Rainbow";
4132 case Animation2TypeValue::RgbFade: return "RgbFade";
4133 case Animation2TypeValue::SingleFade: return "SingleFade";
4134 case Animation2TypeValue::Strobe: return "Strobe";
4135 case Animation2TypeValue::Twinkle: return "Twinkle";
4136 case Animation2TypeValue::TwinkleOff: return "TwinkleOff";
4137 default: return "Invalid Value";
4138 }
4139 }
4140
4141 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Animation2TypeValue data);
4142};
4143
4144/**
4145 * \brief The type of animation running in slot 3 of the CANdle.
4146 */
4148 /** \brief Unique integer value of this Animation3TypeValue. */
4150
4151 /**
4152 * \brief No animation.
4153 */
4154 static constexpr int Empty = 0;
4155 /**
4156 * \brief Color flow animation.
4157 */
4158 static constexpr int ColorFlow = 1;
4159 /**
4160 * \brief Fire animation.
4161 */
4162 static constexpr int Fire = 2;
4163 /**
4164 * \brief Larson animation.
4165 */
4166 static constexpr int Larson = 3;
4167 /**
4168 * \brief Rainbow animation.
4169 */
4170 static constexpr int Rainbow = 4;
4171 /**
4172 * \brief RGB Fade animation.
4173 */
4174 static constexpr int RgbFade = 5;
4175 /**
4176 * \brief Single fade animation.
4177 */
4178 static constexpr int SingleFade = 6;
4179 /**
4180 * \brief Strobe animation.
4181 */
4182 static constexpr int Strobe = 7;
4183 /**
4184 * \brief Twinkle animation.
4185 */
4186 static constexpr int Twinkle = 8;
4187 /**
4188 * \brief Twinkle off animation.
4189 */
4190 static constexpr int TwinkleOff = 9;
4191
4193 value{value}
4194 {}
4195
4197 value{-1}
4198 {}
4199
4200 constexpr bool operator==(Animation3TypeValue other) const
4201 {
4202 return value == other.value;
4203 }
4204 constexpr auto operator<=>(Animation3TypeValue other) const
4205 {
4206 return value <=> other.value;
4207 }
4208
4209 /**
4210 * \brief Gets the string representation of this enum
4211 *
4212 * \returns String representation of this enum
4213 */
4214 constexpr std::string_view ToString() const
4215 {
4216 switch (value) {
4217 case Animation3TypeValue::Empty: return "Empty";
4218 case Animation3TypeValue::ColorFlow: return "ColorFlow";
4219 case Animation3TypeValue::Fire: return "Fire";
4220 case Animation3TypeValue::Larson: return "Larson";
4221 case Animation3TypeValue::Rainbow: return "Rainbow";
4222 case Animation3TypeValue::RgbFade: return "RgbFade";
4223 case Animation3TypeValue::SingleFade: return "SingleFade";
4224 case Animation3TypeValue::Strobe: return "Strobe";
4225 case Animation3TypeValue::Twinkle: return "Twinkle";
4226 case Animation3TypeValue::TwinkleOff: return "TwinkleOff";
4227 default: return "Invalid Value";
4228 }
4229 }
4230
4231 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Animation3TypeValue data);
4232};
4233
4234/**
4235 * \brief The type of animation running in slot 4 of the CANdle.
4236 */
4238 /** \brief Unique integer value of this Animation4TypeValue. */
4240
4241 /**
4242 * \brief No animation.
4243 */
4244 static constexpr int Empty = 0;
4245 /**
4246 * \brief Color flow animation.
4247 */
4248 static constexpr int ColorFlow = 1;
4249 /**
4250 * \brief Fire animation.
4251 */
4252 static constexpr int Fire = 2;
4253 /**
4254 * \brief Larson animation.
4255 */
4256 static constexpr int Larson = 3;
4257 /**
4258 * \brief Rainbow animation.
4259 */
4260 static constexpr int Rainbow = 4;
4261 /**
4262 * \brief RGB Fade animation.
4263 */
4264 static constexpr int RgbFade = 5;
4265 /**
4266 * \brief Single fade animation.
4267 */
4268 static constexpr int SingleFade = 6;
4269 /**
4270 * \brief Strobe animation.
4271 */
4272 static constexpr int Strobe = 7;
4273 /**
4274 * \brief Twinkle animation.
4275 */
4276 static constexpr int Twinkle = 8;
4277 /**
4278 * \brief Twinkle off animation.
4279 */
4280 static constexpr int TwinkleOff = 9;
4281
4283 value{value}
4284 {}
4285
4287 value{-1}
4288 {}
4289
4290 constexpr bool operator==(Animation4TypeValue other) const
4291 {
4292 return value == other.value;
4293 }
4294 constexpr auto operator<=>(Animation4TypeValue other) const
4295 {
4296 return value <=> other.value;
4297 }
4298
4299 /**
4300 * \brief Gets the string representation of this enum
4301 *
4302 * \returns String representation of this enum
4303 */
4304 constexpr std::string_view ToString() const
4305 {
4306 switch (value) {
4307 case Animation4TypeValue::Empty: return "Empty";
4308 case Animation4TypeValue::ColorFlow: return "ColorFlow";
4309 case Animation4TypeValue::Fire: return "Fire";
4310 case Animation4TypeValue::Larson: return "Larson";
4311 case Animation4TypeValue::Rainbow: return "Rainbow";
4312 case Animation4TypeValue::RgbFade: return "RgbFade";
4313 case Animation4TypeValue::SingleFade: return "SingleFade";
4314 case Animation4TypeValue::Strobe: return "Strobe";
4315 case Animation4TypeValue::Twinkle: return "Twinkle";
4316 case Animation4TypeValue::TwinkleOff: return "TwinkleOff";
4317 default: return "Invalid Value";
4318 }
4319 }
4320
4321 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Animation4TypeValue data);
4322};
4323
4324/**
4325 * \brief The type of animation running in slot 5 of the CANdle.
4326 */
4328 /** \brief Unique integer value of this Animation5TypeValue. */
4330
4331 /**
4332 * \brief No animation.
4333 */
4334 static constexpr int Empty = 0;
4335 /**
4336 * \brief Color flow animation.
4337 */
4338 static constexpr int ColorFlow = 1;
4339 /**
4340 * \brief Fire animation.
4341 */
4342 static constexpr int Fire = 2;
4343 /**
4344 * \brief Larson animation.
4345 */
4346 static constexpr int Larson = 3;
4347 /**
4348 * \brief Rainbow animation.
4349 */
4350 static constexpr int Rainbow = 4;
4351 /**
4352 * \brief RGB Fade animation.
4353 */
4354 static constexpr int RgbFade = 5;
4355 /**
4356 * \brief Single fade animation.
4357 */
4358 static constexpr int SingleFade = 6;
4359 /**
4360 * \brief Strobe animation.
4361 */
4362 static constexpr int Strobe = 7;
4363 /**
4364 * \brief Twinkle animation.
4365 */
4366 static constexpr int Twinkle = 8;
4367 /**
4368 * \brief Twinkle off animation.
4369 */
4370 static constexpr int TwinkleOff = 9;
4371
4373 value{value}
4374 {}
4375
4377 value{-1}
4378 {}
4379
4380 constexpr bool operator==(Animation5TypeValue other) const
4381 {
4382 return value == other.value;
4383 }
4384 constexpr auto operator<=>(Animation5TypeValue other) const
4385 {
4386 return value <=> other.value;
4387 }
4388
4389 /**
4390 * \brief Gets the string representation of this enum
4391 *
4392 * \returns String representation of this enum
4393 */
4394 constexpr std::string_view ToString() const
4395 {
4396 switch (value) {
4397 case Animation5TypeValue::Empty: return "Empty";
4398 case Animation5TypeValue::ColorFlow: return "ColorFlow";
4399 case Animation5TypeValue::Fire: return "Fire";
4400 case Animation5TypeValue::Larson: return "Larson";
4401 case Animation5TypeValue::Rainbow: return "Rainbow";
4402 case Animation5TypeValue::RgbFade: return "RgbFade";
4403 case Animation5TypeValue::SingleFade: return "SingleFade";
4404 case Animation5TypeValue::Strobe: return "Strobe";
4405 case Animation5TypeValue::Twinkle: return "Twinkle";
4406 case Animation5TypeValue::TwinkleOff: return "TwinkleOff";
4407 default: return "Invalid Value";
4408 }
4409 }
4410
4411 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Animation5TypeValue data);
4412};
4413
4414/**
4415 * \brief The type of animation running in slot 6 of the CANdle.
4416 */
4418 /** \brief Unique integer value of this Animation6TypeValue. */
4420
4421 /**
4422 * \brief No animation.
4423 */
4424 static constexpr int Empty = 0;
4425 /**
4426 * \brief Color flow animation.
4427 */
4428 static constexpr int ColorFlow = 1;
4429 /**
4430 * \brief Fire animation.
4431 */
4432 static constexpr int Fire = 2;
4433 /**
4434 * \brief Larson animation.
4435 */
4436 static constexpr int Larson = 3;
4437 /**
4438 * \brief Rainbow animation.
4439 */
4440 static constexpr int Rainbow = 4;
4441 /**
4442 * \brief RGB Fade animation.
4443 */
4444 static constexpr int RgbFade = 5;
4445 /**
4446 * \brief Single fade animation.
4447 */
4448 static constexpr int SingleFade = 6;
4449 /**
4450 * \brief Strobe animation.
4451 */
4452 static constexpr int Strobe = 7;
4453 /**
4454 * \brief Twinkle animation.
4455 */
4456 static constexpr int Twinkle = 8;
4457 /**
4458 * \brief Twinkle off animation.
4459 */
4460 static constexpr int TwinkleOff = 9;
4461
4463 value{value}
4464 {}
4465
4467 value{-1}
4468 {}
4469
4470 constexpr bool operator==(Animation6TypeValue other) const
4471 {
4472 return value == other.value;
4473 }
4474 constexpr auto operator<=>(Animation6TypeValue other) const
4475 {
4476 return value <=> other.value;
4477 }
4478
4479 /**
4480 * \brief Gets the string representation of this enum
4481 *
4482 * \returns String representation of this enum
4483 */
4484 constexpr std::string_view ToString() const
4485 {
4486 switch (value) {
4487 case Animation6TypeValue::Empty: return "Empty";
4488 case Animation6TypeValue::ColorFlow: return "ColorFlow";
4489 case Animation6TypeValue::Fire: return "Fire";
4490 case Animation6TypeValue::Larson: return "Larson";
4491 case Animation6TypeValue::Rainbow: return "Rainbow";
4492 case Animation6TypeValue::RgbFade: return "RgbFade";
4493 case Animation6TypeValue::SingleFade: return "SingleFade";
4494 case Animation6TypeValue::Strobe: return "Strobe";
4495 case Animation6TypeValue::Twinkle: return "Twinkle";
4496 case Animation6TypeValue::TwinkleOff: return "TwinkleOff";
4497 default: return "Invalid Value";
4498 }
4499 }
4500
4501 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Animation6TypeValue data);
4502};
4503
4504/**
4505 * \brief The type of animation running in slot 7 of the CANdle.
4506 */
4508 /** \brief Unique integer value of this Animation7TypeValue. */
4510
4511 /**
4512 * \brief No animation.
4513 */
4514 static constexpr int Empty = 0;
4515 /**
4516 * \brief Color flow animation.
4517 */
4518 static constexpr int ColorFlow = 1;
4519 /**
4520 * \brief Fire animation.
4521 */
4522 static constexpr int Fire = 2;
4523 /**
4524 * \brief Larson animation.
4525 */
4526 static constexpr int Larson = 3;
4527 /**
4528 * \brief Rainbow animation.
4529 */
4530 static constexpr int Rainbow = 4;
4531 /**
4532 * \brief RGB Fade animation.
4533 */
4534 static constexpr int RgbFade = 5;
4535 /**
4536 * \brief Single fade animation.
4537 */
4538 static constexpr int SingleFade = 6;
4539 /**
4540 * \brief Strobe animation.
4541 */
4542 static constexpr int Strobe = 7;
4543 /**
4544 * \brief Twinkle animation.
4545 */
4546 static constexpr int Twinkle = 8;
4547 /**
4548 * \brief Twinkle off animation.
4549 */
4550 static constexpr int TwinkleOff = 9;
4551
4553 value{value}
4554 {}
4555
4557 value{-1}
4558 {}
4559
4560 constexpr bool operator==(Animation7TypeValue other) const
4561 {
4562 return value == other.value;
4563 }
4564 constexpr auto operator<=>(Animation7TypeValue other) const
4565 {
4566 return value <=> other.value;
4567 }
4568
4569 /**
4570 * \brief Gets the string representation of this enum
4571 *
4572 * \returns String representation of this enum
4573 */
4574 constexpr std::string_view ToString() const
4575 {
4576 switch (value) {
4577 case Animation7TypeValue::Empty: return "Empty";
4578 case Animation7TypeValue::ColorFlow: return "ColorFlow";
4579 case Animation7TypeValue::Fire: return "Fire";
4580 case Animation7TypeValue::Larson: return "Larson";
4581 case Animation7TypeValue::Rainbow: return "Rainbow";
4582 case Animation7TypeValue::RgbFade: return "RgbFade";
4583 case Animation7TypeValue::SingleFade: return "SingleFade";
4584 case Animation7TypeValue::Strobe: return "Strobe";
4585 case Animation7TypeValue::Twinkle: return "Twinkle";
4586 case Animation7TypeValue::TwinkleOff: return "TwinkleOff";
4587 default: return "Invalid Value";
4588 }
4589 }
4590
4591 CTREXPORT friend std::ostream &operator<<(std::ostream &os, Animation7TypeValue data);
4592};
4593
4594/**
4595 * \brief Direction of the animation.
4596 */
4598 /** \brief Unique integer value of this AnimationDirectionValue. */
4600
4601 /**
4602 * \brief The animation starts at the specified LED start index and moves
4603 * towards the LED end index.
4604 */
4605 static constexpr int Forward = 0;
4606 /**
4607 * \brief The animation starts at the specified LED end index and moves towards
4608 * the LED start index.
4609 */
4610 static constexpr int Backward = 1;
4611
4613 value{value}
4614 {}
4615
4617 value{-1}
4618 {}
4619
4620 constexpr bool operator==(AnimationDirectionValue other) const
4621 {
4622 return value == other.value;
4623 }
4624 constexpr auto operator<=>(AnimationDirectionValue other) const
4625 {
4626 return value <=> other.value;
4627 }
4628
4629 /**
4630 * \brief Gets the string representation of this enum
4631 *
4632 * \returns String representation of this enum
4633 */
4634 constexpr std::string_view ToString() const
4635 {
4636 switch (value) {
4637 case AnimationDirectionValue::Forward: return "Forward";
4638 case AnimationDirectionValue::Backward: return "Backward";
4639 default: return "Invalid Value";
4640 }
4641 }
4642
4643 CTREXPORT friend std::ostream &operator<<(std::ostream &os, AnimationDirectionValue data);
4644};
4645
4646/**
4647 * \brief The behavior of the larson animation pocket of light when it reaches
4648 * the end of the strip.
4649 */
4651 /** \brief Unique integer value of this LarsonBounceValue. */
4653
4654 /**
4655 * \brief The animation bounces as soon as the first LED reaches the end of the
4656 * strip.
4657 */
4658 static constexpr int Front = 0;
4659 /**
4660 * \brief The animation bounces once it is midway through the end of the strip.
4661 */
4662 static constexpr int Center = 1;
4663 /**
4664 * \brief The animation bounces once all LEDs are off the strip.
4665 */
4666 static constexpr int Back = 2;
4667
4668 constexpr LarsonBounceValue(int value) :
4669 value{value}
4670 {}
4671
4672 constexpr LarsonBounceValue() :
4673 value{-1}
4674 {}
4675
4676 constexpr bool operator==(LarsonBounceValue other) const
4677 {
4678 return value == other.value;
4679 }
4680 constexpr auto operator<=>(LarsonBounceValue other) const
4681 {
4682 return value <=> other.value;
4683 }
4684
4685 /**
4686 * \brief Gets the string representation of this enum
4687 *
4688 * \returns String representation of this enum
4689 */
4690 constexpr std::string_view ToString() const
4691 {
4692 switch (value) {
4693 case LarsonBounceValue::Front: return "Front";
4694 case LarsonBounceValue::Center: return "Center";
4695 case LarsonBounceValue::Back: return "Back";
4696 default: return "Invalid Value";
4697 }
4698 }
4699
4700 CTREXPORT friend std::ostream &operator<<(std::ostream &os, LarsonBounceValue data);
4701};
4702
4703/**
4704 * \brief Whether a temperature sensor should be required for motor control.
4705 * This configuration is ignored in FRC environments and defaults to
4706 * Required.
4707 */
4709 /** \brief Unique integer value of this TempSensorRequiredValue. */
4711
4712 /**
4713 * \brief Temperature sensor is required for motor control.
4714 */
4715 static constexpr int Required = 0;
4716 /**
4717 * \brief Temperature sensor is not required for motor control.
4718 */
4719 static constexpr int Not_Required = 1;
4720
4722 value{value}
4723 {}
4724
4726 value{-1}
4727 {}
4728
4729 constexpr bool operator==(TempSensorRequiredValue other) const
4730 {
4731 return value == other.value;
4732 }
4733 constexpr auto operator<=>(TempSensorRequiredValue other) const
4734 {
4735 return value <=> other.value;
4736 }
4737
4738 /**
4739 * \brief Gets the string representation of this enum
4740 *
4741 * \returns String representation of this enum
4742 */
4743 constexpr std::string_view ToString() const
4744 {
4745 switch (value) {
4746 case TempSensorRequiredValue::Required: return "Required";
4747 case TempSensorRequiredValue::Not_Required: return "Not_Required";
4748 default: return "Invalid Value";
4749 }
4750 }
4751
4752 CTREXPORT friend std::ostream &operator<<(std::ostream &os, TempSensorRequiredValue data);
4753};
4754
4755/**
4756 * \brief The behavior of kP output as the error crosses the
4757 * GainSchedErrorThreshold during gain scheduling. The output of kP can
4758 * be adjusted to maintain continuity in output, or it can be left
4759 * discontinuous.
4760 */
4762 /** \brief Unique integer value of this GainSchedKpBehaviorValue. */
4764
4765 /**
4766 * \brief The gain scheduler will maintain continuity in the kP output as the
4767 * error crosses the gain threshold. This results in the best system
4768 * stability, but it may result in output that does not match pOut = kP *
4769 * error.
4770 */
4771 static constexpr int Continuous = 0;
4772 /**
4773 * \brief The gain scheduler will allow for a discontinuity in the kP output.
4774 * This ensures that pOut = kP * error, but it may result in instability
4775 * as the system's error crosses the gain threshold.
4776 */
4777 static constexpr int Discontinuous = 1;
4778
4780 value{value}
4781 {}
4782
4784 value{-1}
4785 {}
4786
4787 constexpr bool operator==(GainSchedKpBehaviorValue other) const
4788 {
4789 return value == other.value;
4790 }
4791 constexpr auto operator<=>(GainSchedKpBehaviorValue other) const
4792 {
4793 return value <=> other.value;
4794 }
4795
4796 /**
4797 * \brief Gets the string representation of this enum
4798 *
4799 * \returns String representation of this enum
4800 */
4801 constexpr std::string_view ToString() const
4802 {
4803 switch (value) {
4804 case GainSchedKpBehaviorValue::Continuous: return "Continuous";
4805 case GainSchedKpBehaviorValue::Discontinuous: return "Discontinuous";
4806 default: return "Invalid Value";
4807 }
4808 }
4809
4810 CTREXPORT friend std::ostream &operator<<(std::ostream &os, GainSchedKpBehaviorValue data);
4811};
4812
4813/**
4814 * \brief The behavior of the gain scheduler on this slot. This specifies which
4815 * gains to use while within the configured GainSchedErrorThreshold. The
4816 * default is to continue using the specified slot.
4817 *
4818 * \details Gain scheduling will not take effect when running velocity
4819 * closed-loop controls.
4820 */
4822 /** \brief Unique integer value of this GainSchedBehaviorValue. */
4824
4825 /**
4826 * \brief No gain scheduling will occur.
4827 */
4828 static constexpr int Inactive = 0;
4829 /**
4830 * \brief The output of the PID controller will be completely zeroed, except for
4831 * kG and the user FeedForward control request parameter.
4832 */
4833 static constexpr int ZeroOutput = 1;
4834 /**
4835 * \brief Switch to Slot 0 while within the configured GainSchedErrorThreshold.
4836 */
4837 static constexpr int UseSlot0 = 2;
4838 /**
4839 * \brief Switch to Slot 1 while within the configured GainSchedErrorThreshold.
4840 */
4841 static constexpr int UseSlot1 = 3;
4842 /**
4843 * \brief Switch to Slot 2 while within the configured GainSchedErrorThreshold.
4844 */
4845 static constexpr int UseSlot2 = 4;
4846
4848 value{value}
4849 {}
4850
4852 value{-1}
4853 {}
4854
4855 constexpr bool operator==(GainSchedBehaviorValue other) const
4856 {
4857 return value == other.value;
4858 }
4859 constexpr auto operator<=>(GainSchedBehaviorValue other) const
4860 {
4861 return value <=> other.value;
4862 }
4863
4864 /**
4865 * \brief Gets the string representation of this enum
4866 *
4867 * \returns String representation of this enum
4868 */
4869 constexpr std::string_view ToString() const
4870 {
4871 switch (value) {
4872 case GainSchedBehaviorValue::Inactive: return "Inactive";
4873 case GainSchedBehaviorValue::ZeroOutput: return "ZeroOutput";
4874 case GainSchedBehaviorValue::UseSlot0: return "UseSlot0";
4875 case GainSchedBehaviorValue::UseSlot1: return "UseSlot1";
4876 case GainSchedBehaviorValue::UseSlot2: return "UseSlot2";
4877 default: return "Invalid Value";
4878 }
4879 }
4880
4881 CTREXPORT friend std::ostream &operator<<(std::ostream &os, GainSchedBehaviorValue data);
4882};
4883
4884/**
4885 * \brief The relationship between two motors in a mechanism. Depending on
4886 * hardware setup, one motor may be inverted relative to the other motor.
4887 */
4889 /** \brief Unique integer value of this MotorAlignmentValue. */
4891
4892 /**
4893 * \brief The two motor directions are aligned. Positive output on both motors
4894 * moves the mechanism forward/backward.
4895 */
4896 static constexpr int Aligned = 0;
4897 /**
4898 * \brief The two motor directions are opposed. To move forward/backward, one
4899 * motor needs positive output, and the other needs negative output.
4900 */
4901 static constexpr int Opposed = 1;
4902
4904 value{value}
4905 {}
4906
4908 value{-1}
4909 {}
4910
4911 constexpr bool operator==(MotorAlignmentValue other) const
4912 {
4913 return value == other.value;
4914 }
4915 constexpr auto operator<=>(MotorAlignmentValue other) const
4916 {
4917 return value <=> other.value;
4918 }
4919
4920 /**
4921 * \brief Gets the string representation of this enum
4922 *
4923 * \returns String representation of this enum
4924 */
4925 constexpr std::string_view ToString() const
4926 {
4927 switch (value) {
4928 case MotorAlignmentValue::Aligned: return "Aligned";
4929 case MotorAlignmentValue::Opposed: return "Opposed";
4930 default: return "Invalid Value";
4931 }
4932 }
4933
4934 CTREXPORT friend std::ostream &operator<<(std::ostream &os, MotorAlignmentValue data);
4935};
4936
4937
4938}
4939}
4940}
#define CTREXPORT
Definition export.h:16
Definition SpnEnums.hpp:16
Definition ExternalFeedbackConfigs.hpp:16
Definition motor_constants.h:14
constexpr bool operator==(AdvancedHallSupportValue other) const
Definition SpnEnums.hpp:2673
constexpr AdvancedHallSupportValue()
Definition SpnEnums.hpp:2669
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2687
static constexpr int Enabled
Requires Phoenix Pro; Talon uses advanced features to improve commutation and velocity measurement wh...
Definition SpnEnums.hpp:2663
static constexpr int Disabled
Talon will utilize hall sensors without advanced features.
Definition SpnEnums.hpp:2656
constexpr auto operator<=>(AdvancedHallSupportValue other) const
Definition SpnEnums.hpp:2677
int value
Unique integer value of this AdvancedHallSupportValue.
Definition SpnEnums.hpp:2651
CTREXPORT friend std::ostream & operator<<(std::ostream &os, AdvancedHallSupportValue data)
constexpr AdvancedHallSupportValue(int value)
Definition SpnEnums.hpp:2665
static constexpr int Rainbow
Rainbow animation.
Definition SpnEnums.hpp:3900
static constexpr int Empty
No animation.
Definition SpnEnums.hpp:3884
constexpr Animation0TypeValue(int value)
Definition SpnEnums.hpp:3922
static constexpr int TwinkleOff
Twinkle off animation.
Definition SpnEnums.hpp:3920
static constexpr int Twinkle
Twinkle animation.
Definition SpnEnums.hpp:3916
constexpr auto operator<=>(Animation0TypeValue other) const
Definition SpnEnums.hpp:3934
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:3944
static constexpr int Larson
Larson animation.
Definition SpnEnums.hpp:3896
static constexpr int SingleFade
Single fade animation.
Definition SpnEnums.hpp:3908
static constexpr int RgbFade
RGB Fade animation.
Definition SpnEnums.hpp:3904
int value
Unique integer value of this Animation0TypeValue.
Definition SpnEnums.hpp:3879
static constexpr int Fire
Fire animation.
Definition SpnEnums.hpp:3892
static constexpr int Strobe
Strobe animation.
Definition SpnEnums.hpp:3912
constexpr Animation0TypeValue()
Definition SpnEnums.hpp:3926
static constexpr int ColorFlow
Color flow animation.
Definition SpnEnums.hpp:3888
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Animation0TypeValue data)
constexpr bool operator==(Animation0TypeValue other) const
Definition SpnEnums.hpp:3930
constexpr Animation1TypeValue()
Definition SpnEnums.hpp:4016
static constexpr int RgbFade
RGB Fade animation.
Definition SpnEnums.hpp:3994
static constexpr int Empty
No animation.
Definition SpnEnums.hpp:3974
int value
Unique integer value of this Animation1TypeValue.
Definition SpnEnums.hpp:3969
static constexpr int Rainbow
Rainbow animation.
Definition SpnEnums.hpp:3990
static constexpr int Fire
Fire animation.
Definition SpnEnums.hpp:3982
static constexpr int TwinkleOff
Twinkle off animation.
Definition SpnEnums.hpp:4010
static constexpr int Twinkle
Twinkle animation.
Definition SpnEnums.hpp:4006
static constexpr int Larson
Larson animation.
Definition SpnEnums.hpp:3986
static constexpr int ColorFlow
Color flow animation.
Definition SpnEnums.hpp:3978
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4034
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Animation1TypeValue data)
constexpr auto operator<=>(Animation1TypeValue other) const
Definition SpnEnums.hpp:4024
static constexpr int SingleFade
Single fade animation.
Definition SpnEnums.hpp:3998
constexpr Animation1TypeValue(int value)
Definition SpnEnums.hpp:4012
constexpr bool operator==(Animation1TypeValue other) const
Definition SpnEnums.hpp:4020
static constexpr int Strobe
Strobe animation.
Definition SpnEnums.hpp:4002
static constexpr int ColorFlow
Color flow animation.
Definition SpnEnums.hpp:4068
static constexpr int RgbFade
RGB Fade animation.
Definition SpnEnums.hpp:4084
static constexpr int Larson
Larson animation.
Definition SpnEnums.hpp:4076
static constexpr int SingleFade
Single fade animation.
Definition SpnEnums.hpp:4088
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4124
static constexpr int TwinkleOff
Twinkle off animation.
Definition SpnEnums.hpp:4100
static constexpr int Fire
Fire animation.
Definition SpnEnums.hpp:4072
static constexpr int Twinkle
Twinkle animation.
Definition SpnEnums.hpp:4096
constexpr Animation2TypeValue(int value)
Definition SpnEnums.hpp:4102
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Animation2TypeValue data)
constexpr bool operator==(Animation2TypeValue other) const
Definition SpnEnums.hpp:4110
int value
Unique integer value of this Animation2TypeValue.
Definition SpnEnums.hpp:4059
static constexpr int Empty
No animation.
Definition SpnEnums.hpp:4064
static constexpr int Strobe
Strobe animation.
Definition SpnEnums.hpp:4092
constexpr Animation2TypeValue()
Definition SpnEnums.hpp:4106
static constexpr int Rainbow
Rainbow animation.
Definition SpnEnums.hpp:4080
constexpr auto operator<=>(Animation2TypeValue other) const
Definition SpnEnums.hpp:4114
static constexpr int Rainbow
Rainbow animation.
Definition SpnEnums.hpp:4170
constexpr auto operator<=>(Animation3TypeValue other) const
Definition SpnEnums.hpp:4204
static constexpr int RgbFade
RGB Fade animation.
Definition SpnEnums.hpp:4174
int value
Unique integer value of this Animation3TypeValue.
Definition SpnEnums.hpp:4149
constexpr Animation3TypeValue()
Definition SpnEnums.hpp:4196
static constexpr int SingleFade
Single fade animation.
Definition SpnEnums.hpp:4178
static constexpr int TwinkleOff
Twinkle off animation.
Definition SpnEnums.hpp:4190
constexpr bool operator==(Animation3TypeValue other) const
Definition SpnEnums.hpp:4200
static constexpr int Larson
Larson animation.
Definition SpnEnums.hpp:4166
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4214
static constexpr int Empty
No animation.
Definition SpnEnums.hpp:4154
static constexpr int Fire
Fire animation.
Definition SpnEnums.hpp:4162
constexpr Animation3TypeValue(int value)
Definition SpnEnums.hpp:4192
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Animation3TypeValue data)
static constexpr int Twinkle
Twinkle animation.
Definition SpnEnums.hpp:4186
static constexpr int ColorFlow
Color flow animation.
Definition SpnEnums.hpp:4158
static constexpr int Strobe
Strobe animation.
Definition SpnEnums.hpp:4182
static constexpr int RgbFade
RGB Fade animation.
Definition SpnEnums.hpp:4264
static constexpr int Rainbow
Rainbow animation.
Definition SpnEnums.hpp:4260
constexpr auto operator<=>(Animation4TypeValue other) const
Definition SpnEnums.hpp:4294
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Animation4TypeValue data)
static constexpr int Twinkle
Twinkle animation.
Definition SpnEnums.hpp:4276
static constexpr int TwinkleOff
Twinkle off animation.
Definition SpnEnums.hpp:4280
constexpr bool operator==(Animation4TypeValue other) const
Definition SpnEnums.hpp:4290
static constexpr int Fire
Fire animation.
Definition SpnEnums.hpp:4252
static constexpr int Empty
No animation.
Definition SpnEnums.hpp:4244
static constexpr int SingleFade
Single fade animation.
Definition SpnEnums.hpp:4268
static constexpr int ColorFlow
Color flow animation.
Definition SpnEnums.hpp:4248
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4304
constexpr Animation4TypeValue()
Definition SpnEnums.hpp:4286
static constexpr int Larson
Larson animation.
Definition SpnEnums.hpp:4256
constexpr Animation4TypeValue(int value)
Definition SpnEnums.hpp:4282
int value
Unique integer value of this Animation4TypeValue.
Definition SpnEnums.hpp:4239
static constexpr int Strobe
Strobe animation.
Definition SpnEnums.hpp:4272
static constexpr int SingleFade
Single fade animation.
Definition SpnEnums.hpp:4358
static constexpr int TwinkleOff
Twinkle off animation.
Definition SpnEnums.hpp:4370
static constexpr int Twinkle
Twinkle animation.
Definition SpnEnums.hpp:4366
constexpr Animation5TypeValue(int value)
Definition SpnEnums.hpp:4372
static constexpr int Rainbow
Rainbow animation.
Definition SpnEnums.hpp:4350
static constexpr int Strobe
Strobe animation.
Definition SpnEnums.hpp:4362
int value
Unique integer value of this Animation5TypeValue.
Definition SpnEnums.hpp:4329
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4394
constexpr bool operator==(Animation5TypeValue other) const
Definition SpnEnums.hpp:4380
static constexpr int Empty
No animation.
Definition SpnEnums.hpp:4334
constexpr auto operator<=>(Animation5TypeValue other) const
Definition SpnEnums.hpp:4384
static constexpr int Larson
Larson animation.
Definition SpnEnums.hpp:4346
static constexpr int Fire
Fire animation.
Definition SpnEnums.hpp:4342
static constexpr int RgbFade
RGB Fade animation.
Definition SpnEnums.hpp:4354
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Animation5TypeValue data)
static constexpr int ColorFlow
Color flow animation.
Definition SpnEnums.hpp:4338
constexpr Animation5TypeValue()
Definition SpnEnums.hpp:4376
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Animation6TypeValue data)
static constexpr int SingleFade
Single fade animation.
Definition SpnEnums.hpp:4448
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4484
constexpr Animation6TypeValue()
Definition SpnEnums.hpp:4466
static constexpr int TwinkleOff
Twinkle off animation.
Definition SpnEnums.hpp:4460
static constexpr int RgbFade
RGB Fade animation.
Definition SpnEnums.hpp:4444
constexpr auto operator<=>(Animation6TypeValue other) const
Definition SpnEnums.hpp:4474
constexpr bool operator==(Animation6TypeValue other) const
Definition SpnEnums.hpp:4470
static constexpr int Twinkle
Twinkle animation.
Definition SpnEnums.hpp:4456
static constexpr int Fire
Fire animation.
Definition SpnEnums.hpp:4432
static constexpr int Empty
No animation.
Definition SpnEnums.hpp:4424
static constexpr int Larson
Larson animation.
Definition SpnEnums.hpp:4436
static constexpr int Rainbow
Rainbow animation.
Definition SpnEnums.hpp:4440
constexpr Animation6TypeValue(int value)
Definition SpnEnums.hpp:4462
static constexpr int Strobe
Strobe animation.
Definition SpnEnums.hpp:4452
int value
Unique integer value of this Animation6TypeValue.
Definition SpnEnums.hpp:4419
static constexpr int ColorFlow
Color flow animation.
Definition SpnEnums.hpp:4428
static constexpr int Rainbow
Rainbow animation.
Definition SpnEnums.hpp:4530
constexpr auto operator<=>(Animation7TypeValue other) const
Definition SpnEnums.hpp:4564
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Animation7TypeValue data)
int value
Unique integer value of this Animation7TypeValue.
Definition SpnEnums.hpp:4509
static constexpr int TwinkleOff
Twinkle off animation.
Definition SpnEnums.hpp:4550
static constexpr int Larson
Larson animation.
Definition SpnEnums.hpp:4526
static constexpr int Fire
Fire animation.
Definition SpnEnums.hpp:4522
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4574
constexpr Animation7TypeValue()
Definition SpnEnums.hpp:4556
static constexpr int ColorFlow
Color flow animation.
Definition SpnEnums.hpp:4518
static constexpr int Twinkle
Twinkle animation.
Definition SpnEnums.hpp:4546
static constexpr int RgbFade
RGB Fade animation.
Definition SpnEnums.hpp:4534
constexpr Animation7TypeValue(int value)
Definition SpnEnums.hpp:4552
static constexpr int Strobe
Strobe animation.
Definition SpnEnums.hpp:4542
constexpr bool operator==(Animation7TypeValue other) const
Definition SpnEnums.hpp:4560
static constexpr int SingleFade
Single fade animation.
Definition SpnEnums.hpp:4538
static constexpr int Empty
No animation.
Definition SpnEnums.hpp:4514
constexpr AnimationDirectionValue()
Definition SpnEnums.hpp:4616
static constexpr int Backward
The animation starts at the specified LED end index and moves towards the LED start index.
Definition SpnEnums.hpp:4610
CTREXPORT friend std::ostream & operator<<(std::ostream &os, AnimationDirectionValue data)
int value
Unique integer value of this AnimationDirectionValue.
Definition SpnEnums.hpp:4599
constexpr AnimationDirectionValue(int value)
Definition SpnEnums.hpp:4612
static constexpr int Forward
The animation starts at the specified LED start index and moves towards the LED end index.
Definition SpnEnums.hpp:4605
constexpr auto operator<=>(AnimationDirectionValue other) const
Definition SpnEnums.hpp:4624
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4634
constexpr bool operator==(AnimationDirectionValue other) const
Definition SpnEnums.hpp:4620
constexpr AppliedRotorPolarityValue(int value)
Definition SpnEnums.hpp:692
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:714
constexpr bool operator==(AppliedRotorPolarityValue other) const
Definition SpnEnums.hpp:700
int value
Unique integer value of this AppliedRotorPolarityValue.
Definition SpnEnums.hpp:681
constexpr AppliedRotorPolarityValue()
Definition SpnEnums.hpp:696
constexpr auto operator<=>(AppliedRotorPolarityValue other) const
Definition SpnEnums.hpp:704
static constexpr int PositiveIsClockwise
Positive motor output results in clockwise motion.
Definition SpnEnums.hpp:690
CTREXPORT friend std::ostream & operator<<(std::ostream &os, AppliedRotorPolarityValue data)
static constexpr int PositiveIsCounterClockwise
Positive motor output results in counter-clockwise motion.
Definition SpnEnums.hpp:686
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2191
static constexpr int BridgeReq_VariableBrake
Variable braking.
Definition SpnEnums.hpp:2167
static constexpr int BridgeReq_FaultCoast
Fault coasting.
Definition SpnEnums.hpp:2159
static constexpr int BridgeReq_FOCEasy
Driving with FOC duty cycle/voltage control.
Definition SpnEnums.hpp:2151
CTREXPORT friend std::ostream & operator<<(std::ostream &os, BridgeOutputValue data)
static constexpr int BridgeReq_Trapez
Driving with non-FOC duty cycle/voltage control.
Definition SpnEnums.hpp:2139
static constexpr int BridgeReq_ActiveBrake
Active braking.
Definition SpnEnums.hpp:2163
constexpr BridgeOutputValue(int value)
Definition SpnEnums.hpp:2169
static constexpr int BridgeReq_MusicTone
Playing music.
Definition SpnEnums.hpp:2147
constexpr auto operator<=>(BridgeOutputValue other) const
Definition SpnEnums.hpp:2181
constexpr bool operator==(BridgeOutputValue other) const
Definition SpnEnums.hpp:2177
static constexpr int BridgeReq_Brake
Braking.
Definition SpnEnums.hpp:2135
static constexpr int BridgeReq_FOCTorque
Driving with FOC torque control.
Definition SpnEnums.hpp:2143
constexpr BridgeOutputValue()
Definition SpnEnums.hpp:2173
int value
Unique integer value of this BridgeOutputValue.
Definition SpnEnums.hpp:2126
static constexpr int BridgeReq_FaultBrake
Fault braking.
Definition SpnEnums.hpp:2155
static constexpr int BridgeReq_Coast
Coasting.
Definition SpnEnums.hpp:2131
int value
Unique integer value of this BrushedMotorWiringValue.
Definition SpnEnums.hpp:3522
constexpr BrushedMotorWiringValue(int value)
Definition SpnEnums.hpp:3561
CTREXPORT friend std::ostream & operator<<(std::ostream &os, BrushedMotorWiringValue data)
static constexpr int Leads_A_and_B
Third party brushed DC motor with two leads.
Definition SpnEnums.hpp:3535
constexpr bool operator==(BrushedMotorWiringValue other) const
Definition SpnEnums.hpp:3569
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:3583
constexpr auto operator<=>(BrushedMotorWiringValue other) const
Definition SpnEnums.hpp:3573
static constexpr int Leads_B_and_C
Third party brushed DC motor with two leads.
Definition SpnEnums.hpp:3559
static constexpr int Leads_A_and_C
Third party brushed DC motor with two leads.
Definition SpnEnums.hpp:3547
constexpr BrushedMotorWiringValue()
Definition SpnEnums.hpp:3565
int value
Unique integer value of this ConnectedMotorValue.
Definition SpnEnums.hpp:2426
static constexpr int Falcon500_Integrated
Talon is attached to an integrated Falcon motor.
Definition SpnEnums.hpp:2435
static constexpr int NEO550_JST
Talon is connected to a third party NEO550 brushless three phase motor.
Definition SpnEnums.hpp:2472
static constexpr int KrakenX44_Integrated
Talon is attached to an integrated Kraken X44 motor.
Definition SpnEnums.hpp:2443
constexpr bool operator==(ConnectedMotorValue other) const
Definition SpnEnums.hpp:2492
static constexpr int Brushed_AC
Talon is connected to a third party brushed DC motor with leads A and C.
Definition SpnEnums.hpp:2458
CTREXPORT friend std::ostream & operator<<(std::ostream &os, ConnectedMotorValue data)
static constexpr int CustomBrushless
Talon is connected to a custom brushless three phase motor.
Definition SpnEnums.hpp:2482
constexpr auto operator<=>(ConnectedMotorValue other) const
Definition SpnEnums.hpp:2496
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2506
static constexpr int NEO_JST
Talon is connected to a third party NEO brushless three phase motor.
Definition SpnEnums.hpp:2467
static constexpr int Brushed_AB
Talon is connected to a third party brushed DC motor with leads A and B.
Definition SpnEnums.hpp:2453
static constexpr int Brushed_BC
Talon is connected to a third party brushed DC motor with leads B and C.
Definition SpnEnums.hpp:2463
constexpr ConnectedMotorValue(int value)
Definition SpnEnums.hpp:2484
static constexpr int Minion_JST
Talon is connected to a CTR Electronics Minion® brushless three phase motor.
Definition SpnEnums.hpp:2448
static constexpr int KrakenX60_Integrated
Talon is attached to an integrated Kraken X60 motor.
Definition SpnEnums.hpp:2439
constexpr ConnectedMotorValue()
Definition SpnEnums.hpp:2488
static constexpr int VORTEX_JST
Talon is connected to a third party VORTEX brushless three phase motor.
Definition SpnEnums.hpp:2477
static constexpr int Unknown
Talon could not determine the type of motor attached.
Definition SpnEnums.hpp:2431
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:794
static constexpr int MotionMagicVoltage
Definition SpnEnums.hpp:747
static constexpr int PositionDutyCycle
Definition SpnEnums.hpp:737
static constexpr int Follower
Definition SpnEnums.hpp:756
static constexpr int MotionMagicExpoDutyCycleFOC
Definition SpnEnums.hpp:767
static constexpr int VelocityVoltage
Definition SpnEnums.hpp:746
static constexpr int VoltageFOC
Definition SpnEnums.hpp:748
static constexpr int MotionMagicDutyCycleFOC
Definition SpnEnums.hpp:743
static constexpr int DutyCycleFOC
Definition SpnEnums.hpp:740
static constexpr int MusicTone
Definition SpnEnums.hpp:760
static constexpr int VelocityDutyCycleFOC
Definition SpnEnums.hpp:742
int value
Unique integer value of this ControlModeValue.
Definition SpnEnums.hpp:731
static constexpr int MotionMagicExpoDutyCycle
Definition SpnEnums.hpp:766
static constexpr int MotionMagicVoltageFOC
Definition SpnEnums.hpp:751
CTREXPORT friend std::ostream & operator<<(std::ostream &os, ControlModeValue data)
static constexpr int CoastOut
Definition SpnEnums.hpp:758
static constexpr int DisabledOutput
Definition SpnEnums.hpp:733
static constexpr int NeutralOut
Definition SpnEnums.hpp:734
static constexpr int MotionMagicVelocityVoltageFOC
Definition SpnEnums.hpp:764
static constexpr int MotionMagicExpoVoltage
Definition SpnEnums.hpp:768
static constexpr int VoltageOut
Definition SpnEnums.hpp:744
static constexpr int MotionMagicExpoTorqueCurrentFOC
Definition SpnEnums.hpp:770
static constexpr int VelocityTorqueCurrentFOC
Definition SpnEnums.hpp:754
static constexpr int MotionMagicExpoVoltageFOC
Definition SpnEnums.hpp:769
constexpr ControlModeValue()
Definition SpnEnums.hpp:776
static constexpr int MotionMagicVelocityVoltage
Definition SpnEnums.hpp:763
static constexpr int MotionMagicVelocityDutyCycle
Definition SpnEnums.hpp:761
static constexpr int PositionVoltage
Definition SpnEnums.hpp:745
constexpr auto operator<=>(ControlModeValue other) const
Definition SpnEnums.hpp:784
static constexpr int PositionTorqueCurrentFOC
Definition SpnEnums.hpp:753
static constexpr int VelocityVoltageFOC
Definition SpnEnums.hpp:750
static constexpr int Reserved
Definition SpnEnums.hpp:757
static constexpr int MotionMagicTorqueCurrentFOC
Definition SpnEnums.hpp:755
static constexpr int PositionVoltageFOC
Definition SpnEnums.hpp:749
static constexpr int MotionMagicDutyCycle
Definition SpnEnums.hpp:739
constexpr bool operator==(ControlModeValue other) const
Definition SpnEnums.hpp:780
static constexpr int PositionDutyCycleFOC
Definition SpnEnums.hpp:741
static constexpr int TorqueCurrentFOC
Definition SpnEnums.hpp:752
static constexpr int UnauthorizedDevice
Definition SpnEnums.hpp:759
static constexpr int StaticBrake
Definition SpnEnums.hpp:735
static constexpr int MotionMagicVelocityTorqueCurrentFOC
Definition SpnEnums.hpp:765
static constexpr int VelocityDutyCycle
Definition SpnEnums.hpp:738
static constexpr int DutyCycleOut
Definition SpnEnums.hpp:736
constexpr ControlModeValue(int value)
Definition SpnEnums.hpp:772
static constexpr int MotionMagicVelocityDutyCycleFOC
Definition SpnEnums.hpp:762
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:574
int value
Unique integer value of this DeviceEnableValue.
Definition SpnEnums.hpp:547
constexpr auto operator<=>(DeviceEnableValue other) const
Definition SpnEnums.hpp:564
static constexpr int Enabled
Definition SpnEnums.hpp:549
constexpr bool operator==(DeviceEnableValue other) const
Definition SpnEnums.hpp:560
constexpr DeviceEnableValue()
Definition SpnEnums.hpp:556
CTREXPORT friend std::ostream & operator<<(std::ostream &os, DeviceEnableValue data)
constexpr DeviceEnableValue(int value)
Definition SpnEnums.hpp:552
static constexpr int Disabled
Definition SpnEnums.hpp:550
constexpr DiffPIDOutput_PIDOutputModeValue()
Definition SpnEnums.hpp:1300
static constexpr int TorqueCurrentFOC
Definition SpnEnums.hpp:1294
constexpr bool operator==(DiffPIDOutput_PIDOutputModeValue other) const
Definition SpnEnums.hpp:1304
constexpr auto operator<=>(DiffPIDOutput_PIDOutputModeValue other) const
Definition SpnEnums.hpp:1308
constexpr DiffPIDOutput_PIDOutputModeValue(int value)
Definition SpnEnums.hpp:1296
static constexpr int Voltage
Definition SpnEnums.hpp:1293
static constexpr int DutyCycle
Definition SpnEnums.hpp:1292
int value
Unique integer value of this DiffPIDOutput_PIDOutputModeValue.
Definition SpnEnums.hpp:1290
CTREXPORT friend std::ostream & operator<<(std::ostream &os, DiffPIDOutput_PIDOutputModeValue data)
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1318
CTREXPORT friend std::ostream & operator<<(std::ostream &os, DiffPIDRefPIDErr_ClosedLoopModeValue data)
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1273
constexpr DiffPIDRefPIDErr_ClosedLoopModeValue()
Definition SpnEnums.hpp:1255
int value
Unique integer value of this DiffPIDRefPIDErr_ClosedLoopModeValue.
Definition SpnEnums.hpp:1246
static constexpr int Velocity
Definition SpnEnums.hpp:1249
constexpr DiffPIDRefPIDErr_ClosedLoopModeValue(int value)
Definition SpnEnums.hpp:1251
constexpr auto operator<=>(DiffPIDRefPIDErr_ClosedLoopModeValue other) const
Definition SpnEnums.hpp:1263
static constexpr int Position
Definition SpnEnums.hpp:1248
constexpr bool operator==(DiffPIDRefPIDErr_ClosedLoopModeValue other) const
Definition SpnEnums.hpp:1259
CTREXPORT friend std::ostream & operator<<(std::ostream &os, DiffPIDRefSlopeECUTime_ClosedLoopModeValue data)
static constexpr int Position
Definition SpnEnums.hpp:1338
constexpr DiffPIDRefSlopeECUTime_ClosedLoopModeValue()
Definition SpnEnums.hpp:1345
constexpr bool operator==(DiffPIDRefSlopeECUTime_ClosedLoopModeValue other) const
Definition SpnEnums.hpp:1349
constexpr DiffPIDRefSlopeECUTime_ClosedLoopModeValue(int value)
Definition SpnEnums.hpp:1341
int value
Unique integer value of this DiffPIDRefSlopeECUTime_ClosedLoopModeValue.
Definition SpnEnums.hpp:1336
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1363
constexpr auto operator<=>(DiffPIDRefSlopeECUTime_ClosedLoopModeValue other) const
Definition SpnEnums.hpp:1353
static constexpr int Velocity
Definition SpnEnums.hpp:1339
static constexpr int MotionMagicVoltage
Definition SpnEnums.hpp:1146
static constexpr int NeutralOut
Definition SpnEnums.hpp:1133
static constexpr int PositionDutyCycle
Definition SpnEnums.hpp:1136
static constexpr int MotionMagicVelocityVoltageFOC
Definition SpnEnums.hpp:1163
static constexpr int VelocityTorqueCurrentFOC
Definition SpnEnums.hpp:1153
static constexpr int MotionMagicVelocityDutyCycleFOC
Definition SpnEnums.hpp:1161
static constexpr int Reserved
Definition SpnEnums.hpp:1156
static constexpr int PositionVoltageFOC
Definition SpnEnums.hpp:1148
static constexpr int MotionMagicTorqueCurrentFOC
Definition SpnEnums.hpp:1154
static constexpr int MotionMagicVelocityDutyCycle
Definition SpnEnums.hpp:1160
static constexpr int VelocityDutyCycleFOC
Definition SpnEnums.hpp:1141
static constexpr int TorqueCurrentFOC
Definition SpnEnums.hpp:1151
static constexpr int MotionMagicExpoDutyCycleFOC
Definition SpnEnums.hpp:1166
static constexpr int VoltageOut
Definition SpnEnums.hpp:1143
static constexpr int VelocityVoltageFOC
Definition SpnEnums.hpp:1149
static constexpr int MotionMagicDutyCycleFOC
Definition SpnEnums.hpp:1142
static constexpr int MusicTone
Definition SpnEnums.hpp:1159
static constexpr int MotionMagicVoltageFOC
Definition SpnEnums.hpp:1150
constexpr bool operator==(DifferentialControlModeValue other) const
Definition SpnEnums.hpp:1179
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1193
static constexpr int MotionMagicExpoTorqueCurrentFOC
Definition SpnEnums.hpp:1169
static constexpr int Follower
Definition SpnEnums.hpp:1155
static constexpr int UnauthorizedDevice
Definition SpnEnums.hpp:1158
static constexpr int MotionMagicExpoVoltage
Definition SpnEnums.hpp:1167
static constexpr int MotionMagicVelocityVoltage
Definition SpnEnums.hpp:1162
static constexpr int MotionMagicExpoDutyCycle
Definition SpnEnums.hpp:1165
static constexpr int DisabledOutput
Definition SpnEnums.hpp:1132
int value
Unique integer value of this DifferentialControlModeValue.
Definition SpnEnums.hpp:1130
static constexpr int VoltageFOC
Definition SpnEnums.hpp:1147
constexpr DifferentialControlModeValue()
Definition SpnEnums.hpp:1175
static constexpr int DutyCycleOut
Definition SpnEnums.hpp:1135
CTREXPORT friend std::ostream & operator<<(std::ostream &os, DifferentialControlModeValue data)
static constexpr int MotionMagicExpoVoltageFOC
Definition SpnEnums.hpp:1168
static constexpr int PositionVoltage
Definition SpnEnums.hpp:1144
static constexpr int StaticBrake
Definition SpnEnums.hpp:1134
static constexpr int PositionTorqueCurrentFOC
Definition SpnEnums.hpp:1152
static constexpr int MotionMagicVelocityTorqueCurrentFOC
Definition SpnEnums.hpp:1164
static constexpr int MotionMagicDutyCycle
Definition SpnEnums.hpp:1138
constexpr auto operator<=>(DifferentialControlModeValue other) const
Definition SpnEnums.hpp:1183
static constexpr int VelocityDutyCycle
Definition SpnEnums.hpp:1137
static constexpr int PositionDutyCycleFOC
Definition SpnEnums.hpp:1140
static constexpr int CoastOut
Definition SpnEnums.hpp:1157
static constexpr int DutyCycleFOC
Definition SpnEnums.hpp:1139
constexpr DifferentialControlModeValue(int value)
Definition SpnEnums.hpp:1171
static constexpr int VelocityVoltage
Definition SpnEnums.hpp:1145
static constexpr int Disabled
Disable differential control.
Definition SpnEnums.hpp:2244
int value
Unique integer value of this DifferentialSensorSourceValue.
Definition SpnEnums.hpp:2239
static constexpr int RemoteCANcoder
Use another CANcoder on the same CAN bus (this also requires setting DifferentialRemoteSensorID).
Definition SpnEnums.hpp:2283
constexpr bool operator==(DifferentialSensorSourceValue other) const
Definition SpnEnums.hpp:2317
CTREXPORT friend std::ostream & operator<<(std::ostream &os, DifferentialSensorSourceValue data)
static constexpr int RemoteCANdiPWM2
Use a pulse-width encoder remotely attached to the Sensor Input 2 (S2IN) on the CTR Electronics' CANd...
Definition SpnEnums.hpp:2299
static constexpr int RemoteCANdiPWM1
Use a pulse-width encoder remotely attached to the Sensor Input 1 (S1IN) on the CTR Electronics' CANd...
Definition SpnEnums.hpp:2291
static constexpr int RemoteTalonFX_HalfDiff
Use another TalonFX on the same CAN bus.
Definition SpnEnums.hpp:2252
static constexpr int RemoteCANdiQuadrature
Use a quadrature encoder remotely attached to the two Sensor Inputs on the CTR Electronics' CANdi™ (t...
Definition SpnEnums.hpp:2307
static constexpr int RemotePigeon2Yaw
Use another Pigeon2 on the same CAN bus (this also requires setting DifferentialRemoteSensorID).
Definition SpnEnums.hpp:2260
static constexpr int RemotePigeon2Roll
Use another Pigeon2 on the same CAN bus (this also requires setting DifferentialRemoteSensorID).
Definition SpnEnums.hpp:2276
constexpr DifferentialSensorSourceValue()
Definition SpnEnums.hpp:2313
constexpr auto operator<=>(DifferentialSensorSourceValue other) const
Definition SpnEnums.hpp:2321
static constexpr int RemotePigeon2Pitch
Use another Pigeon2 on the same CAN bus (this also requires setting DifferentialRemoteSensorID).
Definition SpnEnums.hpp:2268
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2331
constexpr DifferentialSensorSourceValue(int value)
Definition SpnEnums.hpp:2309
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Enable5VRailValue data)
constexpr auto operator<=>(Enable5VRailValue other) const
Definition SpnEnums.hpp:3745
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:3755
static constexpr int Enabled
The 5V rail is enabled, allowing for LED control.
Definition SpnEnums.hpp:3727
static constexpr int Disabled
The 5V rail is disabled.
Definition SpnEnums.hpp:3731
int value
Unique integer value of this Enable5VRailValue.
Definition SpnEnums.hpp:3722
constexpr Enable5VRailValue(int value)
Definition SpnEnums.hpp:3733
constexpr Enable5VRailValue()
Definition SpnEnums.hpp:3737
constexpr bool operator==(Enable5VRailValue other) const
Definition SpnEnums.hpp:3741
static constexpr int RemotePigeon2Yaw
Use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID).
Definition SpnEnums.hpp:3142
static constexpr int RemoteCANdiQuadrature
Use a quadrature encoder remotely attached to the two Sensor Inputs on CANdi™ (this also requires set...
Definition SpnEnums.hpp:3209
int value
Unique integer value of this ExternalFeedbackSensorSourceValue.
Definition SpnEnums.hpp:3123
static constexpr int SyncCANcoder
Requires Phoenix Pro; Talon will synchronize its commutation sensor position against another CANcoder...
Definition SpnEnums.hpp:3176
static constexpr int FusedCANdiPWM2
Requires Phoenix Pro; Talon will fuse a pulse-width encoder remotely attached to the Sensor Input 2 (...
Definition SpnEnums.hpp:3225
constexpr auto operator<=>(ExternalFeedbackSensorSourceValue other) const
Definition SpnEnums.hpp:3270
static constexpr int SyncCANdiPWM1
Requires Phoenix Pro; Talon will synchronize its internal rotor position against the pulse-width enco...
Definition SpnEnums.hpp:3244
CTREXPORT friend std::ostream & operator<<(std::ostream &os, ExternalFeedbackSensorSourceValue data)
static constexpr int FusedCANdiQuadrature
Requires Phoenix Pro; Talon will fuse a qaudrature encoder remotely attached to the two Sensor Inputs...
Definition SpnEnums.hpp:3232
static constexpr int RemoteCANdiPWM1
Use a pulse-width encoder remotely attached to the Sensor Input 1 (S1IN) on CANdi™ (this also require...
Definition SpnEnums.hpp:3194
static constexpr int SyncCANdiPWM2
Requires Phoenix Pro; Talon will synchronize its internal rotor position against the pulse-width enco...
Definition SpnEnums.hpp:3256
constexpr ExternalFeedbackSensorSourceValue()
Definition SpnEnums.hpp:3262
static constexpr int RemotePigeon2Roll
Use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID).
Definition SpnEnums.hpp:3156
static constexpr int Commutation
Use the external sensor used for motor commutation.
Definition SpnEnums.hpp:3128
static constexpr int RemoteCANcoder
Use another CANcoder on the same CAN bus (this also requires setting FeedbackRemoteSensorID).
Definition SpnEnums.hpp:3135
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:3280
constexpr bool operator==(ExternalFeedbackSensorSourceValue other) const
Definition SpnEnums.hpp:3266
static constexpr int FusedCANdiPWM1
Requires Phoenix Pro; Talon will fuse a pulse-width encoder remotely attached to the Sensor Input 1 (...
Definition SpnEnums.hpp:3217
constexpr ExternalFeedbackSensorSourceValue(int value)
Definition SpnEnums.hpp:3258
static constexpr int RemotePigeon2Pitch
Use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID).
Definition SpnEnums.hpp:3149
static constexpr int FusedCANcoder
Requires Phoenix Pro; Talon will fuse another CANcoder's information with the commutation sensor,...
Definition SpnEnums.hpp:3164
static constexpr int RemoteCANdiPWM2
Use a pulse-width encoder remotely attached to the Sensor Input 2 (S2IN) on CANdi™ (this also require...
Definition SpnEnums.hpp:3202
static constexpr int Quadrature
Use a quadrature encoder directly attached to the Talon data port.
Definition SpnEnums.hpp:3181
static constexpr int PulseWidth
Use a pulse-width encoder directly attached to the Talon data port.
Definition SpnEnums.hpp:3186
constexpr auto operator<=>(ExternalMotorTempStatusValue other) const
Definition SpnEnums.hpp:888
static constexpr int Normal
Temperature sensor is normal.
Definition SpnEnums.hpp:864
static constexpr int Collecting
Talon is collecting information on the sensor.
Definition SpnEnums.hpp:852
static constexpr int NotUsed
Temperature sensor is present but is not used.
Definition SpnEnums.hpp:869
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:898
static constexpr int TooHot
Temperature sensor is too hot to allow motor operation.
Definition SpnEnums.hpp:860
static constexpr int WrongMotorOrShorted
Temperature sensor appears to be for the wrong motor arrangement, or signals are shorted.
Definition SpnEnums.hpp:874
static constexpr int Disconnected
Temperature sensor appears to be disconnected.
Definition SpnEnums.hpp:856
CTREXPORT friend std::ostream & operator<<(std::ostream &os, ExternalMotorTempStatusValue data)
int value
Unique integer value of this ExternalMotorTempStatusValue.
Definition SpnEnums.hpp:847
constexpr ExternalMotorTempStatusValue(int value)
Definition SpnEnums.hpp:876
constexpr bool operator==(ExternalMotorTempStatusValue other) const
Definition SpnEnums.hpp:884
constexpr ExternalMotorTempStatusValue()
Definition SpnEnums.hpp:880
constexpr FeedbackSensorSourceValue(int value)
Definition SpnEnums.hpp:1706
static constexpr int RemoteCANcoder
Use another CANcoder on the same CAN bus (this also requires setting FeedbackRemoteSensorID).
Definition SpnEnums.hpp:1592
static constexpr int FusedCANdiQuadrature
Requires Phoenix Pro; Talon will fuse a qaudrature encoder remotely attached to the two Sensor Inputs...
Definition SpnEnums.hpp:1680
static constexpr int RemotePigeon2Pitch
Use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID).
Definition SpnEnums.hpp:1606
static constexpr int RemotePigeon2Yaw
Use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID).
Definition SpnEnums.hpp:1599
constexpr bool operator==(FeedbackSensorSourceValue other) const
Definition SpnEnums.hpp:1714
static constexpr int SyncCANdiPWM2
Requires Phoenix Pro; Talon will synchronize its internal rotor position against the pulse-width enco...
Definition SpnEnums.hpp:1704
static constexpr int RemoteCANdiPWM2
Use a pulse-width encoder remotely attached to the Sensor Input 2 (S2IN) on the CTR Electronics' CANd...
Definition SpnEnums.hpp:1649
constexpr FeedbackSensorSourceValue()
Definition SpnEnums.hpp:1710
static constexpr int RemoteCANdiQuadrature
Use a quadrature encoder remotely attached to the two Sensor Inputs on the CTR Electronics' CANdi™ (t...
Definition SpnEnums.hpp:1657
CTREXPORT friend std::ostream & operator<<(std::ostream &os, FeedbackSensorSourceValue data)
constexpr auto operator<=>(FeedbackSensorSourceValue other) const
Definition SpnEnums.hpp:1718
int value
Unique integer value of this FeedbackSensorSourceValue.
Definition SpnEnums.hpp:1580
static constexpr int SyncCANdiPWM1
Requires Phoenix Pro; Talon will synchronize its internal rotor position against the pulse-width enco...
Definition SpnEnums.hpp:1692
static constexpr int SyncCANcoder
Requires Phoenix Pro; Talon will synchronize its internal rotor position against another CANcoder,...
Definition SpnEnums.hpp:1633
static constexpr int RemoteCANdiPWM1
Use a pulse-width encoder remotely attached to the Sensor Input 1 (S1IN) on the CTR Electronics' CANd...
Definition SpnEnums.hpp:1641
static constexpr int FusedCANdiPWM1
Requires Phoenix Pro; Talon will fuse a pulse-width encoder remotely attached to the Sensor Input 1 (...
Definition SpnEnums.hpp:1665
static constexpr int RotorSensor
Use the internal rotor sensor in the Talon.
Definition SpnEnums.hpp:1585
static constexpr int FusedCANcoder
Requires Phoenix Pro; Talon will fuse another CANcoder's information with the internal rotor,...
Definition SpnEnums.hpp:1621
static constexpr int FusedCANdiPWM2
Requires Phoenix Pro; Talon will fuse a pulse-width encoder remotely attached to the Sensor Input 2 (...
Definition SpnEnums.hpp:1673
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1728
static constexpr int RemotePigeon2Roll
Use another Pigeon2 on the same CAN bus (this also requires setting FeedbackRemoteSensorID).
Definition SpnEnums.hpp:1613
static constexpr int LimitSwitchPin
Use the forward limit switch pin on the limit switch connector.
Definition SpnEnums.hpp:1822
static constexpr int RemoteCANdiS1
Use another CTR Electronics' CANdi™ on the same CAN bus (this also requires setting ForwardLimitRemot...
Definition SpnEnums.hpp:1852
static constexpr int RemoteTalonFX
Use the forward limit switch attached to another Talon FX on the same CAN bus (this also requires set...
Definition SpnEnums.hpp:1827
constexpr auto operator<=>(ForwardLimitSourceValue other) const
Definition SpnEnums.hpp:1877
constexpr ForwardLimitSourceValue(int value)
Definition SpnEnums.hpp:1865
constexpr ForwardLimitSourceValue()
Definition SpnEnums.hpp:1869
CTREXPORT friend std::ostream & operator<<(std::ostream &os, ForwardLimitSourceValue data)
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1887
static constexpr int RemoteCANifier
Use the forward limit switch attached to another CANifier on the same CAN bus (this also requires set...
Definition SpnEnums.hpp:1832
constexpr bool operator==(ForwardLimitSourceValue other) const
Definition SpnEnums.hpp:1873
static constexpr int RemoteCANdiS2
Use another CTR Electronics' CANdi™ on the same CAN bus (this also requires setting ForwardLimitRemot...
Definition SpnEnums.hpp:1859
int value
Unique integer value of this ForwardLimitSourceValue.
Definition SpnEnums.hpp:1817
static constexpr int Disabled
Disable the forward limit switch.
Definition SpnEnums.hpp:1863
static constexpr int RemoteCANrange
Use another CANrange on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).
Definition SpnEnums.hpp:1845
static constexpr int RemoteCANcoder
Use another CANcoder on the same CAN bus (this also requires setting ForwardLimitRemoteSensorID).
Definition SpnEnums.hpp:1839
constexpr bool operator==(ForwardLimitTypeValue other) const
Definition SpnEnums.hpp:1772
static constexpr int NormallyClosed
Definition SpnEnums.hpp:1762
constexpr ForwardLimitTypeValue()
Definition SpnEnums.hpp:1768
constexpr ForwardLimitTypeValue(int value)
Definition SpnEnums.hpp:1764
constexpr auto operator<=>(ForwardLimitTypeValue other) const
Definition SpnEnums.hpp:1776
static constexpr int NormallyOpen
Definition SpnEnums.hpp:1761
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1786
CTREXPORT friend std::ostream & operator<<(std::ostream &os, ForwardLimitTypeValue data)
int value
Unique integer value of this ForwardLimitTypeValue.
Definition SpnEnums.hpp:1759
CTREXPORT friend std::ostream & operator<<(std::ostream &os, ForwardLimitValue data)
constexpr ForwardLimitValue(int value)
Definition SpnEnums.hpp:596
static constexpr int ClosedToGround
Definition SpnEnums.hpp:593
constexpr ForwardLimitValue()
Definition SpnEnums.hpp:600
constexpr bool operator==(ForwardLimitValue other) const
Definition SpnEnums.hpp:604
constexpr auto operator<=>(ForwardLimitValue other) const
Definition SpnEnums.hpp:608
int value
Unique integer value of this ForwardLimitValue.
Definition SpnEnums.hpp:591
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:618
static constexpr int Open
Definition SpnEnums.hpp:594
constexpr auto operator<=>(FrcLockValue other) const
Definition SpnEnums.hpp:252
static constexpr int Frc_Locked
Definition SpnEnums.hpp:237
CTREXPORT friend std::ostream & operator<<(std::ostream &os, FrcLockValue data)
constexpr FrcLockValue(int value)
Definition SpnEnums.hpp:240
static constexpr int Frc_Unlocked
Definition SpnEnums.hpp:238
int value
Unique integer value of this FrcLockValue.
Definition SpnEnums.hpp:235
constexpr FrcLockValue()
Definition SpnEnums.hpp:244
constexpr bool operator==(FrcLockValue other) const
Definition SpnEnums.hpp:248
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:262
constexpr GainSchedBehaviorValue(int value)
Definition SpnEnums.hpp:4847
static constexpr int Inactive
No gain scheduling will occur.
Definition SpnEnums.hpp:4828
CTREXPORT friend std::ostream & operator<<(std::ostream &os, GainSchedBehaviorValue data)
static constexpr int UseSlot0
Switch to Slot 0 while within the configured GainSchedErrorThreshold.
Definition SpnEnums.hpp:4837
constexpr auto operator<=>(GainSchedBehaviorValue other) const
Definition SpnEnums.hpp:4859
static constexpr int ZeroOutput
The output of the PID controller will be completely zeroed, except for kG and the user FeedForward co...
Definition SpnEnums.hpp:4833
constexpr bool operator==(GainSchedBehaviorValue other) const
Definition SpnEnums.hpp:4855
int value
Unique integer value of this GainSchedBehaviorValue.
Definition SpnEnums.hpp:4823
static constexpr int UseSlot1
Switch to Slot 1 while within the configured GainSchedErrorThreshold.
Definition SpnEnums.hpp:4841
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4869
constexpr GainSchedBehaviorValue()
Definition SpnEnums.hpp:4851
static constexpr int UseSlot2
Switch to Slot 2 while within the configured GainSchedErrorThreshold.
Definition SpnEnums.hpp:4845
static constexpr int Discontinuous
The gain scheduler will allow for a discontinuity in the kP output.
Definition SpnEnums.hpp:4777
constexpr bool operator==(GainSchedKpBehaviorValue other) const
Definition SpnEnums.hpp:4787
static constexpr int Continuous
The gain scheduler will maintain continuity in the kP output as the error crosses the gain threshold.
Definition SpnEnums.hpp:4771
int value
Unique integer value of this GainSchedKpBehaviorValue.
Definition SpnEnums.hpp:4763
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4801
constexpr GainSchedKpBehaviorValue()
Definition SpnEnums.hpp:4783
constexpr auto operator<=>(GainSchedKpBehaviorValue other) const
Definition SpnEnums.hpp:4791
constexpr GainSchedKpBehaviorValue(int value)
Definition SpnEnums.hpp:4779
CTREXPORT friend std::ostream & operator<<(std::ostream &os, GainSchedKpBehaviorValue data)
constexpr bool operator==(GravityTypeValue other) const
Definition SpnEnums.hpp:1419
constexpr GravityTypeValue()
Definition SpnEnums.hpp:1415
constexpr auto operator<=>(GravityTypeValue other) const
Definition SpnEnums.hpp:1423
constexpr GravityTypeValue(int value)
Definition SpnEnums.hpp:1411
static constexpr int Elevator_Static
The system's gravity feedforward is constant, such as an elevator.
Definition SpnEnums.hpp:1400
int value
Unique integer value of this GravityTypeValue.
Definition SpnEnums.hpp:1394
CTREXPORT friend std::ostream & operator<<(std::ostream &os, GravityTypeValue data)
static constexpr int Arm_Cosine
The system's gravity feedback is dependent on the angular position of the mechanism,...
Definition SpnEnums.hpp:1409
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1433
CTREXPORT friend std::ostream & operator<<(std::ostream &os, InvertedValue data)
static constexpr int CounterClockwise_Positive
Positive motor output results in counter-clockwise motion.
Definition SpnEnums.hpp:1455
constexpr InvertedValue(int value)
Definition SpnEnums.hpp:1461
int value
Unique integer value of this InvertedValue.
Definition SpnEnums.hpp:1450
constexpr bool operator==(InvertedValue other) const
Definition SpnEnums.hpp:1469
static constexpr int Clockwise_Positive
Positive motor output results in clockwise motion.
Definition SpnEnums.hpp:1459
constexpr InvertedValue()
Definition SpnEnums.hpp:1465
constexpr auto operator<=>(InvertedValue other) const
Definition SpnEnums.hpp:1473
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1483
static constexpr int NotLicensed
Definition SpnEnums.hpp:98
int value
Unique integer value of this IsPROLicensedValue.
Definition SpnEnums.hpp:96
static constexpr int Licensed
Definition SpnEnums.hpp:99
constexpr auto operator<=>(IsPROLicensedValue other) const
Definition SpnEnums.hpp:113
constexpr IsPROLicensedValue(int value)
Definition SpnEnums.hpp:101
constexpr IsPROLicensedValue()
Definition SpnEnums.hpp:105
CTREXPORT friend std::ostream & operator<<(std::ostream &os, IsPROLicensedValue data)
constexpr bool operator==(IsPROLicensedValue other) const
Definition SpnEnums.hpp:109
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:123
static constexpr int Back
The animation bounces once all LEDs are off the strip.
Definition SpnEnums.hpp:4666
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4690
static constexpr int Center
The animation bounces once it is midway through the end of the strip.
Definition SpnEnums.hpp:4662
int value
Unique integer value of this LarsonBounceValue.
Definition SpnEnums.hpp:4652
constexpr LarsonBounceValue()
Definition SpnEnums.hpp:4672
static constexpr int Front
The animation bounces as soon as the first LED reaches the end of the strip.
Definition SpnEnums.hpp:4658
constexpr bool operator==(LarsonBounceValue other) const
Definition SpnEnums.hpp:4676
constexpr LarsonBounceValue(int value)
Definition SpnEnums.hpp:4668
CTREXPORT friend std::ostream & operator<<(std::ostream &os, LarsonBounceValue data)
constexpr auto operator<=>(LarsonBounceValue other) const
Definition SpnEnums.hpp:4680
constexpr auto operator<=>(Led1OffColorValue other) const
Definition SpnEnums.hpp:402
constexpr Led1OffColorValue()
Definition SpnEnums.hpp:394
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:412
static constexpr int Orange
Definition SpnEnums.hpp:384
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Led1OffColorValue data)
constexpr bool operator==(Led1OffColorValue other) const
Definition SpnEnums.hpp:398
static constexpr int Red
Definition SpnEnums.hpp:382
static constexpr int White
Definition SpnEnums.hpp:388
static constexpr int Off
Definition SpnEnums.hpp:381
static constexpr int Blue
Definition SpnEnums.hpp:385
static constexpr int Cyan
Definition SpnEnums.hpp:387
int value
Unique integer value of this Led1OffColorValue.
Definition SpnEnums.hpp:379
static constexpr int Pink
Definition SpnEnums.hpp:386
constexpr Led1OffColorValue(int value)
Definition SpnEnums.hpp:390
static constexpr int Green
Definition SpnEnums.hpp:383
constexpr bool operator==(Led1OnColorValue other) const
Definition SpnEnums.hpp:342
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:356
static constexpr int Cyan
Definition SpnEnums.hpp:331
constexpr Led1OnColorValue()
Definition SpnEnums.hpp:338
static constexpr int Pink
Definition SpnEnums.hpp:330
constexpr Led1OnColorValue(int value)
Definition SpnEnums.hpp:334
constexpr auto operator<=>(Led1OnColorValue other) const
Definition SpnEnums.hpp:346
static constexpr int Blue
Definition SpnEnums.hpp:329
static constexpr int White
Definition SpnEnums.hpp:332
static constexpr int Green
Definition SpnEnums.hpp:327
static constexpr int Red
Definition SpnEnums.hpp:326
static constexpr int Off
Definition SpnEnums.hpp:325
static constexpr int Orange
Definition SpnEnums.hpp:328
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Led1OnColorValue data)
int value
Unique integer value of this Led1OnColorValue.
Definition SpnEnums.hpp:323
static constexpr int Pink
Definition SpnEnums.hpp:498
static constexpr int Red
Definition SpnEnums.hpp:494
static constexpr int Blue
Definition SpnEnums.hpp:497
constexpr Led2OffColorValue()
Definition SpnEnums.hpp:506
static constexpr int Cyan
Definition SpnEnums.hpp:499
int value
Unique integer value of this Led2OffColorValue.
Definition SpnEnums.hpp:491
static constexpr int Off
Definition SpnEnums.hpp:493
constexpr auto operator<=>(Led2OffColorValue other) const
Definition SpnEnums.hpp:514
static constexpr int White
Definition SpnEnums.hpp:500
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:524
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Led2OffColorValue data)
constexpr Led2OffColorValue(int value)
Definition SpnEnums.hpp:502
constexpr bool operator==(Led2OffColorValue other) const
Definition SpnEnums.hpp:510
static constexpr int Orange
Definition SpnEnums.hpp:496
static constexpr int Green
Definition SpnEnums.hpp:495
static constexpr int Red
Definition SpnEnums.hpp:438
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:468
static constexpr int Green
Definition SpnEnums.hpp:439
static constexpr int Pink
Definition SpnEnums.hpp:442
static constexpr int Cyan
Definition SpnEnums.hpp:443
constexpr bool operator==(Led2OnColorValue other) const
Definition SpnEnums.hpp:454
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Led2OnColorValue data)
constexpr auto operator<=>(Led2OnColorValue other) const
Definition SpnEnums.hpp:458
static constexpr int Blue
Definition SpnEnums.hpp:441
static constexpr int Orange
Definition SpnEnums.hpp:440
static constexpr int White
Definition SpnEnums.hpp:444
static constexpr int Off
Definition SpnEnums.hpp:437
int value
Unique integer value of this Led2OnColorValue.
Definition SpnEnums.hpp:435
constexpr Led2OnColorValue(int value)
Definition SpnEnums.hpp:446
constexpr Led2OnColorValue()
Definition SpnEnums.hpp:450
static constexpr int NotLicensed
Definition SpnEnums.hpp:142
CTREXPORT friend std::ostream & operator<<(std::ostream &os, Licensing_IsSeasonPassedValue data)
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:167
constexpr bool operator==(Licensing_IsSeasonPassedValue other) const
Definition SpnEnums.hpp:153
constexpr Licensing_IsSeasonPassedValue()
Definition SpnEnums.hpp:149
constexpr auto operator<=>(Licensing_IsSeasonPassedValue other) const
Definition SpnEnums.hpp:157
constexpr Licensing_IsSeasonPassedValue(int value)
Definition SpnEnums.hpp:145
int value
Unique integer value of this Licensing_IsSeasonPassedValue.
Definition SpnEnums.hpp:140
static constexpr int Licensed
Definition SpnEnums.hpp:143
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:3704
static constexpr int DisableLEDs
LEDs and animations are disabled after the control signal is lost.
Definition SpnEnums.hpp:3680
CTREXPORT friend std::ostream & operator<<(std::ostream &os, LossOfSignalBehaviorValue data)
constexpr auto operator<=>(LossOfSignalBehaviorValue other) const
Definition SpnEnums.hpp:3694
static constexpr int KeepRunning
LEDs remain enabled, and animations continue to run.
Definition SpnEnums.hpp:3676
constexpr LossOfSignalBehaviorValue()
Definition SpnEnums.hpp:3686
constexpr LossOfSignalBehaviorValue(int value)
Definition SpnEnums.hpp:3682
int value
Unique integer value of this LossOfSignalBehaviorValue.
Definition SpnEnums.hpp:3671
constexpr bool operator==(LossOfSignalBehaviorValue other) const
Definition SpnEnums.hpp:3690
static constexpr int Magnet_Orange
Magnet health is adequate but with reduced accuracy.
Definition SpnEnums.hpp:2075
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2107
static constexpr int Magnet_Red
The magnet is too close or too far from the CANcoder.
Definition SpnEnums.hpp:2071
static constexpr int Magnet_Green
Magnet health is ideal.
Definition SpnEnums.hpp:2079
CTREXPORT friend std::ostream & operator<<(std::ostream &os, MagnetHealthValue data)
constexpr MagnetHealthValue()
Definition SpnEnums.hpp:2089
int value
Unique integer value of this MagnetHealthValue.
Definition SpnEnums.hpp:2066
static constexpr int Magnet_Invalid
The accuracy cannot be determined.
Definition SpnEnums.hpp:2083
constexpr MagnetHealthValue(int value)
Definition SpnEnums.hpp:2085
constexpr auto operator<=>(MagnetHealthValue other) const
Definition SpnEnums.hpp:2097
constexpr bool operator==(MagnetHealthValue other) const
Definition SpnEnums.hpp:2093
static constexpr int Good
Measurement is good.
Definition SpnEnums.hpp:2538
constexpr MeasurementHealthValue(int value)
Definition SpnEnums.hpp:2549
CTREXPORT friend std::ostream & operator<<(std::ostream &os, MeasurementHealthValue data)
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2571
static constexpr int Limited
Measurement is likely okay, but the target is either very far away or moving very quickly.
Definition SpnEnums.hpp:2543
constexpr auto operator<=>(MeasurementHealthValue other) const
Definition SpnEnums.hpp:2561
constexpr bool operator==(MeasurementHealthValue other) const
Definition SpnEnums.hpp:2557
static constexpr int Bad
Measurement is compromised.
Definition SpnEnums.hpp:2547
constexpr MeasurementHealthValue()
Definition SpnEnums.hpp:2553
int value
Unique integer value of this MeasurementHealthValue.
Definition SpnEnums.hpp:2533
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4925
static constexpr int Opposed
The two motor directions are opposed.
Definition SpnEnums.hpp:4901
constexpr bool operator==(MotorAlignmentValue other) const
Definition SpnEnums.hpp:4911
constexpr auto operator<=>(MotorAlignmentValue other) const
Definition SpnEnums.hpp:4915
constexpr MotorAlignmentValue(int value)
Definition SpnEnums.hpp:4903
int value
Unique integer value of this MotorAlignmentValue.
Definition SpnEnums.hpp:4890
constexpr MotorAlignmentValue()
Definition SpnEnums.hpp:4907
CTREXPORT friend std::ostream & operator<<(std::ostream &os, MotorAlignmentValue data)
static constexpr int Aligned
The two motor directions are aligned.
Definition SpnEnums.hpp:4896
int value
Unique integer value of this MotorArrangementValue.
Definition SpnEnums.hpp:2711
static constexpr int NEO_JST
Third party NEO brushless three phase motor (~6000 RPM at 12V).
Definition SpnEnums.hpp:2754
static constexpr int CustomBrushless
Third party custom brushless three phase motor.
Definition SpnEnums.hpp:2795
static constexpr int NEO550_JST
Third party NEO550 brushless three phase motor (~11000 RPM at 12V).
Definition SpnEnums.hpp:2766
constexpr bool operator==(MotorArrangementValue other) const
Definition SpnEnums.hpp:2805
static constexpr int Brushed_DC
Third party brushed DC motor with two leads.
Definition SpnEnums.hpp:2742
static constexpr int Minion_JST
CTR Electronics Minion® brushless three phase motor.
Definition SpnEnums.hpp:2730
constexpr MotorArrangementValue(int value)
Definition SpnEnums.hpp:2797
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2819
static constexpr int VORTEX_JST
Third party VORTEX brushless three phase motor.
Definition SpnEnums.hpp:2778
constexpr auto operator<=>(MotorArrangementValue other) const
Definition SpnEnums.hpp:2809
CTREXPORT friend std::ostream & operator<<(std::ostream &os, MotorArrangementValue data)
constexpr MotorArrangementValue()
Definition SpnEnums.hpp:2801
static constexpr int Disabled
Motor is not selected.
Definition SpnEnums.hpp:2718
CTREXPORT friend std::ostream & operator<<(std::ostream &os, MotorOutputStatusValue data)
constexpr MotorOutputStatusValue()
Definition SpnEnums.hpp:1091
static constexpr int RegenBraking
The motor is braking in such a way where motor current is traveling back to the supply (typically a b...
Definition SpnEnums.hpp:1085
static constexpr int Off
Motor output is disabled.
Definition SpnEnums.hpp:1065
static constexpr int Motoring
The motor is loaded in a typical fashion, drawing current from the supply, and successfully turning t...
Definition SpnEnums.hpp:1075
constexpr MotorOutputStatusValue(int value)
Definition SpnEnums.hpp:1087
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1109
constexpr bool operator==(MotorOutputStatusValue other) const
Definition SpnEnums.hpp:1095
constexpr auto operator<=>(MotorOutputStatusValue other) const
Definition SpnEnums.hpp:1099
static constexpr int StaticBraking
The motor is in neutral-brake.
Definition SpnEnums.hpp:1069
int value
Unique integer value of this MotorOutputStatusValue.
Definition SpnEnums.hpp:1056
static constexpr int Unknown
The status of motor output could not be determined.
Definition SpnEnums.hpp:1061
static constexpr int DiscordantMotoring
The same as Motoring, except the rotor is being backdriven as the motor output is not enough to defea...
Definition SpnEnums.hpp:1080
constexpr NeutralModeValue(int value)
Definition SpnEnums.hpp:1506
constexpr auto operator<=>(NeutralModeValue other) const
Definition SpnEnums.hpp:1518
CTREXPORT friend std::ostream & operator<<(std::ostream &os, NeutralModeValue data)
static constexpr int Brake
Definition SpnEnums.hpp:1504
constexpr NeutralModeValue()
Definition SpnEnums.hpp:1510
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1528
int value
Unique integer value of this NeutralModeValue.
Definition SpnEnums.hpp:1501
static constexpr int Coast
Definition SpnEnums.hpp:1503
constexpr bool operator==(NeutralModeValue other) const
Definition SpnEnums.hpp:1514
constexpr auto operator<=>(PIDOutput_PIDOutputModeValue other) const
Definition SpnEnums.hpp:981
static constexpr int TorqueCurrentFOC
Definition SpnEnums.hpp:967
constexpr bool operator==(PIDOutput_PIDOutputModeValue other) const
Definition SpnEnums.hpp:977
constexpr PIDOutput_PIDOutputModeValue(int value)
Definition SpnEnums.hpp:969
static constexpr int Voltage
Definition SpnEnums.hpp:966
constexpr PIDOutput_PIDOutputModeValue()
Definition SpnEnums.hpp:973
CTREXPORT friend std::ostream & operator<<(std::ostream &os, PIDOutput_PIDOutputModeValue data)
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:991
static constexpr int DutyCycle
Definition SpnEnums.hpp:965
int value
Unique integer value of this PIDOutput_PIDOutputModeValue.
Definition SpnEnums.hpp:963
static constexpr int Position
Definition SpnEnums.hpp:921
constexpr PIDRefPIDErr_ClosedLoopModeValue()
Definition SpnEnums.hpp:928
constexpr auto operator<=>(PIDRefPIDErr_ClosedLoopModeValue other) const
Definition SpnEnums.hpp:936
CTREXPORT friend std::ostream & operator<<(std::ostream &os, PIDRefPIDErr_ClosedLoopModeValue data)
constexpr PIDRefPIDErr_ClosedLoopModeValue(int value)
Definition SpnEnums.hpp:924
int value
Unique integer value of this PIDRefPIDErr_ClosedLoopModeValue.
Definition SpnEnums.hpp:919
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:946
static constexpr int Velocity
Definition SpnEnums.hpp:922
constexpr bool operator==(PIDRefPIDErr_ClosedLoopModeValue other) const
Definition SpnEnums.hpp:932
CTREXPORT friend std::ostream & operator<<(std::ostream &os, PIDRefSlopeECUTime_ClosedLoopModeValue data)
constexpr PIDRefSlopeECUTime_ClosedLoopModeValue()
Definition SpnEnums.hpp:1018
constexpr bool operator==(PIDRefSlopeECUTime_ClosedLoopModeValue other) const
Definition SpnEnums.hpp:1022
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1036
static constexpr int Velocity
Definition SpnEnums.hpp:1012
constexpr PIDRefSlopeECUTime_ClosedLoopModeValue(int value)
Definition SpnEnums.hpp:1014
static constexpr int Position
Definition SpnEnums.hpp:1011
constexpr auto operator<=>(PIDRefSlopeECUTime_ClosedLoopModeValue other) const
Definition SpnEnums.hpp:1026
int value
Unique integer value of this PIDRefSlopeECUTime_ClosedLoopModeValue.
Definition SpnEnums.hpp:1009
static constexpr int RemoteCANdiS2
Use another CTR Electronics' CANdi™ on the same CAN bus (this also requires setting ForwardLimitRemot...
Definition SpnEnums.hpp:2011
static constexpr int RemoteTalonFX
Use the reverse limit switch attached to another Talon FX on the same CAN bus (this also requires set...
Definition SpnEnums.hpp:1979
constexpr ReverseLimitSourceValue(int value)
Definition SpnEnums.hpp:2017
static constexpr int RemoteCANrange
Use another CANrange on the same CAN bus (this also requires setting ReverseLimitRemoteSensorID).
Definition SpnEnums.hpp:1997
static constexpr int RemoteCANcoder
Use another CANcoder on the same CAN bus (this also requires setting ReverseLimitRemoteSensorID).
Definition SpnEnums.hpp:1991
static constexpr int RemoteCANdiS1
Use another CTR Electronics' CANdi™ on the same CAN bus (this also requires setting ForwardLimitRemot...
Definition SpnEnums.hpp:2004
int value
Unique integer value of this ReverseLimitSourceValue.
Definition SpnEnums.hpp:1969
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2039
static constexpr int RemoteCANifier
Use the reverse limit switch attached to another CANifier on the same CAN bus (this also requires set...
Definition SpnEnums.hpp:1984
constexpr auto operator<=>(ReverseLimitSourceValue other) const
Definition SpnEnums.hpp:2029
static constexpr int LimitSwitchPin
Use the reverse limit switch pin on the limit switch connector.
Definition SpnEnums.hpp:1974
constexpr bool operator==(ReverseLimitSourceValue other) const
Definition SpnEnums.hpp:2025
constexpr ReverseLimitSourceValue()
Definition SpnEnums.hpp:2021
CTREXPORT friend std::ostream & operator<<(std::ostream &os, ReverseLimitSourceValue data)
static constexpr int Disabled
Disable the reverse limit switch.
Definition SpnEnums.hpp:2015
static constexpr int NormallyClosed
Definition SpnEnums.hpp:1914
constexpr auto operator<=>(ReverseLimitTypeValue other) const
Definition SpnEnums.hpp:1928
CTREXPORT friend std::ostream & operator<<(std::ostream &os, ReverseLimitTypeValue data)
constexpr ReverseLimitTypeValue()
Definition SpnEnums.hpp:1920
static constexpr int NormallyOpen
Definition SpnEnums.hpp:1913
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:1938
int value
Unique integer value of this ReverseLimitTypeValue.
Definition SpnEnums.hpp:1911
constexpr ReverseLimitTypeValue(int value)
Definition SpnEnums.hpp:1916
constexpr bool operator==(ReverseLimitTypeValue other) const
Definition SpnEnums.hpp:1924
constexpr auto operator<=>(ReverseLimitValue other) const
Definition SpnEnums.hpp:652
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:662
static constexpr int Open
Definition SpnEnums.hpp:638
int value
Unique integer value of this ReverseLimitValue.
Definition SpnEnums.hpp:635
CTREXPORT friend std::ostream & operator<<(std::ostream &os, ReverseLimitValue data)
static constexpr int ClosedToGround
Definition SpnEnums.hpp:637
constexpr ReverseLimitValue()
Definition SpnEnums.hpp:644
constexpr bool operator==(ReverseLimitValue other) const
Definition SpnEnums.hpp:648
constexpr ReverseLimitValue(int value)
Definition SpnEnums.hpp:640
constexpr auto operator<=>(RobotEnableValue other) const
Definition SpnEnums.hpp:296
static constexpr int Disabled
Definition SpnEnums.hpp:282
constexpr bool operator==(RobotEnableValue other) const
Definition SpnEnums.hpp:292
constexpr RobotEnableValue(int value)
Definition SpnEnums.hpp:284
constexpr RobotEnableValue()
Definition SpnEnums.hpp:288
static constexpr int Enabled
Definition SpnEnums.hpp:281
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:306
CTREXPORT friend std::ostream & operator<<(std::ostream &os, RobotEnableValue data)
int value
Unique integer value of this RobotEnableValue.
Definition SpnEnums.hpp:279
int value
Unique integer value of this S1CloseStateValue.
Definition SpnEnums.hpp:3377
constexpr auto operator<=>(S1CloseStateValue other) const
Definition SpnEnums.hpp:3416
static constexpr int CloseWhenNotHigh
The S1 input will be treated as closed when it is not High.
Definition SpnEnums.hpp:3390
static constexpr int CloseWhenNotFloating
The S1 input will be treated as closed when it is not floating.
Definition SpnEnums.hpp:3382
static constexpr int CloseWhenFloating
The S1 input will be treated as closed when it is floating.
Definition SpnEnums.hpp:3386
static constexpr int CloseWhenNotLow
The S1 input will be treated as closed when it is not Low.
Definition SpnEnums.hpp:3398
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:3426
static constexpr int CloseWhenLow
The S1 input will be treated as closed when it is Low.
Definition SpnEnums.hpp:3402
constexpr S1CloseStateValue(int value)
Definition SpnEnums.hpp:3404
CTREXPORT friend std::ostream & operator<<(std::ostream &os, S1CloseStateValue data)
constexpr S1CloseStateValue()
Definition SpnEnums.hpp:3408
static constexpr int CloseWhenHigh
The S1 input will be treated as closed when it is High.
Definition SpnEnums.hpp:3394
constexpr bool operator==(S1CloseStateValue other) const
Definition SpnEnums.hpp:3412
constexpr bool operator==(S1FloatStateValue other) const
Definition SpnEnums.hpp:2982
CTREXPORT friend std::ostream & operator<<(std::ostream &os, S1FloatStateValue data)
int value
Unique integer value of this S1FloatStateValue.
Definition SpnEnums.hpp:2951
static constexpr int PullHigh
The input will be pulled high when not loaded by an outside device.
Definition SpnEnums.hpp:2962
constexpr S1FloatStateValue()
Definition SpnEnums.hpp:2978
constexpr S1FloatStateValue(int value)
Definition SpnEnums.hpp:2974
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2996
static constexpr int BusKeeper
The input will pull in the direction of the last measured state.
Definition SpnEnums.hpp:2972
static constexpr int PullLow
The input will be pulled low when not loaded by an outside device.
Definition SpnEnums.hpp:2967
constexpr auto operator<=>(S1FloatStateValue other) const
Definition SpnEnums.hpp:2986
static constexpr int FloatDetect
The input will attempt to detect when it is floating.
Definition SpnEnums.hpp:2957
constexpr S1StateValue(int value)
Definition SpnEnums.hpp:2856
static constexpr int Low
Input is driven low (below 0.5V).
Definition SpnEnums.hpp:2850
constexpr S1StateValue()
Definition SpnEnums.hpp:2860
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2878
int value
Unique integer value of this S1StateValue.
Definition SpnEnums.hpp:2841
CTREXPORT friend std::ostream & operator<<(std::ostream &os, S1StateValue data)
constexpr bool operator==(S1StateValue other) const
Definition SpnEnums.hpp:2864
static constexpr int High
Input is driven high (above 3V).
Definition SpnEnums.hpp:2854
static constexpr int Floating
Input is not driven high or low, it is disconnected from load.
Definition SpnEnums.hpp:2846
constexpr auto operator<=>(S1StateValue other) const
Definition SpnEnums.hpp:2868
constexpr S2CloseStateValue()
Definition SpnEnums.hpp:3482
constexpr auto operator<=>(S2CloseStateValue other) const
Definition SpnEnums.hpp:3490
constexpr bool operator==(S2CloseStateValue other) const
Definition SpnEnums.hpp:3486
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:3500
static constexpr int CloseWhenNotLow
The S2 input will be treated as closed when it is not Low.
Definition SpnEnums.hpp:3472
int value
Unique integer value of this S2CloseStateValue.
Definition SpnEnums.hpp:3451
static constexpr int CloseWhenNotHigh
The S2 input will be treated as closed when it is not High.
Definition SpnEnums.hpp:3464
constexpr S2CloseStateValue(int value)
Definition SpnEnums.hpp:3478
static constexpr int CloseWhenLow
The S2 input will be treated as closed when it is Low.
Definition SpnEnums.hpp:3476
static constexpr int CloseWhenHigh
The S2 input will be treated as closed when it is High.
Definition SpnEnums.hpp:3468
static constexpr int CloseWhenFloating
The S2 input will be treated as closed when it is floating.
Definition SpnEnums.hpp:3460
static constexpr int CloseWhenNotFloating
The S2 input will be treated as closed when it is not floating.
Definition SpnEnums.hpp:3456
CTREXPORT friend std::ostream & operator<<(std::ostream &os, S2CloseStateValue data)
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:3060
static constexpr int PullHigh
The input will be pulled high when not loaded by an outside device.
Definition SpnEnums.hpp:3026
constexpr auto operator<=>(S2FloatStateValue other) const
Definition SpnEnums.hpp:3050
constexpr bool operator==(S2FloatStateValue other) const
Definition SpnEnums.hpp:3046
static constexpr int BusKeeper
The input will pull in the direction of the last measured state.
Definition SpnEnums.hpp:3036
constexpr S2FloatStateValue(int value)
Definition SpnEnums.hpp:3038
CTREXPORT friend std::ostream & operator<<(std::ostream &os, S2FloatStateValue data)
static constexpr int PullLow
The input will be pulled low when not loaded by an outside device.
Definition SpnEnums.hpp:3031
int value
Unique integer value of this S2FloatStateValue.
Definition SpnEnums.hpp:3015
constexpr S2FloatStateValue()
Definition SpnEnums.hpp:3042
static constexpr int FloatDetect
The input will attempt to detect when it is floating.
Definition SpnEnums.hpp:3021
constexpr bool operator==(S2StateValue other) const
Definition SpnEnums.hpp:2919
static constexpr int High
Input is driven high (above 3V).
Definition SpnEnums.hpp:2909
int value
Unique integer value of this S2StateValue.
Definition SpnEnums.hpp:2896
CTREXPORT friend std::ostream & operator<<(std::ostream &os, S2StateValue data)
constexpr S2StateValue(int value)
Definition SpnEnums.hpp:2911
constexpr S2StateValue()
Definition SpnEnums.hpp:2915
static constexpr int Floating
Input is not driven high or low, it is disconnected from load.
Definition SpnEnums.hpp:2901
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2933
static constexpr int Low
Input is driven low (below 0.5V).
Definition SpnEnums.hpp:2905
constexpr auto operator<=>(S2StateValue other) const
Definition SpnEnums.hpp:2923
static constexpr int CounterClockwise_Positive
Counter-clockwise motion reports positive rotation.
Definition SpnEnums.hpp:190
CTREXPORT friend std::ostream & operator<<(std::ostream &os, SensorDirectionValue data)
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:218
constexpr SensorDirectionValue(int value)
Definition SpnEnums.hpp:196
constexpr auto operator<=>(SensorDirectionValue other) const
Definition SpnEnums.hpp:208
static constexpr int Clockwise_Positive
Clockwise motion reports positive rotation.
Definition SpnEnums.hpp:194
int value
Unique integer value of this SensorDirectionValue.
Definition SpnEnums.hpp:185
constexpr bool operator==(SensorDirectionValue other) const
Definition SpnEnums.hpp:204
constexpr SensorDirectionValue()
Definition SpnEnums.hpp:200
constexpr bool operator==(SensorPhaseValue other) const
Definition SpnEnums.hpp:3342
int value
Unique integer value of this SensorPhaseValue.
Definition SpnEnums.hpp:3323
CTREXPORT friend std::ostream & operator<<(std::ostream &os, SensorPhaseValue data)
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:3356
constexpr SensorPhaseValue(int value)
Definition SpnEnums.hpp:3334
static constexpr int Aligned
The sensor direction is normally aligned with the motor.
Definition SpnEnums.hpp:3328
static constexpr int Opposed
The sensor direction is normally opposed to the motor.
Definition SpnEnums.hpp:3332
constexpr SensorPhaseValue()
Definition SpnEnums.hpp:3338
constexpr auto operator<=>(SensorPhaseValue other) const
Definition SpnEnums.hpp:3346
constexpr bool operator==(StaticFeedforwardSignValue other) const
Definition SpnEnums.hpp:2391
constexpr auto operator<=>(StaticFeedforwardSignValue other) const
Definition SpnEnums.hpp:2395
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2405
int value
Unique integer value of this StaticFeedforwardSignValue.
Definition SpnEnums.hpp:2367
static constexpr int UseVelocitySign
Use the velocity reference sign.
Definition SpnEnums.hpp:2374
CTREXPORT friend std::ostream & operator<<(std::ostream &os, StaticFeedforwardSignValue data)
constexpr StaticFeedforwardSignValue()
Definition SpnEnums.hpp:2387
static constexpr int UseClosedLoopSign
Use the sign of closed loop error.
Definition SpnEnums.hpp:2381
constexpr StaticFeedforwardSignValue(int value)
Definition SpnEnums.hpp:2383
constexpr StatusLedWhenActiveValue(int value)
Definition SpnEnums.hpp:3840
CTREXPORT friend std::ostream & operator<<(std::ostream &os, StatusLedWhenActiveValue data)
constexpr auto operator<=>(StatusLedWhenActiveValue other) const
Definition SpnEnums.hpp:3852
constexpr StatusLedWhenActiveValue()
Definition SpnEnums.hpp:3844
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:3862
static constexpr int Disabled
The status LED is disabled during control.
Definition SpnEnums.hpp:3838
int value
Unique integer value of this StatusLedWhenActiveValue.
Definition SpnEnums.hpp:3829
static constexpr int Enabled
The status LED is enabled during control.
Definition SpnEnums.hpp:3834
constexpr bool operator==(StatusLedWhenActiveValue other) const
Definition SpnEnums.hpp:3848
static constexpr int GRB
LEDs that are controlled by Green-Red-Blue values.
Definition SpnEnums.hpp:3606
constexpr StripTypeValue()
Definition SpnEnums.hpp:3632
constexpr bool operator==(StripTypeValue other) const
Definition SpnEnums.hpp:3636
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:3650
static constexpr int BRG
LEDs that are controlled by Blue-Red-Green values.
Definition SpnEnums.hpp:3614
static constexpr int RGB
LEDs that are controlled by Red-Green-Blue values.
Definition SpnEnums.hpp:3610
constexpr StripTypeValue(int value)
Definition SpnEnums.hpp:3628
int value
Unique integer value of this StripTypeValue.
Definition SpnEnums.hpp:3601
static constexpr int RGBW
LEDs that are controlled by Red-Green-Blue-White values.
Definition SpnEnums.hpp:3622
static constexpr int GRBW
LEDs that are controlled by Green-Red-Blue-White values.
Definition SpnEnums.hpp:3618
CTREXPORT friend std::ostream & operator<<(std::ostream &os, StripTypeValue data)
static constexpr int BRGW
LEDs that are controlled by Blue-Red-Green-White values.
Definition SpnEnums.hpp:3626
constexpr auto operator<=>(StripTypeValue other) const
Definition SpnEnums.hpp:3640
static constexpr int Bootup_3
Definition SpnEnums.hpp:29
static constexpr int ControlEnabled
Definition SpnEnums.hpp:36
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:65
static constexpr int Production
Definition SpnEnums.hpp:41
static constexpr int Bootup_4
Definition SpnEnums.hpp:30
static constexpr int ControlDisabled
Definition SpnEnums.hpp:35
static constexpr int NotLicensed
Definition SpnEnums.hpp:40
static constexpr int Recover
Definition SpnEnums.hpp:39
static constexpr int Bootup_1
Definition SpnEnums.hpp:27
static constexpr int Bootup_0
Definition SpnEnums.hpp:26
static constexpr int BootBeep
Definition SpnEnums.hpp:34
static constexpr int Bootup_6
Definition SpnEnums.hpp:32
int value
Unique integer value of this System_StateValue.
Definition SpnEnums.hpp:24
static constexpr int Fault
Definition SpnEnums.hpp:38
static constexpr int ControlEnabled_11
Definition SpnEnums.hpp:37
constexpr auto operator<=>(System_StateValue other) const
Definition SpnEnums.hpp:55
constexpr System_StateValue(int value)
Definition SpnEnums.hpp:43
constexpr bool operator==(System_StateValue other) const
Definition SpnEnums.hpp:51
static constexpr int Bootup_5
Definition SpnEnums.hpp:31
CTREXPORT friend std::ostream & operator<<(std::ostream &os, System_StateValue data)
static constexpr int Bootup_7
Definition SpnEnums.hpp:33
constexpr System_StateValue()
Definition SpnEnums.hpp:47
static constexpr int Bootup_2
Definition SpnEnums.hpp:28
static constexpr int Required
Temperature sensor is required for motor control.
Definition SpnEnums.hpp:4715
constexpr bool operator==(TempSensorRequiredValue other) const
Definition SpnEnums.hpp:4729
CTREXPORT friend std::ostream & operator<<(std::ostream &os, TempSensorRequiredValue data)
constexpr TempSensorRequiredValue()
Definition SpnEnums.hpp:4725
constexpr TempSensorRequiredValue(int value)
Definition SpnEnums.hpp:4721
int value
Unique integer value of this TempSensorRequiredValue.
Definition SpnEnums.hpp:4710
static constexpr int Not_Required
Temperature sensor is not required for motor control.
Definition SpnEnums.hpp:4719
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:4743
constexpr auto operator<=>(TempSensorRequiredValue other) const
Definition SpnEnums.hpp:4733
constexpr UpdateModeValue()
Definition SpnEnums.hpp:2611
int value
Unique integer value of this UpdateModeValue.
Definition SpnEnums.hpp:2590
static constexpr int ShortRangeUserFreq
Uses short-range detection mode for improved detection under high ambient infrared light conditions.
Definition SpnEnums.hpp:2601
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:2629
constexpr bool operator==(UpdateModeValue other) const
Definition SpnEnums.hpp:2615
static constexpr int ShortRange100Hz
Updates distance/proximity at 100hz using short-range detection mode.
Definition SpnEnums.hpp:2595
constexpr UpdateModeValue(int value)
Definition SpnEnums.hpp:2607
static constexpr int LongRangeUserFreq
Uses long-range detection mode and user-specified update frequency.
Definition SpnEnums.hpp:2605
CTREXPORT friend std::ostream & operator<<(std::ostream &os, UpdateModeValue data)
constexpr auto operator<=>(UpdateModeValue other) const
Definition SpnEnums.hpp:2619
constexpr std::string_view ToString() const
Gets the string representation of this enum.
Definition SpnEnums.hpp:3810
static constexpr int On
VBat output is on at full power.
Definition SpnEnums.hpp:3778
constexpr bool operator==(VBatOutputModeValue other) const
Definition SpnEnums.hpp:3796
int value
Unique integer value of this VBatOutputModeValue.
Definition SpnEnums.hpp:3773
constexpr VBatOutputModeValue(int value)
Definition SpnEnums.hpp:3788
static constexpr int Off
VBat output is off.
Definition SpnEnums.hpp:3782
CTREXPORT friend std::ostream & operator<<(std::ostream &os, VBatOutputModeValue data)
constexpr auto operator<=>(VBatOutputModeValue other) const
Definition SpnEnums.hpp:3800
static constexpr int Modulated
VBat output is on at the specified modulation.
Definition SpnEnums.hpp:3786
constexpr VBatOutputModeValue()
Definition SpnEnums.hpp:3792