CTRE Phoenix 6 C++ 25.3.0
Loading...
Searching...
No Matches
CoreTalonFXS.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
61#include <units/angle.h>
62#include <units/angular_acceleration.h>
63#include <units/angular_velocity.h>
64#include <units/current.h>
65#include <units/dimensionless.h>
66#include <units/temperature.h>
67#include <units/voltage.h>
68
69namespace ctre {
70namespace phoenix6 {
71
72namespace hardware {
73namespace core {
74 class CoreTalonFXS;
75}
76}
77
78namespace configs {
79
80/**
81 * Class description for the Talon FXS motor controller.
82 *
83 * This handles the configurations for the hardware#TalonFXS
84 */
86{
87public:
88 constexpr TalonFXSConfiguration() = default;
89
90 /**
91 * \brief True if we should factory default newer unsupported configs,
92 * false to leave newer unsupported configs alone.
93 *
94 * \details This flag addresses a corner case where the device may have
95 * firmware with newer configs that didn't exist when this
96 * version of the API was built. If this occurs and this
97 * flag is true, unsupported new configs will be factory
98 * defaulted to avoid unexpected behavior.
99 *
100 * This is also the behavior in Phoenix 5, so this flag
101 * is defaulted to true to match.
102 */
104
105
106 /**
107 * \brief Configs that directly affect motor output.
108 *
109 * \details Includes motor invert, neutral mode, and other features
110 * related to motor output.
111 */
113
114 /**
115 * \brief Configs that directly affect current limiting features.
116 *
117 * \details Contains the supply/stator current limit thresholds and
118 * whether to enable them.
119 */
121
122 /**
123 * \brief Configs that affect Voltage control types.
124 *
125 * \details Includes peak output voltages and other configs affecting
126 * voltage measurements.
127 */
129
130 /**
131 * \brief Configs that affect the external feedback sensor of this
132 * motor controller.
133 *
134 * \details Includes feedback sensor source, offsets and sensor phase
135 * for the feedback sensor, and various ratios to describe
136 * the relationship between the sensor and the mechanism for
137 * closed looping.
138 */
140
141 /**
142 * \brief Configs related to sensors used for differential control of
143 * a mechanism.
144 *
145 * \details Includes the differential sensor sources and IDs.
146 */
148
149 /**
150 * \brief Configs related to constants used for differential control
151 * of a mechanism.
152 *
153 * \details Includes the differential peak outputs.
154 */
156
157 /**
158 * \brief Configs that affect the open-loop control of this motor
159 * controller.
160 *
161 * \details Open-loop ramp rates for the various control types.
162 */
164
165 /**
166 * \brief Configs that affect the closed-loop control of this motor
167 * controller.
168 *
169 * \details Closed-loop ramp rates for the various control types.
170 */
172
173 /**
174 * \brief Configs that change how the motor controller behaves under
175 * different limit switch states.
176 *
177 * \details Includes configs such as enabling limit switches,
178 * configuring the remote sensor ID, the source, and the
179 * position to set on limit.
180 */
182
183 /**
184 * \brief Configs that affect audible components of the device.
185 *
186 * \details Includes configuration for the beep on boot.
187 */
189
190 /**
191 * \brief Configs that affect how software-limit switches behave.
192 *
193 * \details Includes enabling software-limit switches and the
194 * threshold at which they are tripped.
195 */
197
198 /**
199 * \brief Configs for Motion Magic®.
200 *
201 * \details Includes Velocity, Acceleration, Jerk, and Expo
202 * parameters.
203 */
205
206 /**
207 * \brief Custom Params.
208 *
209 * \details Custom paramaters that have no real impact on controller.
210 */
212
213 /**
214 * \brief Configs that affect general behavior during closed-looping.
215 *
216 * \details Includes Continuous Wrap features.
217 */
219
220 /**
221 * \brief Configs that determine motor selection and commutation.
222 *
223 * \details Set these configs to match your motor setup before
224 * commanding motor output.
225 */
227
228 /**
229 * \brief Gains for the specified slot.
230 *
231 * \details If this slot is selected, these gains are used in closed
232 * loop control requests.
233 */
235
236 /**
237 * \brief Gains for the specified slot.
238 *
239 * \details If this slot is selected, these gains are used in closed
240 * loop control requests.
241 */
243
244 /**
245 * \brief Gains for the specified slot.
246 *
247 * \details If this slot is selected, these gains are used in closed
248 * loop control requests.
249 */
251
252 /**
253 * \brief Modifies this configuration's MotorOutput parameter and returns itself for
254 * method-chaining and easier to use config API.
255 *
256 * Configs that directly affect motor output.
257 *
258 * \details Includes motor invert, neutral mode, and other features
259 * related to motor output.
260 *
261 * \param newMotorOutput Parameter to modify
262 * \returns Itself
263 */
265 {
266 MotorOutput = std::move(newMotorOutput);
267 return *this;
268 }
269
270 /**
271 * \brief Modifies this configuration's CurrentLimits parameter and returns itself for
272 * method-chaining and easier to use config API.
273 *
274 * Configs that directly affect current limiting features.
275 *
276 * \details Contains the supply/stator current limit thresholds and
277 * whether to enable them.
278 *
279 * \param newCurrentLimits Parameter to modify
280 * \returns Itself
281 */
283 {
284 CurrentLimits = std::move(newCurrentLimits);
285 return *this;
286 }
287
288 /**
289 * \brief Modifies this configuration's Voltage parameter and returns itself for
290 * method-chaining and easier to use config API.
291 *
292 * Configs that affect Voltage control types.
293 *
294 * \details Includes peak output voltages and other configs affecting
295 * voltage measurements.
296 *
297 * \param newVoltage Parameter to modify
298 * \returns Itself
299 */
301 {
302 Voltage = std::move(newVoltage);
303 return *this;
304 }
305
306 /**
307 * \brief Modifies this configuration's ExternalFeedback parameter and returns itself for
308 * method-chaining and easier to use config API.
309 *
310 * Configs that affect the external feedback sensor of this motor
311 * controller.
312 *
313 * \details Includes feedback sensor source, offsets and sensor phase
314 * for the feedback sensor, and various ratios to describe
315 * the relationship between the sensor and the mechanism for
316 * closed looping.
317 *
318 * \param newExternalFeedback Parameter to modify
319 * \returns Itself
320 */
322 {
323 ExternalFeedback = std::move(newExternalFeedback);
324 return *this;
325 }
326
327 /**
328 * \brief Modifies this configuration's DifferentialSensors parameter and returns itself for
329 * method-chaining and easier to use config API.
330 *
331 * Configs related to sensors used for differential control of a
332 * mechanism.
333 *
334 * \details Includes the differential sensor sources and IDs.
335 *
336 * \param newDifferentialSensors Parameter to modify
337 * \returns Itself
338 */
340 {
341 DifferentialSensors = std::move(newDifferentialSensors);
342 return *this;
343 }
344
345 /**
346 * \brief Modifies this configuration's DifferentialConstants parameter and returns itself for
347 * method-chaining and easier to use config API.
348 *
349 * Configs related to constants used for differential control of a
350 * mechanism.
351 *
352 * \details Includes the differential peak outputs.
353 *
354 * \param newDifferentialConstants Parameter to modify
355 * \returns Itself
356 */
358 {
359 DifferentialConstants = std::move(newDifferentialConstants);
360 return *this;
361 }
362
363 /**
364 * \brief Modifies this configuration's OpenLoopRamps parameter and returns itself for
365 * method-chaining and easier to use config API.
366 *
367 * Configs that affect the open-loop control of this motor controller.
368 *
369 * \details Open-loop ramp rates for the various control types.
370 *
371 * \param newOpenLoopRamps Parameter to modify
372 * \returns Itself
373 */
375 {
376 OpenLoopRamps = std::move(newOpenLoopRamps);
377 return *this;
378 }
379
380 /**
381 * \brief Modifies this configuration's ClosedLoopRamps parameter and returns itself for
382 * method-chaining and easier to use config API.
383 *
384 * Configs that affect the closed-loop control of this motor
385 * controller.
386 *
387 * \details Closed-loop ramp rates for the various control types.
388 *
389 * \param newClosedLoopRamps Parameter to modify
390 * \returns Itself
391 */
393 {
394 ClosedLoopRamps = std::move(newClosedLoopRamps);
395 return *this;
396 }
397
398 /**
399 * \brief Modifies this configuration's HardwareLimitSwitch parameter and returns itself for
400 * method-chaining and easier to use config API.
401 *
402 * Configs that change how the motor controller behaves under
403 * different limit switch states.
404 *
405 * \details Includes configs such as enabling limit switches,
406 * configuring the remote sensor ID, the source, and the
407 * position to set on limit.
408 *
409 * \param newHardwareLimitSwitch Parameter to modify
410 * \returns Itself
411 */
413 {
414 HardwareLimitSwitch = std::move(newHardwareLimitSwitch);
415 return *this;
416 }
417
418 /**
419 * \brief Modifies this configuration's Audio parameter and returns itself for
420 * method-chaining and easier to use config API.
421 *
422 * Configs that affect audible components of the device.
423 *
424 * \details Includes configuration for the beep on boot.
425 *
426 * \param newAudio Parameter to modify
427 * \returns Itself
428 */
430 {
431 Audio = std::move(newAudio);
432 return *this;
433 }
434
435 /**
436 * \brief Modifies this configuration's SoftwareLimitSwitch parameter and returns itself for
437 * method-chaining and easier to use config API.
438 *
439 * Configs that affect how software-limit switches behave.
440 *
441 * \details Includes enabling software-limit switches and the
442 * threshold at which they are tripped.
443 *
444 * \param newSoftwareLimitSwitch Parameter to modify
445 * \returns Itself
446 */
448 {
449 SoftwareLimitSwitch = std::move(newSoftwareLimitSwitch);
450 return *this;
451 }
452
453 /**
454 * \brief Modifies this configuration's MotionMagic parameter and returns itself for
455 * method-chaining and easier to use config API.
456 *
457 * Configs for Motion Magic®.
458 *
459 * \details Includes Velocity, Acceleration, Jerk, and Expo
460 * parameters.
461 *
462 * \param newMotionMagic Parameter to modify
463 * \returns Itself
464 */
466 {
467 MotionMagic = std::move(newMotionMagic);
468 return *this;
469 }
470
471 /**
472 * \brief Modifies this configuration's CustomParams parameter and returns itself for
473 * method-chaining and easier to use config API.
474 *
475 * Custom Params.
476 *
477 * \details Custom paramaters that have no real impact on controller.
478 *
479 * \param newCustomParams Parameter to modify
480 * \returns Itself
481 */
483 {
484 CustomParams = std::move(newCustomParams);
485 return *this;
486 }
487
488 /**
489 * \brief Modifies this configuration's ClosedLoopGeneral parameter and returns itself for
490 * method-chaining and easier to use config API.
491 *
492 * Configs that affect general behavior during closed-looping.
493 *
494 * \details Includes Continuous Wrap features.
495 *
496 * \param newClosedLoopGeneral Parameter to modify
497 * \returns Itself
498 */
500 {
501 ClosedLoopGeneral = std::move(newClosedLoopGeneral);
502 return *this;
503 }
504
505 /**
506 * \brief Modifies this configuration's Commutation parameter and returns itself for
507 * method-chaining and easier to use config API.
508 *
509 * Configs that determine motor selection and commutation.
510 *
511 * \details Set these configs to match your motor setup before
512 * commanding motor output.
513 *
514 * \param newCommutation Parameter to modify
515 * \returns Itself
516 */
518 {
519 Commutation = std::move(newCommutation);
520 return *this;
521 }
522
523 /**
524 * \brief Modifies this configuration's Slot0 parameter and returns itself for
525 * method-chaining and easier to use config API.
526 *
527 * Gains for the specified slot.
528 *
529 * \details If this slot is selected, these gains are used in closed
530 * loop control requests.
531 *
532 * \param newSlot0 Parameter to modify
533 * \returns Itself
534 */
536 {
537 Slot0 = std::move(newSlot0);
538 return *this;
539 }
540
541 /**
542 * \brief Modifies this configuration's Slot1 parameter and returns itself for
543 * method-chaining and easier to use config API.
544 *
545 * Gains for the specified slot.
546 *
547 * \details If this slot is selected, these gains are used in closed
548 * loop control requests.
549 *
550 * \param newSlot1 Parameter to modify
551 * \returns Itself
552 */
554 {
555 Slot1 = std::move(newSlot1);
556 return *this;
557 }
558
559 /**
560 * \brief Modifies this configuration's Slot2 parameter and returns itself for
561 * method-chaining and easier to use config API.
562 *
563 * Gains for the specified slot.
564 *
565 * \details If this slot is selected, these gains are used in closed
566 * loop control requests.
567 *
568 * \param newSlot2 Parameter to modify
569 * \returns Itself
570 */
572 {
573 Slot2 = std::move(newSlot2);
574 return *this;
575 }
576
577 /**
578 * \brief Get the string representation of this configuration
579 */
580 std::string ToString() const
581 {
582 std::stringstream ss;
583 ss << "TalonFXSConfiguration" << std::endl;
584 ss << MotorOutput.ToString();
585 ss << CurrentLimits.ToString();
586 ss << Voltage.ToString();
590 ss << OpenLoopRamps.ToString();
593 ss << Audio.ToString();
595 ss << MotionMagic.ToString();
596 ss << CustomParams.ToString();
598 ss << Commutation.ToString();
599 ss << Slot0.ToString();
600 ss << Slot1.ToString();
601 ss << Slot2.ToString();
602 return ss.str();
603 }
604
605 /**
606 * \brief Get the serialized form of this configuration
607 */
608 std::string Serialize() const
609 {
610 std::stringstream ss;
611 ss << MotorOutput.Serialize();
612 ss << CurrentLimits.Serialize();
613 ss << Voltage.Serialize();
617 ss << OpenLoopRamps.Serialize();
620 ss << Audio.Serialize();
622 ss << MotionMagic.Serialize();
623 ss << CustomParams.Serialize();
625 ss << Commutation.Serialize();
626 ss << Slot0.Serialize();
627 ss << Slot1.Serialize();
628 ss << Slot2.Serialize();
629 return ss.str();
630 }
631
632 /**
633 * \brief Take a string and deserialize it to this configuration
634 */
635 ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize)
636 {
638 err = MotorOutput.Deserialize(to_deserialize);
639 err = CurrentLimits.Deserialize(to_deserialize);
640 err = Voltage.Deserialize(to_deserialize);
641 err = ExternalFeedback.Deserialize(to_deserialize);
642 err = DifferentialSensors.Deserialize(to_deserialize);
643 err = DifferentialConstants.Deserialize(to_deserialize);
644 err = OpenLoopRamps.Deserialize(to_deserialize);
645 err = ClosedLoopRamps.Deserialize(to_deserialize);
646 err = HardwareLimitSwitch.Deserialize(to_deserialize);
647 err = Audio.Deserialize(to_deserialize);
648 err = SoftwareLimitSwitch.Deserialize(to_deserialize);
649 err = MotionMagic.Deserialize(to_deserialize);
650 err = CustomParams.Deserialize(to_deserialize);
651 err = ClosedLoopGeneral.Deserialize(to_deserialize);
652 err = Commutation.Deserialize(to_deserialize);
653 err = Slot0.Deserialize(to_deserialize);
654 err = Slot1.Deserialize(to_deserialize);
655 err = Slot2.Deserialize(to_deserialize);
656 return err;
657 }
658};
659
660/**
661 * Class description for the Talon FXS motor controller.
662 *
663 * This handles the configurations for the hardware#TalonFXS
664 */
666{
667private:
669 ParentConfigurator{std::move(id)}
670 {}
671
673
674public:
675 /**
676 * \brief Refreshes the values of the specified config group.
677 *
678 * This will wait up to #DefaultTimeoutSeconds.
679 *
680 * \details Call to refresh the selected configs from the device.
681 *
682 * \param configs The configs to refresh
683 * \returns StatusCode of refreshing the configs
684 */
689
690 /**
691 * \brief Refreshes the values of the specified config group.
692 *
693 * \details Call to refresh the selected configs from the device.
694 *
695 * \param configs The configs to refresh
696 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
697 * \returns StatusCode of refreshing the configs
698 */
699 ctre::phoenix::StatusCode Refresh(TalonFXSConfiguration &configs, units::time::second_t timeoutSeconds) const
700 {
701 std::string ref;
702 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
703 configs.Deserialize(ref);
704 return ret;
705 }
706
707 /**
708 * \brief Applies the contents of the specified config to the device.
709 *
710 * This will wait up to #DefaultTimeoutSeconds.
711 *
712 * \details Call to apply the selected configs.
713 *
714 * \param configs Configs to apply against.
715 * \returns StatusCode of the set command
716 */
718 {
719 return Apply(configs, DefaultTimeoutSeconds);
720 }
721
722 /**
723 * \brief Applies the contents of the specified config to the device.
724 *
725 * \details Call to apply the selected configs.
726 *
727 * \param configs Configs to apply against.
728 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
729 * \returns StatusCode of the set command
730 */
731 ctre::phoenix::StatusCode Apply(const TalonFXSConfiguration &configs, units::time::second_t timeoutSeconds)
732 {
733 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, configs.FutureProofConfigs, false);
734 }
735
736
737 /**
738 * \brief Refreshes the values of the specified config group.
739 *
740 * This will wait up to #DefaultTimeoutSeconds.
741 *
742 * \details Call to refresh the selected configs from the device.
743 *
744 * \param configs The configs to refresh
745 * \returns StatusCode of refreshing the configs
746 */
748 {
749 return Refresh(configs, DefaultTimeoutSeconds);
750 }
751 /**
752 * \brief Refreshes the values of the specified config group.
753 *
754 * \details Call to refresh the selected configs from the device.
755 *
756 * \param configs The configs to refresh
757 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
758 * \returns StatusCode of refreshing the configs
759 */
760 ctre::phoenix::StatusCode Refresh(MotorOutputConfigs &configs, units::time::second_t timeoutSeconds) const
761 {
762 std::string ref;
763 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
764 configs.Deserialize(ref);
765 return ret;
766 }
767
768 /**
769 * \brief Applies the contents of the specified config to the device.
770 *
771 * This will wait up to #DefaultTimeoutSeconds.
772 *
773 * \details Call to apply the selected configs.
774 *
775 * \param configs Configs to apply against.
776 * \returns StatusCode of the set command
777 */
779 {
780 return Apply(configs, DefaultTimeoutSeconds);
781 }
782
783 /**
784 * \brief Applies the contents of the specified config to the device.
785 *
786 * \details Call to apply the selected configs.
787 *
788 * \param configs Configs to apply against.
789 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
790 * \returns StatusCode of the set command
791 */
792 ctre::phoenix::StatusCode Apply(const MotorOutputConfigs &configs, units::time::second_t timeoutSeconds)
793 {
794 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
795 }
796
797 /**
798 * \brief Refreshes the values of the specified config group.
799 *
800 * This will wait up to #DefaultTimeoutSeconds.
801 *
802 * \details Call to refresh the selected configs from the device.
803 *
804 * \param configs The configs to refresh
805 * \returns StatusCode of refreshing the configs
806 */
808 {
809 return Refresh(configs, DefaultTimeoutSeconds);
810 }
811 /**
812 * \brief Refreshes the values of the specified config group.
813 *
814 * \details Call to refresh the selected configs from the device.
815 *
816 * \param configs The configs to refresh
817 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
818 * \returns StatusCode of refreshing the configs
819 */
820 ctre::phoenix::StatusCode Refresh(CurrentLimitsConfigs &configs, units::time::second_t timeoutSeconds) const
821 {
822 std::string ref;
823 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
824 configs.Deserialize(ref);
825 return ret;
826 }
827
828 /**
829 * \brief Applies the contents of the specified config to the device.
830 *
831 * This will wait up to #DefaultTimeoutSeconds.
832 *
833 * \details Call to apply the selected configs.
834 *
835 * \param configs Configs to apply against.
836 * \returns StatusCode of the set command
837 */
839 {
840 return Apply(configs, DefaultTimeoutSeconds);
841 }
842
843 /**
844 * \brief Applies the contents of the specified config to the device.
845 *
846 * \details Call to apply the selected configs.
847 *
848 * \param configs Configs to apply against.
849 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
850 * \returns StatusCode of the set command
851 */
852 ctre::phoenix::StatusCode Apply(const CurrentLimitsConfigs &configs, units::time::second_t timeoutSeconds)
853 {
854 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
855 }
856
857 /**
858 * \brief Refreshes the values of the specified config group.
859 *
860 * This will wait up to #DefaultTimeoutSeconds.
861 *
862 * \details Call to refresh the selected configs from the device.
863 *
864 * \param configs The configs to refresh
865 * \returns StatusCode of refreshing the configs
866 */
868 {
869 return Refresh(configs, DefaultTimeoutSeconds);
870 }
871 /**
872 * \brief Refreshes the values of the specified config group.
873 *
874 * \details Call to refresh the selected configs from the device.
875 *
876 * \param configs The configs to refresh
877 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
878 * \returns StatusCode of refreshing the configs
879 */
880 ctre::phoenix::StatusCode Refresh(VoltageConfigs &configs, units::time::second_t timeoutSeconds) const
881 {
882 std::string ref;
883 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
884 configs.Deserialize(ref);
885 return ret;
886 }
887
888 /**
889 * \brief Applies the contents of the specified config to the device.
890 *
891 * This will wait up to #DefaultTimeoutSeconds.
892 *
893 * \details Call to apply the selected configs.
894 *
895 * \param configs Configs to apply against.
896 * \returns StatusCode of the set command
897 */
899 {
900 return Apply(configs, DefaultTimeoutSeconds);
901 }
902
903 /**
904 * \brief Applies the contents of the specified config to the device.
905 *
906 * \details Call to apply the selected configs.
907 *
908 * \param configs Configs to apply against.
909 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
910 * \returns StatusCode of the set command
911 */
912 ctre::phoenix::StatusCode Apply(const VoltageConfigs &configs, units::time::second_t timeoutSeconds)
913 {
914 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
915 }
916
917 /**
918 * \brief Refreshes the values of the specified config group.
919 *
920 * This will wait up to #DefaultTimeoutSeconds.
921 *
922 * \details Call to refresh the selected configs from the device.
923 *
924 * \param configs The configs to refresh
925 * \returns StatusCode of refreshing the configs
926 */
931 /**
932 * \brief Refreshes the values of the specified config group.
933 *
934 * \details Call to refresh the selected configs from the device.
935 *
936 * \param configs The configs to refresh
937 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
938 * \returns StatusCode of refreshing the configs
939 */
940 ctre::phoenix::StatusCode Refresh(ExternalFeedbackConfigs &configs, units::time::second_t timeoutSeconds) const
941 {
942 std::string ref;
943 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
944 configs.Deserialize(ref);
945 return ret;
946 }
947
948 /**
949 * \brief Applies the contents of the specified config to the device.
950 *
951 * This will wait up to #DefaultTimeoutSeconds.
952 *
953 * \details Call to apply the selected configs.
954 *
955 * \param configs Configs to apply against.
956 * \returns StatusCode of the set command
957 */
959 {
960 return Apply(configs, DefaultTimeoutSeconds);
961 }
962
963 /**
964 * \brief Applies the contents of the specified config to the device.
965 *
966 * \details Call to apply the selected configs.
967 *
968 * \param configs Configs to apply against.
969 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
970 * \returns StatusCode of the set command
971 */
972 ctre::phoenix::StatusCode Apply(const ExternalFeedbackConfigs &configs, units::time::second_t timeoutSeconds)
973 {
974 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
975 }
976
977 /**
978 * \brief Refreshes the values of the specified config group.
979 *
980 * This will wait up to #DefaultTimeoutSeconds.
981 *
982 * \details Call to refresh the selected configs from the device.
983 *
984 * \param configs The configs to refresh
985 * \returns StatusCode of refreshing the configs
986 */
991 /**
992 * \brief Refreshes the values of the specified config group.
993 *
994 * \details Call to refresh the selected configs from the device.
995 *
996 * \param configs The configs to refresh
997 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
998 * \returns StatusCode of refreshing the configs
999 */
1000 ctre::phoenix::StatusCode Refresh(DifferentialSensorsConfigs &configs, units::time::second_t timeoutSeconds) const
1001 {
1002 std::string ref;
1003 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1004 configs.Deserialize(ref);
1005 return ret;
1006 }
1007
1008 /**
1009 * \brief Applies the contents of the specified config to the device.
1010 *
1011 * This will wait up to #DefaultTimeoutSeconds.
1012 *
1013 * \details Call to apply the selected configs.
1014 *
1015 * \param configs Configs to apply against.
1016 * \returns StatusCode of the set command
1017 */
1019 {
1020 return Apply(configs, DefaultTimeoutSeconds);
1021 }
1022
1023 /**
1024 * \brief Applies the contents of the specified config to the device.
1025 *
1026 * \details Call to apply the selected configs.
1027 *
1028 * \param configs Configs to apply against.
1029 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1030 * \returns StatusCode of the set command
1031 */
1032 ctre::phoenix::StatusCode Apply(const DifferentialSensorsConfigs &configs, units::time::second_t timeoutSeconds)
1033 {
1034 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1035 }
1036
1037 /**
1038 * \brief Refreshes the values of the specified config group.
1039 *
1040 * This will wait up to #DefaultTimeoutSeconds.
1041 *
1042 * \details Call to refresh the selected configs from the device.
1043 *
1044 * \param configs The configs to refresh
1045 * \returns StatusCode of refreshing the configs
1046 */
1051 /**
1052 * \brief Refreshes the values of the specified config group.
1053 *
1054 * \details Call to refresh the selected configs from the device.
1055 *
1056 * \param configs The configs to refresh
1057 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1058 * \returns StatusCode of refreshing the configs
1059 */
1060 ctre::phoenix::StatusCode Refresh(DifferentialConstantsConfigs &configs, units::time::second_t timeoutSeconds) const
1061 {
1062 std::string ref;
1063 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1064 configs.Deserialize(ref);
1065 return ret;
1066 }
1067
1068 /**
1069 * \brief Applies the contents of the specified config to the device.
1070 *
1071 * This will wait up to #DefaultTimeoutSeconds.
1072 *
1073 * \details Call to apply the selected configs.
1074 *
1075 * \param configs Configs to apply against.
1076 * \returns StatusCode of the set command
1077 */
1082
1083 /**
1084 * \brief Applies the contents of the specified config to the device.
1085 *
1086 * \details Call to apply the selected configs.
1087 *
1088 * \param configs Configs to apply against.
1089 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1090 * \returns StatusCode of the set command
1091 */
1092 ctre::phoenix::StatusCode Apply(const DifferentialConstantsConfigs &configs, units::time::second_t timeoutSeconds)
1093 {
1094 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1095 }
1096
1097 /**
1098 * \brief Refreshes the values of the specified config group.
1099 *
1100 * This will wait up to #DefaultTimeoutSeconds.
1101 *
1102 * \details Call to refresh the selected configs from the device.
1103 *
1104 * \param configs The configs to refresh
1105 * \returns StatusCode of refreshing the configs
1106 */
1108 {
1109 return Refresh(configs, DefaultTimeoutSeconds);
1110 }
1111 /**
1112 * \brief Refreshes the values of the specified config group.
1113 *
1114 * \details Call to refresh the selected configs from the device.
1115 *
1116 * \param configs The configs to refresh
1117 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1118 * \returns StatusCode of refreshing the configs
1119 */
1120 ctre::phoenix::StatusCode Refresh(OpenLoopRampsConfigs &configs, units::time::second_t timeoutSeconds) const
1121 {
1122 std::string ref;
1123 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1124 configs.Deserialize(ref);
1125 return ret;
1126 }
1127
1128 /**
1129 * \brief Applies the contents of the specified config to the device.
1130 *
1131 * This will wait up to #DefaultTimeoutSeconds.
1132 *
1133 * \details Call to apply the selected configs.
1134 *
1135 * \param configs Configs to apply against.
1136 * \returns StatusCode of the set command
1137 */
1139 {
1140 return Apply(configs, DefaultTimeoutSeconds);
1141 }
1142
1143 /**
1144 * \brief Applies the contents of the specified config to the device.
1145 *
1146 * \details Call to apply the selected configs.
1147 *
1148 * \param configs Configs to apply against.
1149 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1150 * \returns StatusCode of the set command
1151 */
1152 ctre::phoenix::StatusCode Apply(const OpenLoopRampsConfigs &configs, units::time::second_t timeoutSeconds)
1153 {
1154 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1155 }
1156
1157 /**
1158 * \brief Refreshes the values of the specified config group.
1159 *
1160 * This will wait up to #DefaultTimeoutSeconds.
1161 *
1162 * \details Call to refresh the selected configs from the device.
1163 *
1164 * \param configs The configs to refresh
1165 * \returns StatusCode of refreshing the configs
1166 */
1168 {
1169 return Refresh(configs, DefaultTimeoutSeconds);
1170 }
1171 /**
1172 * \brief Refreshes the values of the specified config group.
1173 *
1174 * \details Call to refresh the selected configs from the device.
1175 *
1176 * \param configs The configs to refresh
1177 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1178 * \returns StatusCode of refreshing the configs
1179 */
1180 ctre::phoenix::StatusCode Refresh(ClosedLoopRampsConfigs &configs, units::time::second_t timeoutSeconds) const
1181 {
1182 std::string ref;
1183 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1184 configs.Deserialize(ref);
1185 return ret;
1186 }
1187
1188 /**
1189 * \brief Applies the contents of the specified config to the device.
1190 *
1191 * This will wait up to #DefaultTimeoutSeconds.
1192 *
1193 * \details Call to apply the selected configs.
1194 *
1195 * \param configs Configs to apply against.
1196 * \returns StatusCode of the set command
1197 */
1199 {
1200 return Apply(configs, DefaultTimeoutSeconds);
1201 }
1202
1203 /**
1204 * \brief Applies the contents of the specified config to the device.
1205 *
1206 * \details Call to apply the selected configs.
1207 *
1208 * \param configs Configs to apply against.
1209 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1210 * \returns StatusCode of the set command
1211 */
1212 ctre::phoenix::StatusCode Apply(const ClosedLoopRampsConfigs &configs, units::time::second_t timeoutSeconds)
1213 {
1214 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1215 }
1216
1217 /**
1218 * \brief Refreshes the values of the specified config group.
1219 *
1220 * This will wait up to #DefaultTimeoutSeconds.
1221 *
1222 * \details Call to refresh the selected configs from the device.
1223 *
1224 * \param configs The configs to refresh
1225 * \returns StatusCode of refreshing the configs
1226 */
1231 /**
1232 * \brief Refreshes the values of the specified config group.
1233 *
1234 * \details Call to refresh the selected configs from the device.
1235 *
1236 * \param configs The configs to refresh
1237 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1238 * \returns StatusCode of refreshing the configs
1239 */
1240 ctre::phoenix::StatusCode Refresh(HardwareLimitSwitchConfigs &configs, units::time::second_t timeoutSeconds) const
1241 {
1242 std::string ref;
1243 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1244 configs.Deserialize(ref);
1245 return ret;
1246 }
1247
1248 /**
1249 * \brief Applies the contents of the specified config to the device.
1250 *
1251 * This will wait up to #DefaultTimeoutSeconds.
1252 *
1253 * \details Call to apply the selected configs.
1254 *
1255 * \param configs Configs to apply against.
1256 * \returns StatusCode of the set command
1257 */
1259 {
1260 return Apply(configs, DefaultTimeoutSeconds);
1261 }
1262
1263 /**
1264 * \brief Applies the contents of the specified config to the device.
1265 *
1266 * \details Call to apply the selected configs.
1267 *
1268 * \param configs Configs to apply against.
1269 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1270 * \returns StatusCode of the set command
1271 */
1272 ctre::phoenix::StatusCode Apply(const HardwareLimitSwitchConfigs &configs, units::time::second_t timeoutSeconds)
1273 {
1274 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1275 }
1276
1277 /**
1278 * \brief Refreshes the values of the specified config group.
1279 *
1280 * This will wait up to #DefaultTimeoutSeconds.
1281 *
1282 * \details Call to refresh the selected configs from the device.
1283 *
1284 * \param configs The configs to refresh
1285 * \returns StatusCode of refreshing the configs
1286 */
1288 {
1289 return Refresh(configs, DefaultTimeoutSeconds);
1290 }
1291 /**
1292 * \brief Refreshes the values of the specified config group.
1293 *
1294 * \details Call to refresh the selected configs from the device.
1295 *
1296 * \param configs The configs to refresh
1297 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1298 * \returns StatusCode of refreshing the configs
1299 */
1300 ctre::phoenix::StatusCode Refresh(AudioConfigs &configs, units::time::second_t timeoutSeconds) const
1301 {
1302 std::string ref;
1303 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1304 configs.Deserialize(ref);
1305 return ret;
1306 }
1307
1308 /**
1309 * \brief Applies the contents of the specified config to the device.
1310 *
1311 * This will wait up to #DefaultTimeoutSeconds.
1312 *
1313 * \details Call to apply the selected configs.
1314 *
1315 * \param configs Configs to apply against.
1316 * \returns StatusCode of the set command
1317 */
1319 {
1320 return Apply(configs, DefaultTimeoutSeconds);
1321 }
1322
1323 /**
1324 * \brief Applies the contents of the specified config to the device.
1325 *
1326 * \details Call to apply the selected configs.
1327 *
1328 * \param configs Configs to apply against.
1329 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1330 * \returns StatusCode of the set command
1331 */
1332 ctre::phoenix::StatusCode Apply(const AudioConfigs &configs, units::time::second_t timeoutSeconds)
1333 {
1334 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1335 }
1336
1337 /**
1338 * \brief Refreshes the values of the specified config group.
1339 *
1340 * This will wait up to #DefaultTimeoutSeconds.
1341 *
1342 * \details Call to refresh the selected configs from the device.
1343 *
1344 * \param configs The configs to refresh
1345 * \returns StatusCode of refreshing the configs
1346 */
1351 /**
1352 * \brief Refreshes the values of the specified config group.
1353 *
1354 * \details Call to refresh the selected configs from the device.
1355 *
1356 * \param configs The configs to refresh
1357 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1358 * \returns StatusCode of refreshing the configs
1359 */
1360 ctre::phoenix::StatusCode Refresh(SoftwareLimitSwitchConfigs &configs, units::time::second_t timeoutSeconds) const
1361 {
1362 std::string ref;
1363 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1364 configs.Deserialize(ref);
1365 return ret;
1366 }
1367
1368 /**
1369 * \brief Applies the contents of the specified config to the device.
1370 *
1371 * This will wait up to #DefaultTimeoutSeconds.
1372 *
1373 * \details Call to apply the selected configs.
1374 *
1375 * \param configs Configs to apply against.
1376 * \returns StatusCode of the set command
1377 */
1379 {
1380 return Apply(configs, DefaultTimeoutSeconds);
1381 }
1382
1383 /**
1384 * \brief Applies the contents of the specified config to the device.
1385 *
1386 * \details Call to apply the selected configs.
1387 *
1388 * \param configs Configs to apply against.
1389 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1390 * \returns StatusCode of the set command
1391 */
1392 ctre::phoenix::StatusCode Apply(const SoftwareLimitSwitchConfigs &configs, units::time::second_t timeoutSeconds)
1393 {
1394 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1395 }
1396
1397 /**
1398 * \brief Refreshes the values of the specified config group.
1399 *
1400 * This will wait up to #DefaultTimeoutSeconds.
1401 *
1402 * \details Call to refresh the selected configs from the device.
1403 *
1404 * \param configs The configs to refresh
1405 * \returns StatusCode of refreshing the configs
1406 */
1408 {
1409 return Refresh(configs, DefaultTimeoutSeconds);
1410 }
1411 /**
1412 * \brief Refreshes the values of the specified config group.
1413 *
1414 * \details Call to refresh the selected configs from the device.
1415 *
1416 * \param configs The configs to refresh
1417 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1418 * \returns StatusCode of refreshing the configs
1419 */
1420 ctre::phoenix::StatusCode Refresh(MotionMagicConfigs &configs, units::time::second_t timeoutSeconds) const
1421 {
1422 std::string ref;
1423 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1424 configs.Deserialize(ref);
1425 return ret;
1426 }
1427
1428 /**
1429 * \brief Applies the contents of the specified config to the device.
1430 *
1431 * This will wait up to #DefaultTimeoutSeconds.
1432 *
1433 * \details Call to apply the selected configs.
1434 *
1435 * \param configs Configs to apply against.
1436 * \returns StatusCode of the set command
1437 */
1439 {
1440 return Apply(configs, DefaultTimeoutSeconds);
1441 }
1442
1443 /**
1444 * \brief Applies the contents of the specified config to the device.
1445 *
1446 * \details Call to apply the selected configs.
1447 *
1448 * \param configs Configs to apply against.
1449 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1450 * \returns StatusCode of the set command
1451 */
1452 ctre::phoenix::StatusCode Apply(const MotionMagicConfigs &configs, units::time::second_t timeoutSeconds)
1453 {
1454 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1455 }
1456
1457 /**
1458 * \brief Refreshes the values of the specified config group.
1459 *
1460 * This will wait up to #DefaultTimeoutSeconds.
1461 *
1462 * \details Call to refresh the selected configs from the device.
1463 *
1464 * \param configs The configs to refresh
1465 * \returns StatusCode of refreshing the configs
1466 */
1468 {
1469 return Refresh(configs, DefaultTimeoutSeconds);
1470 }
1471 /**
1472 * \brief Refreshes the values of the specified config group.
1473 *
1474 * \details Call to refresh the selected configs from the device.
1475 *
1476 * \param configs The configs to refresh
1477 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1478 * \returns StatusCode of refreshing the configs
1479 */
1480 ctre::phoenix::StatusCode Refresh(CustomParamsConfigs &configs, units::time::second_t timeoutSeconds) const
1481 {
1482 std::string ref;
1483 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1484 configs.Deserialize(ref);
1485 return ret;
1486 }
1487
1488 /**
1489 * \brief Applies the contents of the specified config to the device.
1490 *
1491 * This will wait up to #DefaultTimeoutSeconds.
1492 *
1493 * \details Call to apply the selected configs.
1494 *
1495 * \param configs Configs to apply against.
1496 * \returns StatusCode of the set command
1497 */
1499 {
1500 return Apply(configs, DefaultTimeoutSeconds);
1501 }
1502
1503 /**
1504 * \brief Applies the contents of the specified config to the device.
1505 *
1506 * \details Call to apply the selected configs.
1507 *
1508 * \param configs Configs to apply against.
1509 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1510 * \returns StatusCode of the set command
1511 */
1512 ctre::phoenix::StatusCode Apply(const CustomParamsConfigs &configs, units::time::second_t timeoutSeconds)
1513 {
1514 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1515 }
1516
1517 /**
1518 * \brief Refreshes the values of the specified config group.
1519 *
1520 * This will wait up to #DefaultTimeoutSeconds.
1521 *
1522 * \details Call to refresh the selected configs from the device.
1523 *
1524 * \param configs The configs to refresh
1525 * \returns StatusCode of refreshing the configs
1526 */
1531 /**
1532 * \brief Refreshes the values of the specified config group.
1533 *
1534 * \details Call to refresh the selected configs from the device.
1535 *
1536 * \param configs The configs to refresh
1537 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1538 * \returns StatusCode of refreshing the configs
1539 */
1540 ctre::phoenix::StatusCode Refresh(ClosedLoopGeneralConfigs &configs, units::time::second_t timeoutSeconds) const
1541 {
1542 std::string ref;
1543 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1544 configs.Deserialize(ref);
1545 return ret;
1546 }
1547
1548 /**
1549 * \brief Applies the contents of the specified config to the device.
1550 *
1551 * This will wait up to #DefaultTimeoutSeconds.
1552 *
1553 * \details Call to apply the selected configs.
1554 *
1555 * \param configs Configs to apply against.
1556 * \returns StatusCode of the set command
1557 */
1559 {
1560 return Apply(configs, DefaultTimeoutSeconds);
1561 }
1562
1563 /**
1564 * \brief Applies the contents of the specified config to the device.
1565 *
1566 * \details Call to apply the selected configs.
1567 *
1568 * \param configs Configs to apply against.
1569 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1570 * \returns StatusCode of the set command
1571 */
1572 ctre::phoenix::StatusCode Apply(const ClosedLoopGeneralConfigs &configs, units::time::second_t timeoutSeconds)
1573 {
1574 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1575 }
1576
1577 /**
1578 * \brief Refreshes the values of the specified config group.
1579 *
1580 * This will wait up to #DefaultTimeoutSeconds.
1581 *
1582 * \details Call to refresh the selected configs from the device.
1583 *
1584 * \param configs The configs to refresh
1585 * \returns StatusCode of refreshing the configs
1586 */
1588 {
1589 return Refresh(configs, DefaultTimeoutSeconds);
1590 }
1591 /**
1592 * \brief Refreshes the values of the specified config group.
1593 *
1594 * \details Call to refresh the selected configs from the device.
1595 *
1596 * \param configs The configs to refresh
1597 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1598 * \returns StatusCode of refreshing the configs
1599 */
1600 ctre::phoenix::StatusCode Refresh(CommutationConfigs &configs, units::time::second_t timeoutSeconds) const
1601 {
1602 std::string ref;
1603 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1604 configs.Deserialize(ref);
1605 return ret;
1606 }
1607
1608 /**
1609 * \brief Applies the contents of the specified config to the device.
1610 *
1611 * This will wait up to #DefaultTimeoutSeconds.
1612 *
1613 * \details Call to apply the selected configs.
1614 *
1615 * \param configs Configs to apply against.
1616 * \returns StatusCode of the set command
1617 */
1619 {
1620 return Apply(configs, DefaultTimeoutSeconds);
1621 }
1622
1623 /**
1624 * \brief Applies the contents of the specified config to the device.
1625 *
1626 * \details Call to apply the selected configs.
1627 *
1628 * \param configs Configs to apply against.
1629 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1630 * \returns StatusCode of the set command
1631 */
1632 ctre::phoenix::StatusCode Apply(const CommutationConfigs &configs, units::time::second_t timeoutSeconds)
1633 {
1634 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1635 }
1636
1637 /**
1638 * \brief Refreshes the values of the specified config group.
1639 *
1640 * This will wait up to #DefaultTimeoutSeconds.
1641 *
1642 * \details Call to refresh the selected configs from the device.
1643 *
1644 * \param configs The configs to refresh
1645 * \returns StatusCode of refreshing the configs
1646 */
1648 {
1649 return Refresh(configs, DefaultTimeoutSeconds);
1650 }
1651 /**
1652 * \brief Refreshes the values of the specified config group.
1653 *
1654 * \details Call to refresh the selected configs from the device.
1655 *
1656 * \param configs The configs to refresh
1657 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1658 * \returns StatusCode of refreshing the configs
1659 */
1660 ctre::phoenix::StatusCode Refresh(Slot0Configs &configs, units::time::second_t timeoutSeconds) const
1661 {
1662 std::string ref;
1663 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1664 configs.Deserialize(ref);
1665 return ret;
1666 }
1667
1668 /**
1669 * \brief Applies the contents of the specified config to the device.
1670 *
1671 * This will wait up to #DefaultTimeoutSeconds.
1672 *
1673 * \details Call to apply the selected configs.
1674 *
1675 * \param configs Configs to apply against.
1676 * \returns StatusCode of the set command
1677 */
1679 {
1680 return Apply(configs, DefaultTimeoutSeconds);
1681 }
1682
1683 /**
1684 * \brief Applies the contents of the specified config to the device.
1685 *
1686 * \details Call to apply the selected configs.
1687 *
1688 * \param configs Configs to apply against.
1689 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1690 * \returns StatusCode of the set command
1691 */
1692 ctre::phoenix::StatusCode Apply(const Slot0Configs &configs, units::time::second_t timeoutSeconds)
1693 {
1694 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1695 }
1696
1697 /**
1698 * \brief Refreshes the values of the specified config group.
1699 *
1700 * This will wait up to #DefaultTimeoutSeconds.
1701 *
1702 * \details Call to refresh the selected configs from the device.
1703 *
1704 * \param configs The configs to refresh
1705 * \returns StatusCode of refreshing the configs
1706 */
1708 {
1709 return Refresh(configs, DefaultTimeoutSeconds);
1710 }
1711 /**
1712 * \brief Refreshes the values of the specified config group.
1713 *
1714 * \details Call to refresh the selected configs from the device.
1715 *
1716 * \param configs The configs to refresh
1717 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1718 * \returns StatusCode of refreshing the configs
1719 */
1720 ctre::phoenix::StatusCode Refresh(Slot1Configs &configs, units::time::second_t timeoutSeconds) const
1721 {
1722 std::string ref;
1723 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1724 configs.Deserialize(ref);
1725 return ret;
1726 }
1727
1728 /**
1729 * \brief Applies the contents of the specified config to the device.
1730 *
1731 * This will wait up to #DefaultTimeoutSeconds.
1732 *
1733 * \details Call to apply the selected configs.
1734 *
1735 * \param configs Configs to apply against.
1736 * \returns StatusCode of the set command
1737 */
1739 {
1740 return Apply(configs, DefaultTimeoutSeconds);
1741 }
1742
1743 /**
1744 * \brief Applies the contents of the specified config to the device.
1745 *
1746 * \details Call to apply the selected configs.
1747 *
1748 * \param configs Configs to apply against.
1749 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1750 * \returns StatusCode of the set command
1751 */
1752 ctre::phoenix::StatusCode Apply(const Slot1Configs &configs, units::time::second_t timeoutSeconds)
1753 {
1754 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1755 }
1756
1757 /**
1758 * \brief Refreshes the values of the specified config group.
1759 *
1760 * This will wait up to #DefaultTimeoutSeconds.
1761 *
1762 * \details Call to refresh the selected configs from the device.
1763 *
1764 * \param configs The configs to refresh
1765 * \returns StatusCode of refreshing the configs
1766 */
1768 {
1769 return Refresh(configs, DefaultTimeoutSeconds);
1770 }
1771 /**
1772 * \brief Refreshes the values of the specified config group.
1773 *
1774 * \details Call to refresh the selected configs from the device.
1775 *
1776 * \param configs The configs to refresh
1777 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1778 * \returns StatusCode of refreshing the configs
1779 */
1780 ctre::phoenix::StatusCode Refresh(Slot2Configs &configs, units::time::second_t timeoutSeconds) const
1781 {
1782 std::string ref;
1783 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1784 configs.Deserialize(ref);
1785 return ret;
1786 }
1787
1788 /**
1789 * \brief Applies the contents of the specified config to the device.
1790 *
1791 * This will wait up to #DefaultTimeoutSeconds.
1792 *
1793 * \details Call to apply the selected configs.
1794 *
1795 * \param configs Configs to apply against.
1796 * \returns StatusCode of the set command
1797 */
1799 {
1800 return Apply(configs, DefaultTimeoutSeconds);
1801 }
1802
1803 /**
1804 * \brief Applies the contents of the specified config to the device.
1805 *
1806 * \details Call to apply the selected configs.
1807 *
1808 * \param configs Configs to apply against.
1809 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1810 * \returns StatusCode of the set command
1811 */
1812 ctre::phoenix::StatusCode Apply(const Slot2Configs &configs, units::time::second_t timeoutSeconds)
1813 {
1814 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1815 }
1816
1817 /**
1818 * \brief Refreshes the values of the specified config group.
1819 *
1820 * This will wait up to #DefaultTimeoutSeconds.
1821 *
1822 * \details Call to refresh the selected configs from the device.
1823 *
1824 * \param configs The configs to refresh
1825 * \returns StatusCode of refreshing the configs
1826 */
1828 {
1829 return Refresh(configs, DefaultTimeoutSeconds);
1830 }
1831 /**
1832 * \brief Refreshes the values of the specified config group.
1833 *
1834 * \details Call to refresh the selected configs from the device.
1835 *
1836 * \param configs The configs to refresh
1837 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1838 * \returns StatusCode of refreshing the configs
1839 */
1840 ctre::phoenix::StatusCode Refresh(SlotConfigs &configs, units::time::second_t timeoutSeconds) const
1841 {
1842 std::string ref;
1843 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
1844 configs.Deserialize(ref);
1845 return ret;
1846 }
1847
1848 /**
1849 * \brief Applies the contents of the specified config to the device.
1850 *
1851 * This will wait up to #DefaultTimeoutSeconds.
1852 *
1853 * \details Call to apply the selected configs.
1854 *
1855 * \param configs Configs to apply against.
1856 * \returns StatusCode of the set command
1857 */
1859 {
1860 return Apply(configs, DefaultTimeoutSeconds);
1861 }
1862
1863 /**
1864 * \brief Applies the contents of the specified config to the device.
1865 *
1866 * \details Call to apply the selected configs.
1867 *
1868 * \param configs Configs to apply against.
1869 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
1870 * \returns StatusCode of the set command
1871 */
1872 ctre::phoenix::StatusCode Apply(const SlotConfigs &configs, units::time::second_t timeoutSeconds)
1873 {
1874 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
1875 }
1876
1877
1878 /**
1879 * \brief Sets the mechanism position of the device in mechanism
1880 * rotations.
1881 *
1882 * This will wait up to #DefaultTimeoutSeconds.
1883 *
1884 * This is available in the configurator in case the user wants
1885 * to initialize their device entirely without passing a device
1886 * reference down to the code that performs the initialization.
1887 * In this case, the user passes down the configurator object
1888 * and performs all the initialization code on the object.
1889 *
1890 * \param newValue Value to set to. Units are in rotations.
1891 * \returns StatusCode of the set command
1892 */
1893 ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue)
1894 {
1895 return SetPosition(newValue, DefaultTimeoutSeconds);
1896 }
1897 /**
1898 * \brief Sets the mechanism position of the device in mechanism
1899 * rotations.
1900 *
1901 * This is available in the configurator in case the user wants
1902 * to initialize their device entirely without passing a device
1903 * reference down to the code that performs the initialization.
1904 * In this case, the user passes down the configurator object
1905 * and performs all the initialization code on the object.
1906 *
1907 * \param newValue Value to set to. Units are in rotations.
1908 * \param timeoutSeconds Maximum time to wait up to in seconds.
1909 * \returns StatusCode of the set command
1910 */
1911 ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds)
1912 {
1913 std::stringstream ss;
1914 char *ref;
1915 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::TalonFX_SetSensorPosition, newValue.to<double>(), &ref); if (ref != nullptr) { ss << ref; free(ref); }
1916 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
1917 }
1918
1919 /**
1920 * \brief Clear the sticky faults in the device.
1921 *
1922 * \details This typically has no impact on the device functionality.
1923 * Instead, it just clears telemetry faults that are accessible via
1924 * API and Tuner Self-Test.
1925 *
1926 * This will wait up to #DefaultTimeoutSeconds.
1927 *
1928 * This is available in the configurator in case the user wants
1929 * to initialize their device entirely without passing a device
1930 * reference down to the code that performs the initialization.
1931 * In this case, the user passes down the configurator object
1932 * and performs all the initialization code on the object.
1933 *
1934 * \returns StatusCode of the set command
1935 */
1940 /**
1941 * \brief Clear the sticky faults in the device.
1942 *
1943 * \details This typically has no impact on the device functionality.
1944 * Instead, it just clears telemetry faults that are accessible via
1945 * API and Tuner Self-Test.
1946 *
1947 * This is available in the configurator in case the user wants
1948 * to initialize their device entirely without passing a device
1949 * reference down to the code that performs the initialization.
1950 * In this case, the user passes down the configurator object
1951 * and performs all the initialization code on the object.
1952 *
1953 * \param timeoutSeconds Maximum time to wait up to in seconds.
1954 * \returns StatusCode of the set command
1955 */
1956 ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds)
1957 {
1958 std::stringstream ss;
1959 char *ref;
1960 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::SPN_ClearStickyFaults, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
1961 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
1962 }
1963
1964 /**
1965 * \brief Clear sticky fault: Hardware fault occurred
1966 *
1967 * This will wait up to #DefaultTimeoutSeconds.
1968 *
1969 * This is available in the configurator in case the user wants
1970 * to initialize their device entirely without passing a device
1971 * reference down to the code that performs the initialization.
1972 * In this case, the user passes down the configurator object
1973 * and performs all the initialization code on the object.
1974 *
1975 * \returns StatusCode of the set command
1976 */
1981 /**
1982 * \brief Clear sticky fault: Hardware fault occurred
1983 *
1984 * This is available in the configurator in case the user wants
1985 * to initialize their device entirely without passing a device
1986 * reference down to the code that performs the initialization.
1987 * In this case, the user passes down the configurator object
1988 * and performs all the initialization code on the object.
1989 *
1990 * \param timeoutSeconds Maximum time to wait up to in seconds.
1991 * \returns StatusCode of the set command
1992 */
1993 ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds)
1994 {
1995 std::stringstream ss;
1996 char *ref;
1997 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_Hardware, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
1998 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
1999 }
2000
2001 /**
2002 * \brief Clear sticky fault: Processor temperature exceeded limit
2003 *
2004 * This will wait up to #DefaultTimeoutSeconds.
2005 *
2006 * This is available in the configurator in case the user wants
2007 * to initialize their device entirely without passing a device
2008 * reference down to the code that performs the initialization.
2009 * In this case, the user passes down the configurator object
2010 * and performs all the initialization code on the object.
2011 *
2012 * \returns StatusCode of the set command
2013 */
2018 /**
2019 * \brief Clear sticky fault: Processor temperature exceeded limit
2020 *
2021 * This is available in the configurator in case the user wants
2022 * to initialize their device entirely without passing a device
2023 * reference down to the code that performs the initialization.
2024 * In this case, the user passes down the configurator object
2025 * and performs all the initialization code on the object.
2026 *
2027 * \param timeoutSeconds Maximum time to wait up to in seconds.
2028 * \returns StatusCode of the set command
2029 */
2030 ctre::phoenix::StatusCode ClearStickyFault_ProcTemp(units::time::second_t timeoutSeconds)
2031 {
2032 std::stringstream ss;
2033 char *ref;
2034 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_ProcTemp, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2035 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2036 }
2037
2038 /**
2039 * \brief Clear sticky fault: Device temperature exceeded limit
2040 *
2041 * This will wait up to #DefaultTimeoutSeconds.
2042 *
2043 * This is available in the configurator in case the user wants
2044 * to initialize their device entirely without passing a device
2045 * reference down to the code that performs the initialization.
2046 * In this case, the user passes down the configurator object
2047 * and performs all the initialization code on the object.
2048 *
2049 * \returns StatusCode of the set command
2050 */
2055 /**
2056 * \brief Clear sticky fault: Device temperature exceeded limit
2057 *
2058 * This is available in the configurator in case the user wants
2059 * to initialize their device entirely without passing a device
2060 * reference down to the code that performs the initialization.
2061 * In this case, the user passes down the configurator object
2062 * and performs all the initialization code on the object.
2063 *
2064 * \param timeoutSeconds Maximum time to wait up to in seconds.
2065 * \returns StatusCode of the set command
2066 */
2067 ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp(units::time::second_t timeoutSeconds)
2068 {
2069 std::stringstream ss;
2070 char *ref;
2071 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_DeviceTemp, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2072 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2073 }
2074
2075 /**
2076 * \brief Clear sticky fault: Device supply voltage dropped to near
2077 * brownout levels
2078 *
2079 * This will wait up to #DefaultTimeoutSeconds.
2080 *
2081 * This is available in the configurator in case the user wants
2082 * to initialize their device entirely without passing a device
2083 * reference down to the code that performs the initialization.
2084 * In this case, the user passes down the configurator object
2085 * and performs all the initialization code on the object.
2086 *
2087 * \returns StatusCode of the set command
2088 */
2093 /**
2094 * \brief Clear sticky fault: Device supply voltage dropped to near
2095 * brownout levels
2096 *
2097 * This is available in the configurator in case the user wants
2098 * to initialize their device entirely without passing a device
2099 * reference down to the code that performs the initialization.
2100 * In this case, the user passes down the configurator object
2101 * and performs all the initialization code on the object.
2102 *
2103 * \param timeoutSeconds Maximum time to wait up to in seconds.
2104 * \returns StatusCode of the set command
2105 */
2106 ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds)
2107 {
2108 std::stringstream ss;
2109 char *ref;
2110 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_Undervoltage, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2111 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2112 }
2113
2114 /**
2115 * \brief Clear sticky fault: Device boot while detecting the enable
2116 * signal
2117 *
2118 * This will wait up to #DefaultTimeoutSeconds.
2119 *
2120 * This is available in the configurator in case the user wants
2121 * to initialize their device entirely without passing a device
2122 * reference down to the code that performs the initialization.
2123 * In this case, the user passes down the configurator object
2124 * and performs all the initialization code on the object.
2125 *
2126 * \returns StatusCode of the set command
2127 */
2132 /**
2133 * \brief Clear sticky fault: Device boot while detecting the enable
2134 * signal
2135 *
2136 * This is available in the configurator in case the user wants
2137 * to initialize their device entirely without passing a device
2138 * reference down to the code that performs the initialization.
2139 * In this case, the user passes down the configurator object
2140 * and performs all the initialization code on the object.
2141 *
2142 * \param timeoutSeconds Maximum time to wait up to in seconds.
2143 * \returns StatusCode of the set command
2144 */
2146 {
2147 std::stringstream ss;
2148 char *ref;
2149 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_BootDuringEnable, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2150 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2151 }
2152
2153 /**
2154 * \brief Clear sticky fault: An unlicensed feature is in use, device
2155 * may not behave as expected.
2156 *
2157 * This will wait up to #DefaultTimeoutSeconds.
2158 *
2159 * This is available in the configurator in case the user wants
2160 * to initialize their device entirely without passing a device
2161 * reference down to the code that performs the initialization.
2162 * In this case, the user passes down the configurator object
2163 * and performs all the initialization code on the object.
2164 *
2165 * \returns StatusCode of the set command
2166 */
2171 /**
2172 * \brief Clear sticky fault: An unlicensed feature is in use, device
2173 * may not behave as expected.
2174 *
2175 * This is available in the configurator in case the user wants
2176 * to initialize their device entirely without passing a device
2177 * reference down to the code that performs the initialization.
2178 * In this case, the user passes down the configurator object
2179 * and performs all the initialization code on the object.
2180 *
2181 * \param timeoutSeconds Maximum time to wait up to in seconds.
2182 * \returns StatusCode of the set command
2183 */
2185 {
2186 std::stringstream ss;
2187 char *ref;
2188 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_UnlicensedFeatureInUse, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2189 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2190 }
2191
2192 /**
2193 * \brief Clear sticky fault: Bridge was disabled most likely due to
2194 * supply voltage dropping too low.
2195 *
2196 * This will wait up to #DefaultTimeoutSeconds.
2197 *
2198 * This is available in the configurator in case the user wants
2199 * to initialize their device entirely without passing a device
2200 * reference down to the code that performs the initialization.
2201 * In this case, the user passes down the configurator object
2202 * and performs all the initialization code on the object.
2203 *
2204 * \returns StatusCode of the set command
2205 */
2210 /**
2211 * \brief Clear sticky fault: Bridge was disabled most likely due to
2212 * supply voltage dropping too low.
2213 *
2214 * This is available in the configurator in case the user wants
2215 * to initialize their device entirely without passing a device
2216 * reference down to the code that performs the initialization.
2217 * In this case, the user passes down the configurator object
2218 * and performs all the initialization code on the object.
2219 *
2220 * \param timeoutSeconds Maximum time to wait up to in seconds.
2221 * \returns StatusCode of the set command
2222 */
2224 {
2225 std::stringstream ss;
2226 char *ref;
2227 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_BridgeBrownout, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2228 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2229 }
2230
2231 /**
2232 * \brief Clear sticky fault: The remote sensor has reset.
2233 *
2234 * This will wait up to #DefaultTimeoutSeconds.
2235 *
2236 * This is available in the configurator in case the user wants
2237 * to initialize their device entirely without passing a device
2238 * reference down to the code that performs the initialization.
2239 * In this case, the user passes down the configurator object
2240 * and performs all the initialization code on the object.
2241 *
2242 * \returns StatusCode of the set command
2243 */
2248 /**
2249 * \brief Clear sticky fault: The remote sensor has reset.
2250 *
2251 * This is available in the configurator in case the user wants
2252 * to initialize their device entirely without passing a device
2253 * reference down to the code that performs the initialization.
2254 * In this case, the user passes down the configurator object
2255 * and performs all the initialization code on the object.
2256 *
2257 * \param timeoutSeconds Maximum time to wait up to in seconds.
2258 * \returns StatusCode of the set command
2259 */
2261 {
2262 std::stringstream ss;
2263 char *ref;
2264 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_RemoteSensorReset, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2265 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2266 }
2267
2268 /**
2269 * \brief Clear sticky fault: The remote Talon used for differential
2270 * control is not present on CAN Bus.
2271 *
2272 * This will wait up to #DefaultTimeoutSeconds.
2273 *
2274 * This is available in the configurator in case the user wants
2275 * to initialize their device entirely without passing a device
2276 * reference down to the code that performs the initialization.
2277 * In this case, the user passes down the configurator object
2278 * and performs all the initialization code on the object.
2279 *
2280 * \returns StatusCode of the set command
2281 */
2286 /**
2287 * \brief Clear sticky fault: The remote Talon used for differential
2288 * control is not present on CAN Bus.
2289 *
2290 * This is available in the configurator in case the user wants
2291 * to initialize their device entirely without passing a device
2292 * reference down to the code that performs the initialization.
2293 * In this case, the user passes down the configurator object
2294 * and performs all the initialization code on the object.
2295 *
2296 * \param timeoutSeconds Maximum time to wait up to in seconds.
2297 * \returns StatusCode of the set command
2298 */
2300 {
2301 std::stringstream ss;
2302 char *ref;
2303 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_MissingDifferentialFX, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2304 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2305 }
2306
2307 /**
2308 * \brief Clear sticky fault: The remote sensor position has
2309 * overflowed. Because of the nature of remote sensors, it is possible
2310 * for the remote sensor position to overflow beyond what is supported
2311 * by the status signal frame. However, this is rare and cannot occur
2312 * over the course of an FRC match under normal use.
2313 *
2314 * This will wait up to #DefaultTimeoutSeconds.
2315 *
2316 * This is available in the configurator in case the user wants
2317 * to initialize their device entirely without passing a device
2318 * reference down to the code that performs the initialization.
2319 * In this case, the user passes down the configurator object
2320 * and performs all the initialization code on the object.
2321 *
2322 * \returns StatusCode of the set command
2323 */
2328 /**
2329 * \brief Clear sticky fault: The remote sensor position has
2330 * overflowed. Because of the nature of remote sensors, it is possible
2331 * for the remote sensor position to overflow beyond what is supported
2332 * by the status signal frame. However, this is rare and cannot occur
2333 * over the course of an FRC match under normal use.
2334 *
2335 * This is available in the configurator in case the user wants
2336 * to initialize their device entirely without passing a device
2337 * reference down to the code that performs the initialization.
2338 * In this case, the user passes down the configurator object
2339 * and performs all the initialization code on the object.
2340 *
2341 * \param timeoutSeconds Maximum time to wait up to in seconds.
2342 * \returns StatusCode of the set command
2343 */
2345 {
2346 std::stringstream ss;
2347 char *ref;
2348 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_RemoteSensorPosOverflow, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2349 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2350 }
2351
2352 /**
2353 * \brief Clear sticky fault: Supply Voltage has exceeded the maximum
2354 * voltage rating of device.
2355 *
2356 * This will wait up to #DefaultTimeoutSeconds.
2357 *
2358 * This is available in the configurator in case the user wants
2359 * to initialize their device entirely without passing a device
2360 * reference down to the code that performs the initialization.
2361 * In this case, the user passes down the configurator object
2362 * and performs all the initialization code on the object.
2363 *
2364 * \returns StatusCode of the set command
2365 */
2370 /**
2371 * \brief Clear sticky fault: Supply Voltage has exceeded the maximum
2372 * voltage rating of device.
2373 *
2374 * This is available in the configurator in case the user wants
2375 * to initialize their device entirely without passing a device
2376 * reference down to the code that performs the initialization.
2377 * In this case, the user passes down the configurator object
2378 * and performs all the initialization code on the object.
2379 *
2380 * \param timeoutSeconds Maximum time to wait up to in seconds.
2381 * \returns StatusCode of the set command
2382 */
2383 ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV(units::time::second_t timeoutSeconds)
2384 {
2385 std::stringstream ss;
2386 char *ref;
2387 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_OverSupplyV, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2388 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2389 }
2390
2391 /**
2392 * \brief Clear sticky fault: Supply Voltage is unstable. Ensure you
2393 * are using a battery and current limited power supply.
2394 *
2395 * This will wait up to #DefaultTimeoutSeconds.
2396 *
2397 * This is available in the configurator in case the user wants
2398 * to initialize their device entirely without passing a device
2399 * reference down to the code that performs the initialization.
2400 * In this case, the user passes down the configurator object
2401 * and performs all the initialization code on the object.
2402 *
2403 * \returns StatusCode of the set command
2404 */
2409 /**
2410 * \brief Clear sticky fault: Supply Voltage is unstable. Ensure you
2411 * are using a battery and current limited power supply.
2412 *
2413 * This is available in the configurator in case the user wants
2414 * to initialize their device entirely without passing a device
2415 * reference down to the code that performs the initialization.
2416 * In this case, the user passes down the configurator object
2417 * and performs all the initialization code on the object.
2418 *
2419 * \param timeoutSeconds Maximum time to wait up to in seconds.
2420 * \returns StatusCode of the set command
2421 */
2423 {
2424 std::stringstream ss;
2425 char *ref;
2426 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_UnstableSupplyV, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2427 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2428 }
2429
2430 /**
2431 * \brief Clear sticky fault: Reverse limit switch has been asserted.
2432 * Output is set to neutral.
2433 *
2434 * This will wait up to #DefaultTimeoutSeconds.
2435 *
2436 * This is available in the configurator in case the user wants
2437 * to initialize their device entirely without passing a device
2438 * reference down to the code that performs the initialization.
2439 * In this case, the user passes down the configurator object
2440 * and performs all the initialization code on the object.
2441 *
2442 * \returns StatusCode of the set command
2443 */
2448 /**
2449 * \brief Clear sticky fault: Reverse limit switch has been asserted.
2450 * Output is set to neutral.
2451 *
2452 * This is available in the configurator in case the user wants
2453 * to initialize their device entirely without passing a device
2454 * reference down to the code that performs the initialization.
2455 * In this case, the user passes down the configurator object
2456 * and performs all the initialization code on the object.
2457 *
2458 * \param timeoutSeconds Maximum time to wait up to in seconds.
2459 * \returns StatusCode of the set command
2460 */
2462 {
2463 std::stringstream ss;
2464 char *ref;
2465 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_ReverseHardLimit, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2466 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2467 }
2468
2469 /**
2470 * \brief Clear sticky fault: Forward limit switch has been asserted.
2471 * Output is set to neutral.
2472 *
2473 * This will wait up to #DefaultTimeoutSeconds.
2474 *
2475 * This is available in the configurator in case the user wants
2476 * to initialize their device entirely without passing a device
2477 * reference down to the code that performs the initialization.
2478 * In this case, the user passes down the configurator object
2479 * and performs all the initialization code on the object.
2480 *
2481 * \returns StatusCode of the set command
2482 */
2487 /**
2488 * \brief Clear sticky fault: Forward limit switch has been asserted.
2489 * Output is set to neutral.
2490 *
2491 * This is available in the configurator in case the user wants
2492 * to initialize their device entirely without passing a device
2493 * reference down to the code that performs the initialization.
2494 * In this case, the user passes down the configurator object
2495 * and performs all the initialization code on the object.
2496 *
2497 * \param timeoutSeconds Maximum time to wait up to in seconds.
2498 * \returns StatusCode of the set command
2499 */
2501 {
2502 std::stringstream ss;
2503 char *ref;
2504 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_ForwardHardLimit, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2505 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2506 }
2507
2508 /**
2509 * \brief Clear sticky fault: Reverse soft limit has been asserted.
2510 * Output is set to neutral.
2511 *
2512 * This will wait up to #DefaultTimeoutSeconds.
2513 *
2514 * This is available in the configurator in case the user wants
2515 * to initialize their device entirely without passing a device
2516 * reference down to the code that performs the initialization.
2517 * In this case, the user passes down the configurator object
2518 * and performs all the initialization code on the object.
2519 *
2520 * \returns StatusCode of the set command
2521 */
2526 /**
2527 * \brief Clear sticky fault: Reverse soft limit has been asserted.
2528 * Output is set to neutral.
2529 *
2530 * This is available in the configurator in case the user wants
2531 * to initialize their device entirely without passing a device
2532 * reference down to the code that performs the initialization.
2533 * In this case, the user passes down the configurator object
2534 * and performs all the initialization code on the object.
2535 *
2536 * \param timeoutSeconds Maximum time to wait up to in seconds.
2537 * \returns StatusCode of the set command
2538 */
2540 {
2541 std::stringstream ss;
2542 char *ref;
2543 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_ReverseSoftLimit, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2544 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2545 }
2546
2547 /**
2548 * \brief Clear sticky fault: Forward soft limit has been asserted.
2549 * Output is set to neutral.
2550 *
2551 * This will wait up to #DefaultTimeoutSeconds.
2552 *
2553 * This is available in the configurator in case the user wants
2554 * to initialize their device entirely without passing a device
2555 * reference down to the code that performs the initialization.
2556 * In this case, the user passes down the configurator object
2557 * and performs all the initialization code on the object.
2558 *
2559 * \returns StatusCode of the set command
2560 */
2565 /**
2566 * \brief Clear sticky fault: Forward soft limit has been asserted.
2567 * Output is set to neutral.
2568 *
2569 * This is available in the configurator in case the user wants
2570 * to initialize their device entirely without passing a device
2571 * reference down to the code that performs the initialization.
2572 * In this case, the user passes down the configurator object
2573 * and performs all the initialization code on the object.
2574 *
2575 * \param timeoutSeconds Maximum time to wait up to in seconds.
2576 * \returns StatusCode of the set command
2577 */
2579 {
2580 std::stringstream ss;
2581 char *ref;
2582 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_ForwardSoftLimit, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2583 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2584 }
2585
2586 /**
2587 * \brief Clear sticky fault: The remote soft limit device is not
2588 * present on CAN Bus.
2589 *
2590 * This will wait up to #DefaultTimeoutSeconds.
2591 *
2592 * This is available in the configurator in case the user wants
2593 * to initialize their device entirely without passing a device
2594 * reference down to the code that performs the initialization.
2595 * In this case, the user passes down the configurator object
2596 * and performs all the initialization code on the object.
2597 *
2598 * \returns StatusCode of the set command
2599 */
2604 /**
2605 * \brief Clear sticky fault: The remote soft limit device is not
2606 * present on CAN Bus.
2607 *
2608 * This is available in the configurator in case the user wants
2609 * to initialize their device entirely without passing a device
2610 * reference down to the code that performs the initialization.
2611 * In this case, the user passes down the configurator object
2612 * and performs all the initialization code on the object.
2613 *
2614 * \param timeoutSeconds Maximum time to wait up to in seconds.
2615 * \returns StatusCode of the set command
2616 */
2618 {
2619 std::stringstream ss;
2620 char *ref;
2621 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_MissingRemSoftLim, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2622 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2623 }
2624
2625 /**
2626 * \brief Clear sticky fault: The remote limit switch device is not
2627 * present on CAN Bus.
2628 *
2629 * This will wait up to #DefaultTimeoutSeconds.
2630 *
2631 * This is available in the configurator in case the user wants
2632 * to initialize their device entirely without passing a device
2633 * reference down to the code that performs the initialization.
2634 * In this case, the user passes down the configurator object
2635 * and performs all the initialization code on the object.
2636 *
2637 * \returns StatusCode of the set command
2638 */
2643 /**
2644 * \brief Clear sticky fault: The remote limit switch device is not
2645 * present on CAN Bus.
2646 *
2647 * This is available in the configurator in case the user wants
2648 * to initialize their device entirely without passing a device
2649 * reference down to the code that performs the initialization.
2650 * In this case, the user passes down the configurator object
2651 * and performs all the initialization code on the object.
2652 *
2653 * \param timeoutSeconds Maximum time to wait up to in seconds.
2654 * \returns StatusCode of the set command
2655 */
2657 {
2658 std::stringstream ss;
2659 char *ref;
2660 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_MissingRemHardLim, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2661 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2662 }
2663
2664 /**
2665 * \brief Clear sticky fault: The remote sensor's data is no longer
2666 * trusted. This can happen if the remote sensor disappears from the
2667 * CAN bus or if the remote sensor indicates its data is no longer
2668 * valid, such as when a CANcoder's magnet strength falls into the
2669 * "red" range.
2670 *
2671 * This will wait up to #DefaultTimeoutSeconds.
2672 *
2673 * This is available in the configurator in case the user wants
2674 * to initialize their device entirely without passing a device
2675 * reference down to the code that performs the initialization.
2676 * In this case, the user passes down the configurator object
2677 * and performs all the initialization code on the object.
2678 *
2679 * \returns StatusCode of the set command
2680 */
2685 /**
2686 * \brief Clear sticky fault: The remote sensor's data is no longer
2687 * trusted. This can happen if the remote sensor disappears from the
2688 * CAN bus or if the remote sensor indicates its data is no longer
2689 * valid, such as when a CANcoder's magnet strength falls into the
2690 * "red" range.
2691 *
2692 * This is available in the configurator in case the user wants
2693 * to initialize their device entirely without passing a device
2694 * reference down to the code that performs the initialization.
2695 * In this case, the user passes down the configurator object
2696 * and performs all the initialization code on the object.
2697 *
2698 * \param timeoutSeconds Maximum time to wait up to in seconds.
2699 * \returns StatusCode of the set command
2700 */
2702 {
2703 std::stringstream ss;
2704 char *ref;
2705 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_MissingRemoteSensor, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2706 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2707 }
2708
2709 /**
2710 * \brief Clear sticky fault: The remote sensor used for fusion has
2711 * fallen out of sync to the local sensor. A re-synchronization has
2712 * occurred, which may cause a discontinuity. This typically happens
2713 * if there is significant slop in the mechanism, or if the
2714 * RotorToSensorRatio configuration parameter is incorrect.
2715 *
2716 * This will wait up to #DefaultTimeoutSeconds.
2717 *
2718 * This is available in the configurator in case the user wants
2719 * to initialize their device entirely without passing a device
2720 * reference down to the code that performs the initialization.
2721 * In this case, the user passes down the configurator object
2722 * and performs all the initialization code on the object.
2723 *
2724 * \returns StatusCode of the set command
2725 */
2730 /**
2731 * \brief Clear sticky fault: The remote sensor used for fusion has
2732 * fallen out of sync to the local sensor. A re-synchronization has
2733 * occurred, which may cause a discontinuity. This typically happens
2734 * if there is significant slop in the mechanism, or if the
2735 * RotorToSensorRatio configuration parameter is incorrect.
2736 *
2737 * This is available in the configurator in case the user wants
2738 * to initialize their device entirely without passing a device
2739 * reference down to the code that performs the initialization.
2740 * In this case, the user passes down the configurator object
2741 * and performs all the initialization code on the object.
2742 *
2743 * \param timeoutSeconds Maximum time to wait up to in seconds.
2744 * \returns StatusCode of the set command
2745 */
2747 {
2748 std::stringstream ss;
2749 char *ref;
2750 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_FusedSensorOutOfSync, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2751 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2752 }
2753
2754 /**
2755 * \brief Clear sticky fault: Stator current limit occured.
2756 *
2757 * This will wait up to #DefaultTimeoutSeconds.
2758 *
2759 * This is available in the configurator in case the user wants
2760 * to initialize their device entirely without passing a device
2761 * reference down to the code that performs the initialization.
2762 * In this case, the user passes down the configurator object
2763 * and performs all the initialization code on the object.
2764 *
2765 * \returns StatusCode of the set command
2766 */
2771 /**
2772 * \brief Clear sticky fault: Stator current limit occured.
2773 *
2774 * This is available in the configurator in case the user wants
2775 * to initialize their device entirely without passing a device
2776 * reference down to the code that performs the initialization.
2777 * In this case, the user passes down the configurator object
2778 * and performs all the initialization code on the object.
2779 *
2780 * \param timeoutSeconds Maximum time to wait up to in seconds.
2781 * \returns StatusCode of the set command
2782 */
2784 {
2785 std::stringstream ss;
2786 char *ref;
2787 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_StatorCurrLimit, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2788 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2789 }
2790
2791 /**
2792 * \brief Clear sticky fault: Supply current limit occured.
2793 *
2794 * This will wait up to #DefaultTimeoutSeconds.
2795 *
2796 * This is available in the configurator in case the user wants
2797 * to initialize their device entirely without passing a device
2798 * reference down to the code that performs the initialization.
2799 * In this case, the user passes down the configurator object
2800 * and performs all the initialization code on the object.
2801 *
2802 * \returns StatusCode of the set command
2803 */
2808 /**
2809 * \brief Clear sticky fault: Supply current limit occured.
2810 *
2811 * This is available in the configurator in case the user wants
2812 * to initialize their device entirely without passing a device
2813 * reference down to the code that performs the initialization.
2814 * In this case, the user passes down the configurator object
2815 * and performs all the initialization code on the object.
2816 *
2817 * \param timeoutSeconds Maximum time to wait up to in seconds.
2818 * \returns StatusCode of the set command
2819 */
2821 {
2822 std::stringstream ss;
2823 char *ref;
2824 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_SupplyCurrLimit, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2825 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2826 }
2827
2828 /**
2829 * \brief Clear sticky fault: Using Fused CANcoder feature while
2830 * unlicensed. Device has fallen back to remote CANcoder.
2831 *
2832 * This will wait up to #DefaultTimeoutSeconds.
2833 *
2834 * This is available in the configurator in case the user wants
2835 * to initialize their device entirely without passing a device
2836 * reference down to the code that performs the initialization.
2837 * In this case, the user passes down the configurator object
2838 * and performs all the initialization code on the object.
2839 *
2840 * \returns StatusCode of the set command
2841 */
2846 /**
2847 * \brief Clear sticky fault: Using Fused CANcoder feature while
2848 * unlicensed. Device has fallen back to remote CANcoder.
2849 *
2850 * This is available in the configurator in case the user wants
2851 * to initialize their device entirely without passing a device
2852 * reference down to the code that performs the initialization.
2853 * In this case, the user passes down the configurator object
2854 * and performs all the initialization code on the object.
2855 *
2856 * \param timeoutSeconds Maximum time to wait up to in seconds.
2857 * \returns StatusCode of the set command
2858 */
2860 {
2861 std::stringstream ss;
2862 char *ref;
2863 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_UsingFusedCCWhileUnlicensed, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2864 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2865 }
2866
2867 /**
2868 * \brief Clear sticky fault: Static brake was momentarily disabled
2869 * due to excessive braking current while disabled.
2870 *
2871 * This will wait up to #DefaultTimeoutSeconds.
2872 *
2873 * This is available in the configurator in case the user wants
2874 * to initialize their device entirely without passing a device
2875 * reference down to the code that performs the initialization.
2876 * In this case, the user passes down the configurator object
2877 * and performs all the initialization code on the object.
2878 *
2879 * \returns StatusCode of the set command
2880 */
2885 /**
2886 * \brief Clear sticky fault: Static brake was momentarily disabled
2887 * due to excessive braking current while disabled.
2888 *
2889 * This is available in the configurator in case the user wants
2890 * to initialize their device entirely without passing a device
2891 * reference down to the code that performs the initialization.
2892 * In this case, the user passes down the configurator object
2893 * and performs all the initialization code on the object.
2894 *
2895 * \param timeoutSeconds Maximum time to wait up to in seconds.
2896 * \returns StatusCode of the set command
2897 */
2899 {
2900 std::stringstream ss;
2901 char *ref;
2902 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_StaticBrakeDisabled, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2903 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2904 }
2905
2906 /**
2907 * \brief Clear sticky fault: Bridge was disabled most likely due to a
2908 * short in the motor leads.
2909 *
2910 * This will wait up to #DefaultTimeoutSeconds.
2911 *
2912 * This is available in the configurator in case the user wants
2913 * to initialize their device entirely without passing a device
2914 * reference down to the code that performs the initialization.
2915 * In this case, the user passes down the configurator object
2916 * and performs all the initialization code on the object.
2917 *
2918 * \returns StatusCode of the set command
2919 */
2924 /**
2925 * \brief Clear sticky fault: Bridge was disabled most likely due to a
2926 * short in the motor leads.
2927 *
2928 * This is available in the configurator in case the user wants
2929 * to initialize their device entirely without passing a device
2930 * reference down to the code that performs the initialization.
2931 * In this case, the user passes down the configurator object
2932 * and performs all the initialization code on the object.
2933 *
2934 * \param timeoutSeconds Maximum time to wait up to in seconds.
2935 * \returns StatusCode of the set command
2936 */
2937 ctre::phoenix::StatusCode ClearStickyFault_BridgeShort(units::time::second_t timeoutSeconds)
2938 {
2939 std::stringstream ss;
2940 char *ref;
2941 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_BridgeShort, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2942 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2943 }
2944
2945 /**
2946 * \brief Clear sticky fault: Hall sensor signals are invalid. Check
2947 * hall sensor and cabling. This fault can be used to detect when
2948 * hall cable is unplugged.
2949 *
2950 * This will wait up to #DefaultTimeoutSeconds.
2951 *
2952 * This is available in the configurator in case the user wants
2953 * to initialize their device entirely without passing a device
2954 * reference down to the code that performs the initialization.
2955 * In this case, the user passes down the configurator object
2956 * and performs all the initialization code on the object.
2957 *
2958 * \returns StatusCode of the set command
2959 */
2964 /**
2965 * \brief Clear sticky fault: Hall sensor signals are invalid. Check
2966 * hall sensor and cabling. This fault can be used to detect when
2967 * hall cable is unplugged.
2968 *
2969 * This is available in the configurator in case the user wants
2970 * to initialize their device entirely without passing a device
2971 * reference down to the code that performs the initialization.
2972 * In this case, the user passes down the configurator object
2973 * and performs all the initialization code on the object.
2974 *
2975 * \param timeoutSeconds Maximum time to wait up to in seconds.
2976 * \returns StatusCode of the set command
2977 */
2979 {
2980 std::stringstream ss;
2981 char *ref;
2982 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_HallSensorMissing, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
2983 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
2984 }
2985
2986 /**
2987 * \brief Clear sticky fault: Hall sensor signals are invalid during
2988 * motor drive, so motor was disabled. Check hall sensor and cabling.
2989 *
2990 * This will wait up to #DefaultTimeoutSeconds.
2991 *
2992 * This is available in the configurator in case the user wants
2993 * to initialize their device entirely without passing a device
2994 * reference down to the code that performs the initialization.
2995 * In this case, the user passes down the configurator object
2996 * and performs all the initialization code on the object.
2997 *
2998 * \returns StatusCode of the set command
2999 */
3004 /**
3005 * \brief Clear sticky fault: Hall sensor signals are invalid during
3006 * motor drive, so motor was disabled. Check hall sensor and cabling.
3007 *
3008 * This is available in the configurator in case the user wants
3009 * to initialize their device entirely without passing a device
3010 * reference down to the code that performs the initialization.
3011 * In this case, the user passes down the configurator object
3012 * and performs all the initialization code on the object.
3013 *
3014 * \param timeoutSeconds Maximum time to wait up to in seconds.
3015 * \returns StatusCode of the set command
3016 */
3018 {
3019 std::stringstream ss;
3020 char *ref;
3021 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_DriveDisabledHallSensor, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
3022 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
3023 }
3024
3025 /**
3026 * \brief Clear sticky fault: Motor temperature signal appears to not
3027 * be connected.
3028 *
3029 * This will wait up to #DefaultTimeoutSeconds.
3030 *
3031 * This is available in the configurator in case the user wants
3032 * to initialize their device entirely without passing a device
3033 * reference down to the code that performs the initialization.
3034 * In this case, the user passes down the configurator object
3035 * and performs all the initialization code on the object.
3036 *
3037 * \returns StatusCode of the set command
3038 */
3043 /**
3044 * \brief Clear sticky fault: Motor temperature signal appears to not
3045 * be connected.
3046 *
3047 * This is available in the configurator in case the user wants
3048 * to initialize their device entirely without passing a device
3049 * reference down to the code that performs the initialization.
3050 * In this case, the user passes down the configurator object
3051 * and performs all the initialization code on the object.
3052 *
3053 * \param timeoutSeconds Maximum time to wait up to in seconds.
3054 * \returns StatusCode of the set command
3055 */
3057 {
3058 std::stringstream ss;
3059 char *ref;
3060 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_MotorTempSensorMissing, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
3061 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
3062 }
3063
3064 /**
3065 * \brief Clear sticky fault: Motor temperature signal indicates motor
3066 * is too hot.
3067 *
3068 * This will wait up to #DefaultTimeoutSeconds.
3069 *
3070 * This is available in the configurator in case the user wants
3071 * to initialize their device entirely without passing a device
3072 * reference down to the code that performs the initialization.
3073 * In this case, the user passes down the configurator object
3074 * and performs all the initialization code on the object.
3075 *
3076 * \returns StatusCode of the set command
3077 */
3082 /**
3083 * \brief Clear sticky fault: Motor temperature signal indicates motor
3084 * is too hot.
3085 *
3086 * This is available in the configurator in case the user wants
3087 * to initialize their device entirely without passing a device
3088 * reference down to the code that performs the initialization.
3089 * In this case, the user passes down the configurator object
3090 * and performs all the initialization code on the object.
3091 *
3092 * \param timeoutSeconds Maximum time to wait up to in seconds.
3093 * \returns StatusCode of the set command
3094 */
3096 {
3097 std::stringstream ss;
3098 char *ref;
3099 c_ctre_phoenix6_serialize_double(ctre::phoenix6::spns::SpnValue::ClearStickyFault_TALONFX_MotorTempSensorTooHot, 0, &ref); if (ref != nullptr) { ss << ref; free(ref); }
3100 return SetConfigsPrivate(ss.str(), timeoutSeconds, false, true);
3101 }
3102};
3103
3104}
3105
3106namespace hardware {
3107namespace core {
3108
3109/**
3110 * Class description for the Talon FXS motor controller.
3111 */
3113{
3114private:
3116
3117public:
3119
3120 /**
3121 * Constructs a new Talon FXS motor controller object.
3122 *
3123 * \param deviceId ID of the device, as configured in Phoenix Tuner.
3124 * \param canbus Name of the CAN bus this device is on. Possible CAN bus strings are:
3125 * - "rio" for the native roboRIO CAN bus
3126 * - CANivore name or serial number
3127 * - SocketCAN interface (non-FRC Linux only)
3128 * - "*" for any CANivore seen by the program
3129 * - empty string (default) to select the default for the system:
3130 * - "rio" on roboRIO
3131 * - "can0" on Linux
3132 * - "*" on Windows
3133 */
3134 CoreTalonFXS(int deviceId, std::string canbus = "");
3135
3136 /**
3137 * Constructs a new Talon FXS motor controller object.
3138 *
3139 * \param deviceId ID of the device, as configured in Phoenix Tuner.
3140 * \param canbus The CAN bus this device is on.
3141 */
3142 CoreTalonFXS(int deviceId, CANBus canbus) :
3143 CoreTalonFXS{deviceId, std::string{canbus.GetName()}}
3144 {}
3145
3146 /**
3147 * \brief Gets the configurator for this TalonFXS
3148 *
3149 * \details Gets the configurator for this TalonFXS
3150 *
3151 * \returns Configurator for this TalonFXS
3152 */
3154 {
3155 return _configs;
3156 }
3157
3158 /**
3159 * \brief Gets the configurator for this TalonFXS
3160 *
3161 * \details Gets the configurator for this TalonFXS
3162 *
3163 * \returns Configurator for this TalonFXS
3164 */
3166 {
3167 return _configs;
3168 }
3169
3170
3171private:
3172 std::unique_ptr<sim::TalonFXSSimState> _simState{};
3173public:
3174 /**
3175 * \brief Get the simulation state for this device.
3176 *
3177 * \details This function reuses an allocated simulation
3178 * state object, so it is safe to call this function multiple
3179 * times in a robot loop.
3180 *
3181 * \returns Simulation state
3182 */
3184 {
3185 if (_simState == nullptr)
3186 _simState = std::make_unique<sim::TalonFXSSimState>(*this);
3187 return *_simState;
3188 }
3189
3190
3191
3192 /**
3193 * \brief App Major Version number.
3194 *
3195 * - Minimum Value: 0
3196 * - Maximum Value: 255
3197 * - Default Value: 0
3198 * - Units:
3199 *
3200 * Default Rates:
3201 * - CAN: 4.0 Hz
3202 *
3203 * This refreshes and returns a cached StatusSignal object.
3204 *
3205 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3206 * \returns VersionMajor Status Signal Object
3207 */
3208 StatusSignal<int> &GetVersionMajor(bool refresh = true) override;
3209
3210 /**
3211 * \brief App Minor Version number.
3212 *
3213 * - Minimum Value: 0
3214 * - Maximum Value: 255
3215 * - Default Value: 0
3216 * - Units:
3217 *
3218 * Default Rates:
3219 * - CAN: 4.0 Hz
3220 *
3221 * This refreshes and returns a cached StatusSignal object.
3222 *
3223 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3224 * \returns VersionMinor Status Signal Object
3225 */
3226 StatusSignal<int> &GetVersionMinor(bool refresh = true) override;
3227
3228 /**
3229 * \brief App Bugfix Version number.
3230 *
3231 * - Minimum Value: 0
3232 * - Maximum Value: 255
3233 * - Default Value: 0
3234 * - Units:
3235 *
3236 * Default Rates:
3237 * - CAN: 4.0 Hz
3238 *
3239 * This refreshes and returns a cached StatusSignal object.
3240 *
3241 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3242 * \returns VersionBugfix Status Signal Object
3243 */
3244 StatusSignal<int> &GetVersionBugfix(bool refresh = true) override;
3245
3246 /**
3247 * \brief App Build Version number.
3248 *
3249 * - Minimum Value: 0
3250 * - Maximum Value: 255
3251 * - Default Value: 0
3252 * - Units:
3253 *
3254 * Default Rates:
3255 * - CAN: 4.0 Hz
3256 *
3257 * This refreshes and returns a cached StatusSignal object.
3258 *
3259 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3260 * \returns VersionBuild Status Signal Object
3261 */
3262 StatusSignal<int> &GetVersionBuild(bool refresh = true) override;
3263
3264 /**
3265 * \brief Full Version of firmware in device. The format is a four
3266 * byte value.
3267 *
3268 * - Minimum Value: 0
3269 * - Maximum Value: 4294967295
3270 * - Default Value: 0
3271 * - Units:
3272 *
3273 * Default Rates:
3274 * - CAN: 4.0 Hz
3275 *
3276 * This refreshes and returns a cached StatusSignal object.
3277 *
3278 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3279 * \returns Version Status Signal Object
3280 */
3281 StatusSignal<int> &GetVersion(bool refresh = true) override;
3282
3283 /**
3284 * \brief Integer representing all fault flags reported by the device.
3285 *
3286 * \details These are device specific and are not used directly in
3287 * typical applications. Use the signal specific GetFault_*() methods
3288 * instead.
3289 *
3290 * - Minimum Value: 0
3291 * - Maximum Value: 4294967295
3292 * - Default Value: 0
3293 * - Units:
3294 *
3295 * Default Rates:
3296 * - CAN: 4.0 Hz
3297 *
3298 * This refreshes and returns a cached StatusSignal object.
3299 *
3300 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3301 * \returns FaultField Status Signal Object
3302 */
3303 StatusSignal<int> &GetFaultField(bool refresh = true) override;
3304
3305 /**
3306 * \brief Integer representing all (persistent) sticky fault flags
3307 * reported by the device.
3308 *
3309 * \details These are device specific and are not used directly in
3310 * typical applications. Use the signal specific GetStickyFault_*()
3311 * methods instead.
3312 *
3313 * - Minimum Value: 0
3314 * - Maximum Value: 4294967295
3315 * - Default Value: 0
3316 * - Units:
3317 *
3318 * Default Rates:
3319 * - CAN: 4.0 Hz
3320 *
3321 * This refreshes and returns a cached StatusSignal object.
3322 *
3323 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3324 * \returns StickyFaultField Status Signal Object
3325 */
3326 StatusSignal<int> &GetStickyFaultField(bool refresh = true) override;
3327
3328 /**
3329 * \brief The applied (output) motor voltage.
3330 *
3331 * - Minimum Value: -40.96
3332 * - Maximum Value: 40.95
3333 * - Default Value: 0
3334 * - Units: V
3335 *
3336 * Default Rates:
3337 * - CAN 2.0: 100.0 Hz
3338 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3339 *
3340 * This refreshes and returns a cached StatusSignal object.
3341 *
3342 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3343 * \returns MotorVoltage Status Signal Object
3344 */
3346
3347 /**
3348 * \brief Forward Limit Pin.
3349 *
3350 *
3351 * Default Rates:
3352 * - CAN 2.0: 100.0 Hz
3353 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3354 *
3355 * This refreshes and returns a cached StatusSignal object.
3356 *
3357 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3358 * \returns ForwardLimit Status Signal Object
3359 */
3361
3362 /**
3363 * \brief Reverse Limit Pin.
3364 *
3365 *
3366 * Default Rates:
3367 * - CAN 2.0: 100.0 Hz
3368 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3369 *
3370 * This refreshes and returns a cached StatusSignal object.
3371 *
3372 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3373 * \returns ReverseLimit Status Signal Object
3374 */
3376
3377 /**
3378 * \brief The applied rotor polarity as seen from the front of the
3379 * motor. This typically is determined by the Inverted config, but
3380 * can be overridden if using Follower features.
3381 *
3382 *
3383 * Default Rates:
3384 * - CAN 2.0: 100.0 Hz
3385 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3386 *
3387 * This refreshes and returns a cached StatusSignal object.
3388 *
3389 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3390 * \returns AppliedRotorPolarity Status Signal Object
3391 */
3393
3394 /**
3395 * \brief The applied motor duty cycle.
3396 *
3397 * - Minimum Value: -2.0
3398 * - Maximum Value: 1.9990234375
3399 * - Default Value: 0
3400 * - Units: fractional
3401 *
3402 * Default Rates:
3403 * - CAN 2.0: 100.0 Hz
3404 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3405 *
3406 * This refreshes and returns a cached StatusSignal object.
3407 *
3408 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3409 * \returns DutyCycle Status Signal Object
3410 */
3412
3413 /**
3414 * \brief Current corresponding to the torque output by the motor.
3415 * Similar to StatorCurrent. Users will likely prefer this current to
3416 * calculate the applied torque to the rotor.
3417 *
3418 * \details Stator current where positive current means torque is
3419 * applied in the forward direction as determined by the Inverted
3420 * setting.
3421 *
3422 * - Minimum Value: -327.68
3423 * - Maximum Value: 327.67
3424 * - Default Value: 0
3425 * - Units: A
3426 *
3427 * Default Rates:
3428 * - CAN 2.0: 100.0 Hz
3429 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3430 *
3431 * This refreshes and returns a cached StatusSignal object.
3432 *
3433 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3434 * \returns TorqueCurrent Status Signal Object
3435 */
3437
3438 /**
3439 * \brief Current corresponding to the stator windings. Similar to
3440 * TorqueCurrent. Users will likely prefer TorqueCurrent over
3441 * StatorCurrent.
3442 *
3443 * \details Stator current where Positive current indicates motoring
3444 * regardless of direction. Negative current indicates regenerative
3445 * braking regardless of direction.
3446 *
3447 * - Minimum Value: -327.68
3448 * - Maximum Value: 327.66
3449 * - Default Value: 0
3450 * - Units: A
3451 *
3452 * Default Rates:
3453 * - CAN 2.0: 4.0 Hz
3454 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3455 *
3456 * This refreshes and returns a cached StatusSignal object.
3457 *
3458 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3459 * \returns StatorCurrent Status Signal Object
3460 */
3462
3463 /**
3464 * \brief Measured supply side current.
3465 *
3466 * - Minimum Value: -327.68
3467 * - Maximum Value: 327.66
3468 * - Default Value: 0
3469 * - Units: A
3470 *
3471 * Default Rates:
3472 * - CAN 2.0: 4.0 Hz
3473 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3474 *
3475 * This refreshes and returns a cached StatusSignal object.
3476 *
3477 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3478 * \returns SupplyCurrent Status Signal Object
3479 */
3481
3482 /**
3483 * \brief Measured supply voltage to the device.
3484 *
3485 * - Minimum Value: 4
3486 * - Maximum Value: 29.575
3487 * - Default Value: 4
3488 * - Units: V
3489 *
3490 * Default Rates:
3491 * - CAN 2.0: 4.0 Hz
3492 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3493 *
3494 * This refreshes and returns a cached StatusSignal object.
3495 *
3496 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3497 * \returns SupplyVoltage Status Signal Object
3498 */
3500
3501 /**
3502 * \brief Temperature of device.
3503 *
3504 * \details This is the temperature that the device measures itself to
3505 * be at. Similar to Processor Temperature.
3506 *
3507 * - Minimum Value: 0.0
3508 * - Maximum Value: 255.0
3509 * - Default Value: 0
3510 * - Units: ℃
3511 *
3512 * Default Rates:
3513 * - CAN 2.0: 4.0 Hz
3514 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3515 *
3516 * This refreshes and returns a cached StatusSignal object.
3517 *
3518 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3519 * \returns DeviceTemp Status Signal Object
3520 */
3522
3523 /**
3524 * \brief Temperature of the processor.
3525 *
3526 * \details This is the temperature that the processor measures itself
3527 * to be at. Similar to Device Temperature.
3528 *
3529 * - Minimum Value: 0.0
3530 * - Maximum Value: 255.0
3531 * - Default Value: 0
3532 * - Units: ℃
3533 *
3534 * Default Rates:
3535 * - CAN 2.0: 4.0 Hz
3536 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3537 *
3538 * This refreshes and returns a cached StatusSignal object.
3539 *
3540 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3541 * \returns ProcessorTemp Status Signal Object
3542 */
3544
3545 /**
3546 * \brief Velocity of the motor rotor. This velocity is not affected
3547 * by any feedback configs.
3548 *
3549 * - Minimum Value: -512.0
3550 * - Maximum Value: 511.998046875
3551 * - Default Value: 0
3552 * - Units: rotations per second
3553 *
3554 * Default Rates:
3555 * - CAN 2.0: 4.0 Hz
3556 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3557 *
3558 * This refreshes and returns a cached StatusSignal object.
3559 *
3560 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3561 * \returns RotorVelocity Status Signal Object
3562 */
3564
3565 /**
3566 * \brief Position of the motor rotor. This position is only affected
3567 * by the RotorOffset config and calls to setPosition.
3568 *
3569 * - Minimum Value: -16384.0
3570 * - Maximum Value: 16383.999755859375
3571 * - Default Value: 0
3572 * - Units: rotations
3573 *
3574 * Default Rates:
3575 * - CAN 2.0: 4.0 Hz
3576 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3577 *
3578 * This refreshes and returns a cached StatusSignal object.
3579 *
3580 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3581 * \returns RotorPosition Status Signal Object
3582 */
3584
3585 /**
3586 * \brief Velocity of the device in mechanism rotations per second.
3587 * This can be the velocity of a remote sensor and is affected by the
3588 * RotorToSensorRatio and SensorToMechanismRatio configs.
3589 *
3590 * - Minimum Value: -512.0
3591 * - Maximum Value: 511.998046875
3592 * - Default Value: 0
3593 * - Units: rotations per second
3594 *
3595 * Default Rates:
3596 * - CAN 2.0: 50.0 Hz
3597 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3598 *
3599 * This refreshes and returns a cached StatusSignal object.
3600 *
3601 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3602 * \returns Velocity Status Signal Object
3603 */
3605
3606 /**
3607 * \brief Position of the device in mechanism rotations. This can be
3608 * the position of a remote sensor and is affected by the
3609 * RotorToSensorRatio and SensorToMechanismRatio configs, as well as
3610 * calls to setPosition.
3611 *
3612 * - Minimum Value: -16384.0
3613 * - Maximum Value: 16383.999755859375
3614 * - Default Value: 0
3615 * - Units: rotations
3616 *
3617 * Default Rates:
3618 * - CAN 2.0: 50.0 Hz
3619 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3620 *
3621 * This refreshes and returns a cached StatusSignal object.
3622 *
3623 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3624 * \returns Position Status Signal Object
3625 */
3626 StatusSignal<units::angle::turn_t> &GetPosition(bool refresh = true) override;
3627
3628 /**
3629 * \brief Acceleration of the device in mechanism rotations per
3630 * second². This can be the acceleration of a remote sensor and is
3631 * affected by the RotorToSensorRatio and SensorToMechanismRatio
3632 * configs.
3633 *
3634 * - Minimum Value: -2048.0
3635 * - Maximum Value: 2047.75
3636 * - Default Value: 0
3637 * - Units: rotations per second²
3638 *
3639 * Default Rates:
3640 * - CAN 2.0: 50.0 Hz
3641 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3642 *
3643 * This refreshes and returns a cached StatusSignal object.
3644 *
3645 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3646 * \returns Acceleration Status Signal Object
3647 */
3649
3650 /**
3651 * \brief The active control mode of the motor controller.
3652 *
3653 *
3654 * Default Rates:
3655 * - CAN 2.0: 4.0 Hz
3656 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3657 *
3658 * This refreshes and returns a cached StatusSignal object.
3659 *
3660 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3661 * \returns ControlMode Status Signal Object
3662 */
3664
3665 /**
3666 * \brief Status of the temperature sensor of the external motor.
3667 *
3668 *
3669 * Default Rates:
3670 * - CAN 2.0: 4.0 Hz
3671 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3672 *
3673 * This refreshes and returns a cached StatusSignal object.
3674 *
3675 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3676 * \returns ExternalMotorTempStatus Status Signal Object
3677 */
3679
3680 /**
3681 * \brief Temperature of the external motor.
3682 *
3683 * - Minimum Value: 0.0
3684 * - Maximum Value: 255.0
3685 * - Default Value: 0
3686 * - Units: ℃
3687 *
3688 * Default Rates:
3689 * - CAN 2.0: 4.0 Hz
3690 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3691 *
3692 * This refreshes and returns a cached StatusSignal object.
3693 *
3694 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3695 * \returns ExternalMotorTemp Status Signal Object
3696 */
3698
3699 /**
3700 * \brief Check if Motion Magic® is running. This is equivalent to
3701 * checking that the reported control mode is a Motion Magic® based
3702 * mode.
3703 *
3704 *
3705 * Default Rates:
3706 * - CAN 2.0: 4.0 Hz
3707 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3708 *
3709 * This refreshes and returns a cached StatusSignal object.
3710 *
3711 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3712 * \returns MotionMagicIsRunning Status Signal Object
3713 */
3715
3716 /**
3717 * \brief Indicates if device is actuator enabled.
3718 *
3719 *
3720 * Default Rates:
3721 * - CAN 2.0: 4.0 Hz
3722 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3723 *
3724 * This refreshes and returns a cached StatusSignal object.
3725 *
3726 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3727 * \returns DeviceEnable Status Signal Object
3728 */
3730
3731 /**
3732 * \brief The slot that the closed-loop PID is using.
3733 *
3734 * - Minimum Value: 0
3735 * - Maximum Value: 2
3736 * - Default Value: 0
3737 * - Units:
3738 *
3739 * Default Rates:
3740 * - CAN 2.0: 4.0 Hz
3741 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3742 *
3743 * This refreshes and returns a cached StatusSignal object.
3744 *
3745 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3746 * \returns ClosedLoopSlot Status Signal Object
3747 */
3748 StatusSignal<int> &GetClosedLoopSlot(bool refresh = true) override;
3749
3750 /**
3751 * \brief Assess the status of the motor output with respect to load
3752 * and supply.
3753 *
3754 * \details This routine can be used to determine the general status
3755 * of motor commutation.
3756 *
3757 *
3758 * Default Rates:
3759 * - CAN 2.0: 4.0 Hz
3760 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3761 *
3762 * This refreshes and returns a cached StatusSignal object.
3763 *
3764 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3765 * \returns MotorOutputStatus Status Signal Object
3766 */
3768
3769 /**
3770 * \brief The active control mode of the differential controller.
3771 *
3772 *
3773 * Default Rates:
3774 * - CAN 2.0: 100.0 Hz
3775 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3776 *
3777 * This refreshes and returns a cached StatusSignal object.
3778 *
3779 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3780 * \returns DifferentialControlMode Status Signal Object
3781 */
3783
3784 /**
3785 * \brief Average component of the differential velocity of device.
3786 *
3787 * - Minimum Value: -512.0
3788 * - Maximum Value: 511.998046875
3789 * - Default Value: 0
3790 * - Units: rotations per second
3791 *
3792 * Default Rates:
3793 * - CAN 2.0: 4.0 Hz
3794 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3795 *
3796 * This refreshes and returns a cached StatusSignal object.
3797 *
3798 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3799 * \returns DifferentialAverageVelocity Status Signal Object
3800 */
3802
3803 /**
3804 * \brief Average component of the differential position of device.
3805 *
3806 * - Minimum Value: -16384.0
3807 * - Maximum Value: 16383.999755859375
3808 * - Default Value: 0
3809 * - Units: rotations
3810 *
3811 * Default Rates:
3812 * - CAN 2.0: 4.0 Hz
3813 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3814 *
3815 * This refreshes and returns a cached StatusSignal object.
3816 *
3817 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3818 * \returns DifferentialAveragePosition Status Signal Object
3819 */
3821
3822 /**
3823 * \brief Difference component of the differential velocity of device.
3824 *
3825 * - Minimum Value: -512.0
3826 * - Maximum Value: 511.998046875
3827 * - Default Value: 0
3828 * - Units: rotations per second
3829 *
3830 * Default Rates:
3831 * - CAN 2.0: 4.0 Hz
3832 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3833 *
3834 * This refreshes and returns a cached StatusSignal object.
3835 *
3836 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3837 * \returns DifferentialDifferenceVelocity Status Signal Object
3838 */
3840
3841 /**
3842 * \brief Difference component of the differential position of device.
3843 *
3844 * - Minimum Value: -16384.0
3845 * - Maximum Value: 16383.999755859375
3846 * - Default Value: 0
3847 * - Units: rotations
3848 *
3849 * Default Rates:
3850 * - CAN 2.0: 4.0 Hz
3851 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3852 *
3853 * This refreshes and returns a cached StatusSignal object.
3854 *
3855 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3856 * \returns DifferentialDifferencePosition Status Signal Object
3857 */
3859
3860 /**
3861 * \brief The slot that the closed-loop differential PID is using.
3862 *
3863 * - Minimum Value: 0
3864 * - Maximum Value: 2
3865 * - Default Value: 0
3866 * - Units:
3867 *
3868 * Default Rates:
3869 * - CAN 2.0: 4.0 Hz
3870 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3871 *
3872 * This refreshes and returns a cached StatusSignal object.
3873 *
3874 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3875 * \returns DifferentialClosedLoopSlot Status Signal Object
3876 */
3877 StatusSignal<int> &GetDifferentialClosedLoopSlot(bool refresh = true) override;
3878
3879 /**
3880 * \brief The torque constant (K_T) of the motor.
3881 *
3882 * - Minimum Value: 0.0
3883 * - Maximum Value: 0.025500000000000002
3884 * - Default Value: 0
3885 * - Units: Nm/A
3886 *
3887 * Default Rates:
3888 * - CAN: 4.0 Hz
3889 *
3890 * This refreshes and returns a cached StatusSignal object.
3891 *
3892 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3893 * \returns MotorKT Status Signal Object
3894 */
3896
3897 /**
3898 * \brief The velocity constant (K_V) of the motor.
3899 *
3900 * - Minimum Value: 0.0
3901 * - Maximum Value: 2047.0
3902 * - Default Value: 0
3903 * - Units: RPM/V
3904 *
3905 * Default Rates:
3906 * - CAN: 4.0 Hz
3907 *
3908 * This refreshes and returns a cached StatusSignal object.
3909 *
3910 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3911 * \returns MotorKV Status Signal Object
3912 */
3914
3915 /**
3916 * \brief The stall current of the motor at 12 V output.
3917 *
3918 * - Minimum Value: 0.0
3919 * - Maximum Value: 1023.0
3920 * - Default Value: 0
3921 * - Units: A
3922 *
3923 * Default Rates:
3924 * - CAN: 4.0 Hz
3925 *
3926 * This refreshes and returns a cached StatusSignal object.
3927 *
3928 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3929 * \returns MotorStallCurrent Status Signal Object
3930 */
3932
3933 /**
3934 * \brief The applied output of the bridge.
3935 *
3936 *
3937 * Default Rates:
3938 * - CAN 2.0: 100.0 Hz
3939 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3940 *
3941 * This refreshes and returns a cached StatusSignal object.
3942 *
3943 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3944 * \returns BridgeOutput Status Signal Object
3945 */
3947
3948 /**
3949 * \brief Whether the device is Phoenix Pro licensed.
3950 *
3951 * - Default Value: False
3952 *
3953 * Default Rates:
3954 * - CAN: 4.0 Hz
3955 *
3956 * This refreshes and returns a cached StatusSignal object.
3957 *
3958 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3959 * \returns IsProLicensed Status Signal Object
3960 */
3961 StatusSignal<bool> &GetIsProLicensed(bool refresh = true) override;
3962
3963 /**
3964 * \brief Temperature of device from second sensor.
3965 *
3966 * \details Newer versions of Talon have multiple temperature
3967 * measurement methods.
3968 *
3969 * - Minimum Value: 0.0
3970 * - Maximum Value: 255.0
3971 * - Default Value: 0
3972 * - Units: ℃
3973 *
3974 * Default Rates:
3975 * - CAN 2.0: 4.0 Hz
3976 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3977 *
3978 * This refreshes and returns a cached StatusSignal object.
3979 *
3980 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
3981 * \returns AncillaryDeviceTemp Status Signal Object
3982 */
3984
3985 /**
3986 * \brief The type of motor attached to the Talon.
3987 *
3988 * \details This can be used to determine what motor is attached to
3989 * the Talon FX. Return will be "Unknown" if firmware is too old or
3990 * device is not present.
3991 *
3992 *
3993 * Default Rates:
3994 * - CAN 2.0: 4.0 Hz
3995 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
3996 *
3997 * This refreshes and returns a cached StatusSignal object.
3998 *
3999 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4000 * \returns ConnectedMotor Status Signal Object
4001 */
4003
4004 /**
4005 * \brief The measured voltage of the 5V rail available on the JST and
4006 * dataport connectors.
4007 *
4008 * - Minimum Value: 0.0
4009 * - Maximum Value: 40.95
4010 * - Default Value: 0
4011 * - Units: Volts
4012 *
4013 * Default Rates:
4014 * - CAN: 4.0 Hz
4015 *
4016 * This refreshes and returns a cached StatusSignal object.
4017 *
4018 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4019 * \returns FiveVRailVoltage Status Signal Object
4020 */
4022
4023 /**
4024 * \brief The raw position retrieved from the connected quadrature
4025 * encoder. This is only affected by the QuadratureEdgesPerRotation
4026 * config. In most situations, the user should instead configure the
4027 * ExternalFeedbackSensorSource and use the regular position getter.
4028 *
4029 * This signal must have its update frequency configured before it
4030 * will have data.
4031 *
4032 * - Minimum Value: -16384.0
4033 * - Maximum Value: 16383.999755859375
4034 * - Default Value: 0
4035 * - Units: rotations
4036 *
4037 * Default Rates:
4038 * - CAN: 0.0 Hz
4039 *
4040 * This refreshes and returns a cached StatusSignal object.
4041 *
4042 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4043 * \returns RawQuadraturePosition Status Signal Object
4044 */
4046
4047 /**
4048 * \brief The raw velocity retrieved from the connected quadrature
4049 * encoder. This is only affected by the QuadratureEdgesPerRotation
4050 * config. In most situations, the user should instead configure the
4051 * ExternalFeedbackSensorSource and use the regular velocity getter.
4052 *
4053 * This signal must have its update frequency configured before it
4054 * will have data.
4055 *
4056 * - Minimum Value: -512.0
4057 * - Maximum Value: 511.998046875
4058 * - Default Value: 0
4059 * - Units: rotations per second
4060 *
4061 * Default Rates:
4062 * - CAN: 0.0 Hz
4063 *
4064 * This refreshes and returns a cached StatusSignal object.
4065 *
4066 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4067 * \returns RawQuadratureVelocity Status Signal Object
4068 */
4070
4071 /**
4072 * \brief The raw position retrieved from the connected pulse-width
4073 * encoder. This is not affected by any config. In most situations,
4074 * the user should instead configure the ExternalFeedbackSensorSource
4075 * and use the regular position getter.
4076 *
4077 * This signal must have its update frequency configured before it
4078 * will have data.
4079 *
4080 * - Minimum Value: -16384.0
4081 * - Maximum Value: 16383.999755859375
4082 * - Default Value: 0
4083 * - Units: rotations
4084 *
4085 * Default Rates:
4086 * - CAN: 0.0 Hz
4087 *
4088 * This refreshes and returns a cached StatusSignal object.
4089 *
4090 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4091 * \returns RawPulseWidthPosition Status Signal Object
4092 */
4094
4095 /**
4096 * \brief The raw velocity retrieved from the connected pulse-width
4097 * encoder. This is not affected by any config. In most situations,
4098 * the user should instead configure the ExternalFeedbackSensorSource
4099 * and use the regular velocity getter.
4100 *
4101 * This signal must have its update frequency configured before it
4102 * will have data.
4103 *
4104 * - Minimum Value: -512.0
4105 * - Maximum Value: 511.998046875
4106 * - Default Value: 0
4107 * - Units: rotations per second
4108 *
4109 * Default Rates:
4110 * - CAN: 0.0 Hz
4111 *
4112 * This refreshes and returns a cached StatusSignal object.
4113 *
4114 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4115 * \returns RawPulseWidthVelocity Status Signal Object
4116 */
4118
4119 /**
4120 * \brief Hardware fault occurred
4121 *
4122 * - Default Value: False
4123 *
4124 * Default Rates:
4125 * - CAN: 4.0 Hz
4126 *
4127 * This refreshes and returns a cached StatusSignal object.
4128 *
4129 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4130 * \returns Fault_Hardware Status Signal Object
4131 */
4132 StatusSignal<bool> &GetFault_Hardware(bool refresh = true) override;
4133
4134 /**
4135 * \brief Hardware fault occurred
4136 *
4137 * - Default Value: False
4138 *
4139 * Default Rates:
4140 * - CAN: 4.0 Hz
4141 *
4142 * This refreshes and returns a cached StatusSignal object.
4143 *
4144 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4145 * \returns StickyFault_Hardware Status Signal Object
4146 */
4147 StatusSignal<bool> &GetStickyFault_Hardware(bool refresh = true) override;
4148
4149 /**
4150 * \brief Processor temperature exceeded limit
4151 *
4152 * - Default Value: False
4153 *
4154 * Default Rates:
4155 * - CAN: 4.0 Hz
4156 *
4157 * This refreshes and returns a cached StatusSignal object.
4158 *
4159 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4160 * \returns Fault_ProcTemp Status Signal Object
4161 */
4162 StatusSignal<bool> &GetFault_ProcTemp(bool refresh = true) override;
4163
4164 /**
4165 * \brief Processor temperature exceeded limit
4166 *
4167 * - Default Value: False
4168 *
4169 * Default Rates:
4170 * - CAN: 4.0 Hz
4171 *
4172 * This refreshes and returns a cached StatusSignal object.
4173 *
4174 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4175 * \returns StickyFault_ProcTemp Status Signal Object
4176 */
4177 StatusSignal<bool> &GetStickyFault_ProcTemp(bool refresh = true) override;
4178
4179 /**
4180 * \brief Device temperature exceeded limit
4181 *
4182 * - Default Value: False
4183 *
4184 * Default Rates:
4185 * - CAN: 4.0 Hz
4186 *
4187 * This refreshes and returns a cached StatusSignal object.
4188 *
4189 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4190 * \returns Fault_DeviceTemp Status Signal Object
4191 */
4192 StatusSignal<bool> &GetFault_DeviceTemp(bool refresh = true) override;
4193
4194 /**
4195 * \brief Device temperature exceeded limit
4196 *
4197 * - Default Value: False
4198 *
4199 * Default Rates:
4200 * - CAN: 4.0 Hz
4201 *
4202 * This refreshes and returns a cached StatusSignal object.
4203 *
4204 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4205 * \returns StickyFault_DeviceTemp Status Signal Object
4206 */
4207 StatusSignal<bool> &GetStickyFault_DeviceTemp(bool refresh = true) override;
4208
4209 /**
4210 * \brief Device supply voltage dropped to near brownout levels
4211 *
4212 * - Default Value: False
4213 *
4214 * Default Rates:
4215 * - CAN: 4.0 Hz
4216 *
4217 * This refreshes and returns a cached StatusSignal object.
4218 *
4219 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4220 * \returns Fault_Undervoltage Status Signal Object
4221 */
4222 StatusSignal<bool> &GetFault_Undervoltage(bool refresh = true) override;
4223
4224 /**
4225 * \brief Device supply voltage dropped to near brownout levels
4226 *
4227 * - Default Value: False
4228 *
4229 * Default Rates:
4230 * - CAN: 4.0 Hz
4231 *
4232 * This refreshes and returns a cached StatusSignal object.
4233 *
4234 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4235 * \returns StickyFault_Undervoltage Status Signal Object
4236 */
4237 StatusSignal<bool> &GetStickyFault_Undervoltage(bool refresh = true) override;
4238
4239 /**
4240 * \brief Device boot while detecting the enable signal
4241 *
4242 * - Default Value: False
4243 *
4244 * Default Rates:
4245 * - CAN: 4.0 Hz
4246 *
4247 * This refreshes and returns a cached StatusSignal object.
4248 *
4249 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4250 * \returns Fault_BootDuringEnable Status Signal Object
4251 */
4252 StatusSignal<bool> &GetFault_BootDuringEnable(bool refresh = true) override;
4253
4254 /**
4255 * \brief Device boot while detecting the enable signal
4256 *
4257 * - Default Value: False
4258 *
4259 * Default Rates:
4260 * - CAN: 4.0 Hz
4261 *
4262 * This refreshes and returns a cached StatusSignal object.
4263 *
4264 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4265 * \returns StickyFault_BootDuringEnable Status Signal Object
4266 */
4268
4269 /**
4270 * \brief An unlicensed feature is in use, device may not behave as
4271 * expected.
4272 *
4273 * - Default Value: False
4274 *
4275 * Default Rates:
4276 * - CAN: 4.0 Hz
4277 *
4278 * This refreshes and returns a cached StatusSignal object.
4279 *
4280 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4281 * \returns Fault_UnlicensedFeatureInUse Status Signal Object
4282 */
4284
4285 /**
4286 * \brief An unlicensed feature is in use, device may not behave as
4287 * expected.
4288 *
4289 * - Default Value: False
4290 *
4291 * Default Rates:
4292 * - CAN: 4.0 Hz
4293 *
4294 * This refreshes and returns a cached StatusSignal object.
4295 *
4296 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4297 * \returns StickyFault_UnlicensedFeatureInUse Status Signal Object
4298 */
4300
4301 /**
4302 * \brief Bridge was disabled most likely due to supply voltage
4303 * dropping too low.
4304 *
4305 * - Default Value: False
4306 *
4307 * Default Rates:
4308 * - CAN: 4.0 Hz
4309 *
4310 * This refreshes and returns a cached StatusSignal object.
4311 *
4312 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4313 * \returns Fault_BridgeBrownout Status Signal Object
4314 */
4315 StatusSignal<bool> &GetFault_BridgeBrownout(bool refresh = true) override;
4316
4317 /**
4318 * \brief Bridge was disabled most likely due to supply voltage
4319 * dropping too low.
4320 *
4321 * - Default Value: False
4322 *
4323 * Default Rates:
4324 * - CAN: 4.0 Hz
4325 *
4326 * This refreshes and returns a cached StatusSignal object.
4327 *
4328 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4329 * \returns StickyFault_BridgeBrownout Status Signal Object
4330 */
4332
4333 /**
4334 * \brief The remote sensor has reset.
4335 *
4336 * - Default Value: False
4337 *
4338 * Default Rates:
4339 * - CAN: 4.0 Hz
4340 *
4341 * This refreshes and returns a cached StatusSignal object.
4342 *
4343 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4344 * \returns Fault_RemoteSensorReset Status Signal Object
4345 */
4346 StatusSignal<bool> &GetFault_RemoteSensorReset(bool refresh = true) override;
4347
4348 /**
4349 * \brief The remote sensor has reset.
4350 *
4351 * - Default Value: False
4352 *
4353 * Default Rates:
4354 * - CAN: 4.0 Hz
4355 *
4356 * This refreshes and returns a cached StatusSignal object.
4357 *
4358 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4359 * \returns StickyFault_RemoteSensorReset Status Signal Object
4360 */
4362
4363 /**
4364 * \brief The remote Talon used for differential control is not
4365 * present on CAN Bus.
4366 *
4367 * - Default Value: False
4368 *
4369 * Default Rates:
4370 * - CAN: 4.0 Hz
4371 *
4372 * This refreshes and returns a cached StatusSignal object.
4373 *
4374 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4375 * \returns Fault_MissingDifferentialFX Status Signal Object
4376 */
4378
4379 /**
4380 * \brief The remote Talon used for differential control is not
4381 * present on CAN Bus.
4382 *
4383 * - Default Value: False
4384 *
4385 * Default Rates:
4386 * - CAN: 4.0 Hz
4387 *
4388 * This refreshes and returns a cached StatusSignal object.
4389 *
4390 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4391 * \returns StickyFault_MissingDifferentialFX Status Signal Object
4392 */
4394
4395 /**
4396 * \brief The remote sensor position has overflowed. Because of the
4397 * nature of remote sensors, it is possible for the remote sensor
4398 * position to overflow beyond what is supported by the status signal
4399 * frame. However, this is rare and cannot occur over the course of an
4400 * FRC match under normal use.
4401 *
4402 * - Default Value: False
4403 *
4404 * Default Rates:
4405 * - CAN: 4.0 Hz
4406 *
4407 * This refreshes and returns a cached StatusSignal object.
4408 *
4409 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4410 * \returns Fault_RemoteSensorPosOverflow Status Signal Object
4411 */
4413
4414 /**
4415 * \brief The remote sensor position has overflowed. Because of the
4416 * nature of remote sensors, it is possible for the remote sensor
4417 * position to overflow beyond what is supported by the status signal
4418 * frame. However, this is rare and cannot occur over the course of an
4419 * FRC match under normal use.
4420 *
4421 * - Default Value: False
4422 *
4423 * Default Rates:
4424 * - CAN: 4.0 Hz
4425 *
4426 * This refreshes and returns a cached StatusSignal object.
4427 *
4428 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4429 * \returns StickyFault_RemoteSensorPosOverflow Status Signal Object
4430 */
4432
4433 /**
4434 * \brief Supply Voltage has exceeded the maximum voltage rating of
4435 * device.
4436 *
4437 * - Default Value: False
4438 *
4439 * Default Rates:
4440 * - CAN: 4.0 Hz
4441 *
4442 * This refreshes and returns a cached StatusSignal object.
4443 *
4444 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4445 * \returns Fault_OverSupplyV Status Signal Object
4446 */
4447 StatusSignal<bool> &GetFault_OverSupplyV(bool refresh = true) override;
4448
4449 /**
4450 * \brief Supply Voltage has exceeded the maximum voltage rating of
4451 * device.
4452 *
4453 * - Default Value: False
4454 *
4455 * Default Rates:
4456 * - CAN: 4.0 Hz
4457 *
4458 * This refreshes and returns a cached StatusSignal object.
4459 *
4460 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4461 * \returns StickyFault_OverSupplyV Status Signal Object
4462 */
4463 StatusSignal<bool> &GetStickyFault_OverSupplyV(bool refresh = true) override;
4464
4465 /**
4466 * \brief Supply Voltage is unstable. Ensure you are using a battery
4467 * and current limited power supply.
4468 *
4469 * - Default Value: False
4470 *
4471 * Default Rates:
4472 * - CAN: 4.0 Hz
4473 *
4474 * This refreshes and returns a cached StatusSignal object.
4475 *
4476 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4477 * \returns Fault_UnstableSupplyV Status Signal Object
4478 */
4479 StatusSignal<bool> &GetFault_UnstableSupplyV(bool refresh = true) override;
4480
4481 /**
4482 * \brief Supply Voltage is unstable. Ensure you are using a battery
4483 * and current limited power supply.
4484 *
4485 * - Default Value: False
4486 *
4487 * Default Rates:
4488 * - CAN: 4.0 Hz
4489 *
4490 * This refreshes and returns a cached StatusSignal object.
4491 *
4492 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4493 * \returns StickyFault_UnstableSupplyV Status Signal Object
4494 */
4496
4497 /**
4498 * \brief Reverse limit switch has been asserted. Output is set to
4499 * neutral.
4500 *
4501 * - Default Value: False
4502 *
4503 * Default Rates:
4504 * - CAN: 4.0 Hz
4505 *
4506 * This refreshes and returns a cached StatusSignal object.
4507 *
4508 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4509 * \returns Fault_ReverseHardLimit Status Signal Object
4510 */
4511 StatusSignal<bool> &GetFault_ReverseHardLimit(bool refresh = true) override;
4512
4513 /**
4514 * \brief Reverse limit switch has been asserted. Output is set to
4515 * neutral.
4516 *
4517 * - Default Value: False
4518 *
4519 * Default Rates:
4520 * - CAN: 4.0 Hz
4521 *
4522 * This refreshes and returns a cached StatusSignal object.
4523 *
4524 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4525 * \returns StickyFault_ReverseHardLimit Status Signal Object
4526 */
4528
4529 /**
4530 * \brief Forward limit switch has been asserted. Output is set to
4531 * neutral.
4532 *
4533 * - Default Value: False
4534 *
4535 * Default Rates:
4536 * - CAN: 4.0 Hz
4537 *
4538 * This refreshes and returns a cached StatusSignal object.
4539 *
4540 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4541 * \returns Fault_ForwardHardLimit Status Signal Object
4542 */
4543 StatusSignal<bool> &GetFault_ForwardHardLimit(bool refresh = true) override;
4544
4545 /**
4546 * \brief Forward limit switch has been asserted. Output is set to
4547 * neutral.
4548 *
4549 * - Default Value: False
4550 *
4551 * Default Rates:
4552 * - CAN: 4.0 Hz
4553 *
4554 * This refreshes and returns a cached StatusSignal object.
4555 *
4556 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4557 * \returns StickyFault_ForwardHardLimit Status Signal Object
4558 */
4560
4561 /**
4562 * \brief Reverse soft limit has been asserted. Output is set to
4563 * neutral.
4564 *
4565 * - Default Value: False
4566 *
4567 * Default Rates:
4568 * - CAN: 4.0 Hz
4569 *
4570 * This refreshes and returns a cached StatusSignal object.
4571 *
4572 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4573 * \returns Fault_ReverseSoftLimit Status Signal Object
4574 */
4575 StatusSignal<bool> &GetFault_ReverseSoftLimit(bool refresh = true) override;
4576
4577 /**
4578 * \brief Reverse soft limit has been asserted. Output is set to
4579 * neutral.
4580 *
4581 * - Default Value: False
4582 *
4583 * Default Rates:
4584 * - CAN: 4.0 Hz
4585 *
4586 * This refreshes and returns a cached StatusSignal object.
4587 *
4588 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4589 * \returns StickyFault_ReverseSoftLimit Status Signal Object
4590 */
4592
4593 /**
4594 * \brief Forward soft limit has been asserted. Output is set to
4595 * neutral.
4596 *
4597 * - Default Value: False
4598 *
4599 * Default Rates:
4600 * - CAN: 4.0 Hz
4601 *
4602 * This refreshes and returns a cached StatusSignal object.
4603 *
4604 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4605 * \returns Fault_ForwardSoftLimit Status Signal Object
4606 */
4607 StatusSignal<bool> &GetFault_ForwardSoftLimit(bool refresh = true) override;
4608
4609 /**
4610 * \brief Forward soft limit has been asserted. Output is set to
4611 * neutral.
4612 *
4613 * - Default Value: False
4614 *
4615 * Default Rates:
4616 * - CAN: 4.0 Hz
4617 *
4618 * This refreshes and returns a cached StatusSignal object.
4619 *
4620 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4621 * \returns StickyFault_ForwardSoftLimit Status Signal Object
4622 */
4624
4625 /**
4626 * \brief The remote soft limit device is not present on CAN Bus.
4627 *
4628 * - Default Value: False
4629 *
4630 * Default Rates:
4631 * - CAN: 4.0 Hz
4632 *
4633 * This refreshes and returns a cached StatusSignal object.
4634 *
4635 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4636 * \returns Fault_MissingSoftLimitRemote Status Signal Object
4637 */
4639
4640 /**
4641 * \brief The remote soft limit device is not present on CAN Bus.
4642 *
4643 * - Default Value: False
4644 *
4645 * Default Rates:
4646 * - CAN: 4.0 Hz
4647 *
4648 * This refreshes and returns a cached StatusSignal object.
4649 *
4650 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4651 * \returns StickyFault_MissingSoftLimitRemote Status Signal Object
4652 */
4654
4655 /**
4656 * \brief The remote limit switch device is not present on CAN Bus.
4657 *
4658 * - Default Value: False
4659 *
4660 * Default Rates:
4661 * - CAN: 4.0 Hz
4662 *
4663 * This refreshes and returns a cached StatusSignal object.
4664 *
4665 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4666 * \returns Fault_MissingHardLimitRemote Status Signal Object
4667 */
4669
4670 /**
4671 * \brief The remote limit switch device is not present on CAN Bus.
4672 *
4673 * - Default Value: False
4674 *
4675 * Default Rates:
4676 * - CAN: 4.0 Hz
4677 *
4678 * This refreshes and returns a cached StatusSignal object.
4679 *
4680 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4681 * \returns StickyFault_MissingHardLimitRemote Status Signal Object
4682 */
4684
4685 /**
4686 * \brief The remote sensor's data is no longer trusted. This can
4687 * happen if the remote sensor disappears from the CAN bus or if the
4688 * remote sensor indicates its data is no longer valid, such as when a
4689 * CANcoder's magnet strength falls into the "red" range.
4690 *
4691 * - Default Value: False
4692 *
4693 * Default Rates:
4694 * - CAN: 4.0 Hz
4695 *
4696 * This refreshes and returns a cached StatusSignal object.
4697 *
4698 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4699 * \returns Fault_RemoteSensorDataInvalid Status Signal Object
4700 */
4702
4703 /**
4704 * \brief The remote sensor's data is no longer trusted. This can
4705 * happen if the remote sensor disappears from the CAN bus or if the
4706 * remote sensor indicates its data is no longer valid, such as when a
4707 * CANcoder's magnet strength falls into the "red" range.
4708 *
4709 * - Default Value: False
4710 *
4711 * Default Rates:
4712 * - CAN: 4.0 Hz
4713 *
4714 * This refreshes and returns a cached StatusSignal object.
4715 *
4716 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4717 * \returns StickyFault_RemoteSensorDataInvalid Status Signal Object
4718 */
4720
4721 /**
4722 * \brief The remote sensor used for fusion has fallen out of sync to
4723 * the local sensor. A re-synchronization has occurred, which may
4724 * cause a discontinuity. This typically happens if there is
4725 * significant slop in the mechanism, or if the RotorToSensorRatio
4726 * configuration parameter is incorrect.
4727 *
4728 * - Default Value: False
4729 *
4730 * Default Rates:
4731 * - CAN: 4.0 Hz
4732 *
4733 * This refreshes and returns a cached StatusSignal object.
4734 *
4735 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4736 * \returns Fault_FusedSensorOutOfSync Status Signal Object
4737 */
4739
4740 /**
4741 * \brief The remote sensor used for fusion has fallen out of sync to
4742 * the local sensor. A re-synchronization has occurred, which may
4743 * cause a discontinuity. This typically happens if there is
4744 * significant slop in the mechanism, or if the RotorToSensorRatio
4745 * configuration parameter is incorrect.
4746 *
4747 * - Default Value: False
4748 *
4749 * Default Rates:
4750 * - CAN: 4.0 Hz
4751 *
4752 * This refreshes and returns a cached StatusSignal object.
4753 *
4754 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4755 * \returns StickyFault_FusedSensorOutOfSync Status Signal Object
4756 */
4758
4759 /**
4760 * \brief Stator current limit occured.
4761 *
4762 * - Default Value: False
4763 *
4764 * Default Rates:
4765 * - CAN: 4.0 Hz
4766 *
4767 * This refreshes and returns a cached StatusSignal object.
4768 *
4769 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4770 * \returns Fault_StatorCurrLimit Status Signal Object
4771 */
4772 StatusSignal<bool> &GetFault_StatorCurrLimit(bool refresh = true) override;
4773
4774 /**
4775 * \brief Stator current limit occured.
4776 *
4777 * - Default Value: False
4778 *
4779 * Default Rates:
4780 * - CAN: 4.0 Hz
4781 *
4782 * This refreshes and returns a cached StatusSignal object.
4783 *
4784 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4785 * \returns StickyFault_StatorCurrLimit Status Signal Object
4786 */
4788
4789 /**
4790 * \brief Supply current limit occured.
4791 *
4792 * - Default Value: False
4793 *
4794 * Default Rates:
4795 * - CAN: 4.0 Hz
4796 *
4797 * This refreshes and returns a cached StatusSignal object.
4798 *
4799 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4800 * \returns Fault_SupplyCurrLimit Status Signal Object
4801 */
4802 StatusSignal<bool> &GetFault_SupplyCurrLimit(bool refresh = true) override;
4803
4804 /**
4805 * \brief Supply current limit occured.
4806 *
4807 * - Default Value: False
4808 *
4809 * Default Rates:
4810 * - CAN: 4.0 Hz
4811 *
4812 * This refreshes and returns a cached StatusSignal object.
4813 *
4814 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4815 * \returns StickyFault_SupplyCurrLimit Status Signal Object
4816 */
4818
4819 /**
4820 * \brief Using Fused CANcoder feature while unlicensed. Device has
4821 * fallen back to remote CANcoder.
4822 *
4823 * - Default Value: False
4824 *
4825 * Default Rates:
4826 * - CAN: 4.0 Hz
4827 *
4828 * This refreshes and returns a cached StatusSignal object.
4829 *
4830 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4831 * \returns Fault_UsingFusedCANcoderWhileUnlicensed Status Signal Object
4832 */
4834
4835 /**
4836 * \brief Using Fused CANcoder feature while unlicensed. Device has
4837 * fallen back to remote CANcoder.
4838 *
4839 * - Default Value: False
4840 *
4841 * Default Rates:
4842 * - CAN: 4.0 Hz
4843 *
4844 * This refreshes and returns a cached StatusSignal object.
4845 *
4846 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4847 * \returns StickyFault_UsingFusedCANcoderWhileUnlicensed Status Signal Object
4848 */
4850
4851 /**
4852 * \brief Static brake was momentarily disabled due to excessive
4853 * braking current while disabled.
4854 *
4855 * - Default Value: False
4856 *
4857 * Default Rates:
4858 * - CAN: 4.0 Hz
4859 *
4860 * This refreshes and returns a cached StatusSignal object.
4861 *
4862 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4863 * \returns Fault_StaticBrakeDisabled Status Signal Object
4864 */
4865 StatusSignal<bool> &GetFault_StaticBrakeDisabled(bool refresh = true) override;
4866
4867 /**
4868 * \brief Static brake was momentarily disabled due to excessive
4869 * braking current while disabled.
4870 *
4871 * - Default Value: False
4872 *
4873 * Default Rates:
4874 * - CAN: 4.0 Hz
4875 *
4876 * This refreshes and returns a cached StatusSignal object.
4877 *
4878 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4879 * \returns StickyFault_StaticBrakeDisabled Status Signal Object
4880 */
4882
4883 /**
4884 * \brief Bridge was disabled most likely due to a short in the motor
4885 * leads.
4886 *
4887 * - Default Value: False
4888 *
4889 * Default Rates:
4890 * - CAN: 4.0 Hz
4891 *
4892 * This refreshes and returns a cached StatusSignal object.
4893 *
4894 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4895 * \returns Fault_BridgeShort Status Signal Object
4896 */
4897 StatusSignal<bool> &GetFault_BridgeShort(bool refresh = true) override;
4898
4899 /**
4900 * \brief Bridge was disabled most likely due to a short in the motor
4901 * leads.
4902 *
4903 * - Default Value: False
4904 *
4905 * Default Rates:
4906 * - CAN: 4.0 Hz
4907 *
4908 * This refreshes and returns a cached StatusSignal object.
4909 *
4910 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4911 * \returns StickyFault_BridgeShort Status Signal Object
4912 */
4913 StatusSignal<bool> &GetStickyFault_BridgeShort(bool refresh = true) override;
4914
4915 /**
4916 * \brief Hall sensor signals are invalid. Check hall sensor and
4917 * cabling. This fault can be used to detect when hall cable is
4918 * unplugged.
4919 *
4920 * - Default Value: False
4921 *
4922 * Default Rates:
4923 * - CAN: 4.0 Hz
4924 *
4925 * This refreshes and returns a cached StatusSignal object.
4926 *
4927 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4928 * \returns Fault_HallSensorMissing Status Signal Object
4929 */
4930 StatusSignal<bool> &GetFault_HallSensorMissing(bool refresh = true) override;
4931
4932 /**
4933 * \brief Hall sensor signals are invalid. Check hall sensor and
4934 * cabling. This fault can be used to detect when hall cable is
4935 * unplugged.
4936 *
4937 * - Default Value: False
4938 *
4939 * Default Rates:
4940 * - CAN: 4.0 Hz
4941 *
4942 * This refreshes and returns a cached StatusSignal object.
4943 *
4944 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4945 * \returns StickyFault_HallSensorMissing Status Signal Object
4946 */
4948
4949 /**
4950 * \brief Hall sensor signals are invalid during motor drive, so motor
4951 * was disabled. Check hall sensor and cabling.
4952 *
4953 * - Default Value: False
4954 *
4955 * Default Rates:
4956 * - CAN: 4.0 Hz
4957 *
4958 * This refreshes and returns a cached StatusSignal object.
4959 *
4960 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4961 * \returns Fault_DriveDisabledHallSensor Status Signal Object
4962 */
4964
4965 /**
4966 * \brief Hall sensor signals are invalid during motor drive, so motor
4967 * was disabled. Check hall sensor and cabling.
4968 *
4969 * - Default Value: False
4970 *
4971 * Default Rates:
4972 * - CAN: 4.0 Hz
4973 *
4974 * This refreshes and returns a cached StatusSignal object.
4975 *
4976 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4977 * \returns StickyFault_DriveDisabledHallSensor Status Signal Object
4978 */
4980
4981 /**
4982 * \brief Motor temperature signal appears to not be connected.
4983 *
4984 * - Default Value: False
4985 *
4986 * Default Rates:
4987 * - CAN: 4.0 Hz
4988 *
4989 * This refreshes and returns a cached StatusSignal object.
4990 *
4991 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4992 * \returns Fault_MotorTempSensorMissing Status Signal Object
4993 */
4995
4996 /**
4997 * \brief Motor temperature signal appears to not be connected.
4998 *
4999 * - Default Value: False
5000 *
5001 * Default Rates:
5002 * - CAN: 4.0 Hz
5003 *
5004 * This refreshes and returns a cached StatusSignal object.
5005 *
5006 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5007 * \returns StickyFault_MotorTempSensorMissing Status Signal Object
5008 */
5010
5011 /**
5012 * \brief Motor temperature signal indicates motor is too hot.
5013 *
5014 * - Default Value: False
5015 *
5016 * Default Rates:
5017 * - CAN: 4.0 Hz
5018 *
5019 * This refreshes and returns a cached StatusSignal object.
5020 *
5021 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5022 * \returns Fault_MotorTempSensorTooHot Status Signal Object
5023 */
5025
5026 /**
5027 * \brief Motor temperature signal indicates motor is too hot.
5028 *
5029 * - Default Value: False
5030 *
5031 * Default Rates:
5032 * - CAN: 4.0 Hz
5033 *
5034 * This refreshes and returns a cached StatusSignal object.
5035 *
5036 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5037 * \returns StickyFault_MotorTempSensorTooHot Status Signal Object
5038 */
5040
5041 /**
5042 * \brief Closed loop proportional component
5043 *
5044 * \details The portion of the closed loop output that is the
5045 * proportional to the error. Alternatively, the p-Contribution of the
5046 * closed loop output.
5047 *
5048 * Default Rates:
5049 * - CAN 2.0: 4.0 Hz
5050 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5051 *
5052 * This refreshes and returns a cached StatusSignal object.
5053 *
5054 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5055 * \returns ClosedLoopProportionalOutput Status Signal object
5056 */
5058
5059 /**
5060 * \brief Closed loop integrated component
5061 *
5062 * \details The portion of the closed loop output that is proportional
5063 * to the integrated error. Alternatively, the i-Contribution of the
5064 * closed loop output.
5065 *
5066 * Default Rates:
5067 * - CAN 2.0: 4.0 Hz
5068 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5069 *
5070 * This refreshes and returns a cached StatusSignal object.
5071 *
5072 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5073 * \returns ClosedLoopIntegratedOutput Status Signal object
5074 */
5076
5077 /**
5078 * \brief Feedforward passed by the user
5079 *
5080 * \details This is the general feedforward that the user provides for
5081 * the closed loop.
5082 *
5083 * Default Rates:
5084 * - CAN 2.0: 4.0 Hz
5085 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5086 *
5087 * This refreshes and returns a cached StatusSignal object.
5088 *
5089 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5090 * \returns ClosedLoopFeedForward Status Signal object
5091 */
5092 StatusSignal<double> &GetClosedLoopFeedForward(bool refresh = true) override;
5093
5094 /**
5095 * \brief Closed loop derivative component
5096 *
5097 * \details The portion of the closed loop output that is the
5098 * proportional to the deriviative the error. Alternatively, the
5099 * d-Contribution of the closed loop output.
5100 *
5101 * Default Rates:
5102 * - CAN 2.0: 4.0 Hz
5103 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5104 *
5105 * This refreshes and returns a cached StatusSignal object.
5106 *
5107 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5108 * \returns ClosedLoopDerivativeOutput Status Signal object
5109 */
5111
5112 /**
5113 * \brief Closed loop total output
5114 *
5115 * \details The total output of the closed loop output.
5116 *
5117 * Default Rates:
5118 * - CAN 2.0: 4.0 Hz
5119 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5120 *
5121 * This refreshes and returns a cached StatusSignal object.
5122 *
5123 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5124 * \returns ClosedLoopOutput Status Signal object
5125 */
5126 StatusSignal<double> &GetClosedLoopOutput(bool refresh = true) override;
5127
5128 /**
5129 * \brief Value that the closed loop is targeting
5130 *
5131 * \details This is the value that the closed loop PID controller
5132 * targets.
5133 *
5134 * Default Rates:
5135 * - CAN 2.0: 4.0 Hz
5136 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5137 *
5138 * This refreshes and returns a cached StatusSignal object.
5139 *
5140 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5141 * \returns ClosedLoopReference Status Signal object
5142 */
5143 StatusSignal<double> &GetClosedLoopReference(bool refresh = true) override;
5144
5145 /**
5146 * \brief Derivative of the target that the closed loop is targeting
5147 *
5148 * \details This is the change in the closed loop reference. This may
5149 * be used in the feed-forward calculation, the derivative-error, or
5150 * in application of the signage for kS. Typically, this represents
5151 * the target velocity during Motion Magic®.
5152 *
5153 * Default Rates:
5154 * - CAN 2.0: 4.0 Hz
5155 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5156 *
5157 * This refreshes and returns a cached StatusSignal object.
5158 *
5159 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5160 * \returns ClosedLoopReferenceSlope Status Signal object
5161 */
5163
5164 /**
5165 * \brief The difference between target reference and current
5166 * measurement
5167 *
5168 * \details This is the value that is treated as the error in the PID
5169 * loop.
5170 *
5171 * Default Rates:
5172 * - CAN 2.0: 4.0 Hz
5173 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5174 *
5175 * This refreshes and returns a cached StatusSignal object.
5176 *
5177 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5178 * \returns ClosedLoopError Status Signal object
5179 */
5180 StatusSignal<double> &GetClosedLoopError(bool refresh = true) override;
5181
5182 /**
5183 * \brief The calculated motor output for differential followers.
5184 *
5185 * \details This is a torque request when using the TorqueCurrentFOC
5186 * control output type, and a duty cycle in all other control types.
5187 *
5188 * Default Rates:
5189 * - CAN 2.0: 100.0 Hz
5190 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5191 *
5192 * This refreshes and returns a cached StatusSignal object.
5193 *
5194 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5195 * \returns DifferentialOutput Status Signal object
5196 */
5197 StatusSignal<double> &GetDifferentialOutput(bool refresh = true) override;
5198
5199 /**
5200 * \brief Differential closed loop proportional component
5201 *
5202 * \details The portion of the differential closed loop output that is
5203 * the proportional to the error. Alternatively, the p-Contribution of
5204 * the closed loop output.
5205 *
5206 * Default Rates:
5207 * - CAN 2.0: 4.0 Hz
5208 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5209 *
5210 * This refreshes and returns a cached StatusSignal object.
5211 *
5212 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5213 * \returns DifferentialClosedLoopProportionalOutput Status Signal object
5214 */
5216
5217 /**
5218 * \brief Differential closed loop integrated component
5219 *
5220 * \details The portion of the differential closed loop output that is
5221 * proportional to the integrated error. Alternatively, the
5222 * i-Contribution of the closed loop output.
5223 *
5224 * Default Rates:
5225 * - CAN 2.0: 100.0 Hz
5226 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5227 *
5228 * This refreshes and returns a cached StatusSignal object.
5229 *
5230 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5231 * \returns DifferentialClosedLoopIntegratedOutput Status Signal object
5232 */
5234
5235 /**
5236 * \brief Differential Feedforward passed by the user
5237 *
5238 * \details This is the general feedforward that the user provides for
5239 * the differential closed loop.
5240 *
5241 * Default Rates:
5242 * - CAN 2.0: 100.0 Hz
5243 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5244 *
5245 * This refreshes and returns a cached StatusSignal object.
5246 *
5247 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5248 * \returns DifferentialClosedLoopFeedForward Status Signal object
5249 */
5251
5252 /**
5253 * \brief Differential closed loop derivative component
5254 *
5255 * \details The portion of the differential closed loop output that is
5256 * the proportional to the deriviative the error. Alternatively, the
5257 * d-Contribution of the closed loop output.
5258 *
5259 * Default Rates:
5260 * - CAN 2.0: 4.0 Hz
5261 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5262 *
5263 * This refreshes and returns a cached StatusSignal object.
5264 *
5265 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5266 * \returns DifferentialClosedLoopDerivativeOutput Status Signal object
5267 */
5269
5270 /**
5271 * \brief Differential closed loop total output
5272 *
5273 * \details The total output of the differential closed loop output.
5274 *
5275 * Default Rates:
5276 * - CAN 2.0: 4.0 Hz
5277 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5278 *
5279 * This refreshes and returns a cached StatusSignal object.
5280 *
5281 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5282 * \returns DifferentialClosedLoopOutput Status Signal object
5283 */
5285
5286 /**
5287 * \brief Value that the differential closed loop is targeting
5288 *
5289 * \details This is the value that the differential closed loop PID
5290 * controller targets.
5291 *
5292 * Default Rates:
5293 * - CAN 2.0: 4.0 Hz
5294 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5295 *
5296 * This refreshes and returns a cached StatusSignal object.
5297 *
5298 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5299 * \returns DifferentialClosedLoopReference Status Signal object
5300 */
5302
5303 /**
5304 * \brief Derivative of the target that the differential closed loop
5305 * is targeting
5306 *
5307 * \details This is the change in the closed loop reference. This may
5308 * be used in the feed-forward calculation, the derivative-error, or
5309 * in application of the signage for kS. Typically, this represents
5310 * the target velocity during Motion Magic®.
5311 *
5312 * Default Rates:
5313 * - CAN 2.0: 4.0 Hz
5314 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5315 *
5316 * This refreshes and returns a cached StatusSignal object.
5317 *
5318 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5319 * \returns DifferentialClosedLoopReferenceSlope Status Signal object
5320 */
5322
5323 /**
5324 * \brief The difference between target differential reference and
5325 * current measurement
5326 *
5327 * \details This is the value that is treated as the error in the
5328 * differential PID loop.
5329 *
5330 * Default Rates:
5331 * - CAN 2.0: 4.0 Hz
5332 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5333 *
5334 * This refreshes and returns a cached StatusSignal object.
5335 *
5336 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5337 * \returns DifferentialClosedLoopError Status Signal object
5338 */
5340
5341
5342 /**
5343 * \brief Request a specified motor duty cycle.
5344 *
5345 * \details This control mode will output a proportion of the supplied
5346 * voltage which is supplied by the user.
5347 *
5348 * - DutyCycleOut Parameters:
5349 * - Output: Proportion of supply voltage to apply in fractional units between -1
5350 * and +1
5351 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5352 * increases peak power by ~15%. Set to false to use trapezoidal
5353 * commutation.
5354 *
5355 * FOC improves motor performance by leveraging torque (current)
5356 * control. However, this may be inconvenient for applications that
5357 * require specifying duty cycle or voltage. CTR-Electronics has
5358 * developed a hybrid method that combines the performances gains of
5359 * FOC while still allowing applications to provide duty cycle or
5360 * voltage demand. This not to be confused with simple sinusoidal
5361 * control or phase voltage control which lacks the performance
5362 * gains.
5363 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5364 * is zero (or within deadband). Set to false to use
5365 * the NeutralMode configuration setting (default).
5366 * This flag exists to provide the fundamental
5367 * behavior of this control when output is zero, which
5368 * is to provide 0V to the motor.
5369 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5370 * users to use other limit switch sensors connected to
5371 * robot controller. This also allows use of active
5372 * sensors that require external power.
5373 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5374 * users to use other limit switch sensors connected to
5375 * robot controller. This also allows use of active
5376 * sensors that require external power.
5377 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5378 * LimitForwardMotion and LimitReverseMotion parameters,
5379 * instead allowing motion.
5380 *
5381 * This can be useful on mechanisms such as an
5382 * intake/feeder, where a limit switch stops motion while
5383 * intaking but should be ignored when feeding to a
5384 * shooter.
5385 *
5386 * The hardware limit faults and Forward/ReverseLimit
5387 * signals will still report the values of the limit
5388 * switches regardless of this parameter.
5389 * - UseTimesync: Set to true to delay applying this control request until a
5390 * timesync boundary (requires Phoenix Pro and CANivore). This
5391 * eliminates the impact of nondeterministic network delays in
5392 * exchange for a larger but deterministic control latency.
5393 *
5394 * This requires setting the ControlTimesyncFreqHz config in
5395 * MotorOutputConfigs. Additionally, when this is enabled, the
5396 * UpdateFreqHz of this request should be set to 0 Hz.
5397 *
5398 * \param request Control object to request of the device
5399 * \returns Status Code of the request, 0 is OK
5400 */
5402
5403 /**
5404 * \brief Request a specified voltage.
5405 *
5406 * \details This control mode will attempt to apply the specified
5407 * voltage to the motor. If the supply voltage is below the requested
5408 * voltage, the motor controller will output the supply voltage.
5409 *
5410 * - VoltageOut Parameters:
5411 * - Output: Voltage to attempt to drive at
5412 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5413 * increases peak power by ~15%. Set to false to use trapezoidal
5414 * commutation.
5415 *
5416 * FOC improves motor performance by leveraging torque (current)
5417 * control. However, this may be inconvenient for applications that
5418 * require specifying duty cycle or voltage. CTR-Electronics has
5419 * developed a hybrid method that combines the performances gains of
5420 * FOC while still allowing applications to provide duty cycle or
5421 * voltage demand. This not to be confused with simple sinusoidal
5422 * control or phase voltage control which lacks the performance
5423 * gains.
5424 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5425 * is zero (or within deadband). Set to false to use
5426 * the NeutralMode configuration setting (default).
5427 * This flag exists to provide the fundamental
5428 * behavior of this control when output is zero, which
5429 * is to provide 0V to the motor.
5430 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5431 * users to use other limit switch sensors connected to
5432 * robot controller. This also allows use of active
5433 * sensors that require external power.
5434 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5435 * users to use other limit switch sensors connected to
5436 * robot controller. This also allows use of active
5437 * sensors that require external power.
5438 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5439 * LimitForwardMotion and LimitReverseMotion parameters,
5440 * instead allowing motion.
5441 *
5442 * This can be useful on mechanisms such as an
5443 * intake/feeder, where a limit switch stops motion while
5444 * intaking but should be ignored when feeding to a
5445 * shooter.
5446 *
5447 * The hardware limit faults and Forward/ReverseLimit
5448 * signals will still report the values of the limit
5449 * switches regardless of this parameter.
5450 * - UseTimesync: Set to true to delay applying this control request until a
5451 * timesync boundary (requires Phoenix Pro and CANivore). This
5452 * eliminates the impact of nondeterministic network delays in
5453 * exchange for a larger but deterministic control latency.
5454 *
5455 * This requires setting the ControlTimesyncFreqHz config in
5456 * MotorOutputConfigs. Additionally, when this is enabled, the
5457 * UpdateFreqHz of this request should be set to 0 Hz.
5458 *
5459 * \param request Control object to request of the device
5460 * \returns Status Code of the request, 0 is OK
5461 */
5463
5464 /**
5465 * \brief Request PID to target position with duty cycle feedforward.
5466 *
5467 * \details This control mode will set the motor's position setpoint
5468 * to the position specified by the user. In addition, it will apply
5469 * an additional duty cycle as an arbitrary feedforward value.
5470 *
5471 * - PositionDutyCycle Parameters:
5472 * - Position: Position to drive toward in rotations.
5473 * - Velocity: Velocity to drive toward in rotations per second. This is
5474 * typically used for motion profiles generated by the robot program.
5475 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5476 * increases peak power by ~15%. Set to false to use trapezoidal
5477 * commutation.
5478 *
5479 * FOC improves motor performance by leveraging torque (current)
5480 * control. However, this may be inconvenient for applications that
5481 * require specifying duty cycle or voltage. CTR-Electronics has
5482 * developed a hybrid method that combines the performances gains of
5483 * FOC while still allowing applications to provide duty cycle or
5484 * voltage demand. This not to be confused with simple sinusoidal
5485 * control or phase voltage control which lacks the performance
5486 * gains.
5487 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
5488 * - Slot: Select which gains are applied by selecting the slot. Use the
5489 * configuration api to set the gain values for the selected slot before
5490 * enabling this feature. Slot must be within [0,2].
5491 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5492 * is zero (or within deadband). Set to false to use
5493 * the NeutralMode configuration setting (default).
5494 * This flag exists to provide the fundamental
5495 * behavior of this control when output is zero, which
5496 * is to provide 0V to the motor.
5497 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5498 * users to use other limit switch sensors connected to
5499 * robot controller. This also allows use of active
5500 * sensors that require external power.
5501 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5502 * users to use other limit switch sensors connected to
5503 * robot controller. This also allows use of active
5504 * sensors that require external power.
5505 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5506 * LimitForwardMotion and LimitReverseMotion parameters,
5507 * instead allowing motion.
5508 *
5509 * This can be useful on mechanisms such as an
5510 * intake/feeder, where a limit switch stops motion while
5511 * intaking but should be ignored when feeding to a
5512 * shooter.
5513 *
5514 * The hardware limit faults and Forward/ReverseLimit
5515 * signals will still report the values of the limit
5516 * switches regardless of this parameter.
5517 * - UseTimesync: Set to true to delay applying this control request until a
5518 * timesync boundary (requires Phoenix Pro and CANivore). This
5519 * eliminates the impact of nondeterministic network delays in
5520 * exchange for a larger but deterministic control latency.
5521 *
5522 * This requires setting the ControlTimesyncFreqHz config in
5523 * MotorOutputConfigs. Additionally, when this is enabled, the
5524 * UpdateFreqHz of this request should be set to 0 Hz.
5525 *
5526 * \param request Control object to request of the device
5527 * \returns Status Code of the request, 0 is OK
5528 */
5530
5531 /**
5532 * \brief Request PID to target position with voltage feedforward
5533 *
5534 * \details This control mode will set the motor's position setpoint
5535 * to the position specified by the user. In addition, it will apply
5536 * an additional voltage as an arbitrary feedforward value.
5537 *
5538 * - PositionVoltage Parameters:
5539 * - Position: Position to drive toward in rotations.
5540 * - Velocity: Velocity to drive toward in rotations per second. This is
5541 * typically used for motion profiles generated by the robot program.
5542 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5543 * increases peak power by ~15%. Set to false to use trapezoidal
5544 * commutation.
5545 *
5546 * FOC improves motor performance by leveraging torque (current)
5547 * control. However, this may be inconvenient for applications that
5548 * require specifying duty cycle or voltage. CTR-Electronics has
5549 * developed a hybrid method that combines the performances gains of
5550 * FOC while still allowing applications to provide duty cycle or
5551 * voltage demand. This not to be confused with simple sinusoidal
5552 * control or phase voltage control which lacks the performance
5553 * gains.
5554 * - FeedForward: Feedforward to apply in volts
5555 * - Slot: Select which gains are applied by selecting the slot. Use the
5556 * configuration api to set the gain values for the selected slot before
5557 * enabling this feature. Slot must be within [0,2].
5558 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5559 * is zero (or within deadband). Set to false to use
5560 * the NeutralMode configuration setting (default).
5561 * This flag exists to provide the fundamental
5562 * behavior of this control when output is zero, which
5563 * is to provide 0V to the motor.
5564 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5565 * users to use other limit switch sensors connected to
5566 * robot controller. This also allows use of active
5567 * sensors that require external power.
5568 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5569 * users to use other limit switch sensors connected to
5570 * robot controller. This also allows use of active
5571 * sensors that require external power.
5572 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5573 * LimitForwardMotion and LimitReverseMotion parameters,
5574 * instead allowing motion.
5575 *
5576 * This can be useful on mechanisms such as an
5577 * intake/feeder, where a limit switch stops motion while
5578 * intaking but should be ignored when feeding to a
5579 * shooter.
5580 *
5581 * The hardware limit faults and Forward/ReverseLimit
5582 * signals will still report the values of the limit
5583 * switches regardless of this parameter.
5584 * - UseTimesync: Set to true to delay applying this control request until a
5585 * timesync boundary (requires Phoenix Pro and CANivore). This
5586 * eliminates the impact of nondeterministic network delays in
5587 * exchange for a larger but deterministic control latency.
5588 *
5589 * This requires setting the ControlTimesyncFreqHz config in
5590 * MotorOutputConfigs. Additionally, when this is enabled, the
5591 * UpdateFreqHz of this request should be set to 0 Hz.
5592 *
5593 * \param request Control object to request of the device
5594 * \returns Status Code of the request, 0 is OK
5595 */
5597
5598 /**
5599 * \brief Request PID to target velocity with duty cycle feedforward.
5600 *
5601 * \details This control mode will set the motor's velocity setpoint
5602 * to the velocity specified by the user. In addition, it will apply
5603 * an additional voltage as an arbitrary feedforward value.
5604 *
5605 * - VelocityDutyCycle Parameters:
5606 * - Velocity: Velocity to drive toward in rotations per second.
5607 * - Acceleration: Acceleration to drive toward in rotations per second squared.
5608 * This is typically used for motion profiles generated by the
5609 * robot program.
5610 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5611 * increases peak power by ~15%. Set to false to use trapezoidal
5612 * commutation.
5613 *
5614 * FOC improves motor performance by leveraging torque (current)
5615 * control. However, this may be inconvenient for applications that
5616 * require specifying duty cycle or voltage. CTR-Electronics has
5617 * developed a hybrid method that combines the performances gains of
5618 * FOC while still allowing applications to provide duty cycle or
5619 * voltage demand. This not to be confused with simple sinusoidal
5620 * control or phase voltage control which lacks the performance
5621 * gains.
5622 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
5623 * - Slot: Select which gains are applied by selecting the slot. Use the
5624 * configuration api to set the gain values for the selected slot before
5625 * enabling this feature. Slot must be within [0,2].
5626 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5627 * is zero (or within deadband). Set to false to use
5628 * the NeutralMode configuration setting (default).
5629 * This flag exists to provide the fundamental
5630 * behavior of this control when output is zero, which
5631 * is to provide 0V to the motor.
5632 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5633 * users to use other limit switch sensors connected to
5634 * robot controller. This also allows use of active
5635 * sensors that require external power.
5636 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5637 * users to use other limit switch sensors connected to
5638 * robot controller. This also allows use of active
5639 * sensors that require external power.
5640 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5641 * LimitForwardMotion and LimitReverseMotion parameters,
5642 * instead allowing motion.
5643 *
5644 * This can be useful on mechanisms such as an
5645 * intake/feeder, where a limit switch stops motion while
5646 * intaking but should be ignored when feeding to a
5647 * shooter.
5648 *
5649 * The hardware limit faults and Forward/ReverseLimit
5650 * signals will still report the values of the limit
5651 * switches regardless of this parameter.
5652 * - UseTimesync: Set to true to delay applying this control request until a
5653 * timesync boundary (requires Phoenix Pro and CANivore). This
5654 * eliminates the impact of nondeterministic network delays in
5655 * exchange for a larger but deterministic control latency.
5656 *
5657 * This requires setting the ControlTimesyncFreqHz config in
5658 * MotorOutputConfigs. Additionally, when this is enabled, the
5659 * UpdateFreqHz of this request should be set to 0 Hz.
5660 *
5661 * \param request Control object to request of the device
5662 * \returns Status Code of the request, 0 is OK
5663 */
5665
5666 /**
5667 * \brief Request PID to target velocity with voltage feedforward.
5668 *
5669 * \details This control mode will set the motor's velocity setpoint
5670 * to the velocity specified by the user. In addition, it will apply
5671 * an additional voltage as an arbitrary feedforward value.
5672 *
5673 * - VelocityVoltage Parameters:
5674 * - Velocity: Velocity to drive toward in rotations per second.
5675 * - Acceleration: Acceleration to drive toward in rotations per second squared.
5676 * This is typically used for motion profiles generated by the
5677 * robot program.
5678 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5679 * increases peak power by ~15%. Set to false to use trapezoidal
5680 * commutation.
5681 *
5682 * FOC improves motor performance by leveraging torque (current)
5683 * control. However, this may be inconvenient for applications that
5684 * require specifying duty cycle or voltage. CTR-Electronics has
5685 * developed a hybrid method that combines the performances gains of
5686 * FOC while still allowing applications to provide duty cycle or
5687 * voltage demand. This not to be confused with simple sinusoidal
5688 * control or phase voltage control which lacks the performance
5689 * gains.
5690 * - FeedForward: Feedforward to apply in volts
5691 * - Slot: Select which gains are applied by selecting the slot. Use the
5692 * configuration api to set the gain values for the selected slot before
5693 * enabling this feature. Slot must be within [0,2].
5694 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5695 * is zero (or within deadband). Set to false to use
5696 * the NeutralMode configuration setting (default).
5697 * This flag exists to provide the fundamental
5698 * behavior of this control when output is zero, which
5699 * is to provide 0V to the motor.
5700 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5701 * users to use other limit switch sensors connected to
5702 * robot controller. This also allows use of active
5703 * sensors that require external power.
5704 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5705 * users to use other limit switch sensors connected to
5706 * robot controller. This also allows use of active
5707 * sensors that require external power.
5708 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5709 * LimitForwardMotion and LimitReverseMotion parameters,
5710 * instead allowing motion.
5711 *
5712 * This can be useful on mechanisms such as an
5713 * intake/feeder, where a limit switch stops motion while
5714 * intaking but should be ignored when feeding to a
5715 * shooter.
5716 *
5717 * The hardware limit faults and Forward/ReverseLimit
5718 * signals will still report the values of the limit
5719 * switches regardless of this parameter.
5720 * - UseTimesync: Set to true to delay applying this control request until a
5721 * timesync boundary (requires Phoenix Pro and CANivore). This
5722 * eliminates the impact of nondeterministic network delays in
5723 * exchange for a larger but deterministic control latency.
5724 *
5725 * This requires setting the ControlTimesyncFreqHz config in
5726 * MotorOutputConfigs. Additionally, when this is enabled, the
5727 * UpdateFreqHz of this request should be set to 0 Hz.
5728 *
5729 * \param request Control object to request of the device
5730 * \returns Status Code of the request, 0 is OK
5731 */
5733
5734 /**
5735 * \brief Requests Motion Magic® to target a final position using a
5736 * motion profile. Users can optionally provide a duty cycle
5737 * feedforward.
5738 *
5739 * \details Motion Magic® produces a motion profile in real-time while
5740 * attempting to honor the Cruise Velocity, Acceleration, and
5741 * (optional) Jerk specified via the Motion Magic® configuration
5742 * values. This control mode does not use the Expo_kV or Expo_kA
5743 * configs.
5744 *
5745 * Target position can be changed on-the-fly and Motion Magic® will do
5746 * its best to adjust the profile. This control mode is duty cycle
5747 * based, so relevant closed-loop gains will use fractional duty cycle
5748 * for the numerator: +1.0 represents full forward output.
5749 *
5750 * - MotionMagicDutyCycle Parameters:
5751 * - Position: Position to drive toward in rotations.
5752 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5753 * increases peak power by ~15%. Set to false to use trapezoidal
5754 * commutation.
5755 *
5756 * FOC improves motor performance by leveraging torque (current)
5757 * control. However, this may be inconvenient for applications that
5758 * require specifying duty cycle or voltage. CTR-Electronics has
5759 * developed a hybrid method that combines the performances gains of
5760 * FOC while still allowing applications to provide duty cycle or
5761 * voltage demand. This not to be confused with simple sinusoidal
5762 * control or phase voltage control which lacks the performance
5763 * gains.
5764 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
5765 * - Slot: Select which gains are applied by selecting the slot. Use the
5766 * configuration api to set the gain values for the selected slot before
5767 * enabling this feature. Slot must be within [0,2].
5768 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5769 * is zero (or within deadband). Set to false to use
5770 * the NeutralMode configuration setting (default).
5771 * This flag exists to provide the fundamental
5772 * behavior of this control when output is zero, which
5773 * is to provide 0V to the motor.
5774 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5775 * users to use other limit switch sensors connected to
5776 * robot controller. This also allows use of active
5777 * sensors that require external power.
5778 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5779 * users to use other limit switch sensors connected to
5780 * robot controller. This also allows use of active
5781 * sensors that require external power.
5782 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5783 * LimitForwardMotion and LimitReverseMotion parameters,
5784 * instead allowing motion.
5785 *
5786 * This can be useful on mechanisms such as an
5787 * intake/feeder, where a limit switch stops motion while
5788 * intaking but should be ignored when feeding to a
5789 * shooter.
5790 *
5791 * The hardware limit faults and Forward/ReverseLimit
5792 * signals will still report the values of the limit
5793 * switches regardless of this parameter.
5794 * - UseTimesync: Set to true to delay applying this control request until a
5795 * timesync boundary (requires Phoenix Pro and CANivore). This
5796 * eliminates the impact of nondeterministic network delays in
5797 * exchange for a larger but deterministic control latency.
5798 *
5799 * This requires setting the ControlTimesyncFreqHz config in
5800 * MotorOutputConfigs. Additionally, when this is enabled, the
5801 * UpdateFreqHz of this request should be set to 0 Hz.
5802 *
5803 * \param request Control object to request of the device
5804 * \returns Status Code of the request, 0 is OK
5805 */
5807
5808 /**
5809 * \brief Requests Motion Magic® to target a final position using a
5810 * motion profile. Users can optionally provide a voltage
5811 * feedforward.
5812 *
5813 * \details Motion Magic® produces a motion profile in real-time while
5814 * attempting to honor the Cruise Velocity, Acceleration, and
5815 * (optional) Jerk specified via the Motion Magic® configuration
5816 * values. This control mode does not use the Expo_kV or Expo_kA
5817 * configs.
5818 *
5819 * Target position can be changed on-the-fly and Motion Magic® will do
5820 * its best to adjust the profile. This control mode is
5821 * voltage-based, so relevant closed-loop gains will use Volts for the
5822 * numerator.
5823 *
5824 * - MotionMagicVoltage Parameters:
5825 * - Position: Position to drive toward in rotations.
5826 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5827 * increases peak power by ~15%. Set to false to use trapezoidal
5828 * commutation.
5829 *
5830 * FOC improves motor performance by leveraging torque (current)
5831 * control. However, this may be inconvenient for applications that
5832 * require specifying duty cycle or voltage. CTR-Electronics has
5833 * developed a hybrid method that combines the performances gains of
5834 * FOC while still allowing applications to provide duty cycle or
5835 * voltage demand. This not to be confused with simple sinusoidal
5836 * control or phase voltage control which lacks the performance
5837 * gains.
5838 * - FeedForward: Feedforward to apply in volts
5839 * - Slot: Select which gains are applied by selecting the slot. Use the
5840 * configuration api to set the gain values for the selected slot before
5841 * enabling this feature. Slot must be within [0,2].
5842 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5843 * is zero (or within deadband). Set to false to use
5844 * the NeutralMode configuration setting (default).
5845 * This flag exists to provide the fundamental
5846 * behavior of this control when output is zero, which
5847 * is to provide 0V to the motor.
5848 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5849 * users to use other limit switch sensors connected to
5850 * robot controller. This also allows use of active
5851 * sensors that require external power.
5852 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5853 * users to use other limit switch sensors connected to
5854 * robot controller. This also allows use of active
5855 * sensors that require external power.
5856 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5857 * LimitForwardMotion and LimitReverseMotion parameters,
5858 * instead allowing motion.
5859 *
5860 * This can be useful on mechanisms such as an
5861 * intake/feeder, where a limit switch stops motion while
5862 * intaking but should be ignored when feeding to a
5863 * shooter.
5864 *
5865 * The hardware limit faults and Forward/ReverseLimit
5866 * signals will still report the values of the limit
5867 * switches regardless of this parameter.
5868 * - UseTimesync: Set to true to delay applying this control request until a
5869 * timesync boundary (requires Phoenix Pro and CANivore). This
5870 * eliminates the impact of nondeterministic network delays in
5871 * exchange for a larger but deterministic control latency.
5872 *
5873 * This requires setting the ControlTimesyncFreqHz config in
5874 * MotorOutputConfigs. Additionally, when this is enabled, the
5875 * UpdateFreqHz of this request should be set to 0 Hz.
5876 *
5877 * \param request Control object to request of the device
5878 * \returns Status Code of the request, 0 is OK
5879 */
5881
5882 /**
5883 * \brief Request a specified motor duty cycle with a differential
5884 * position closed-loop.
5885 *
5886 * \details This control mode will output a proportion of the supplied
5887 * voltage which is supplied by the user. It will also set the motor's
5888 * differential position setpoint to the specified position.
5889 *
5890 * - DifferentialDutyCycle Parameters:
5891 * - TargetOutput: Proportion of supply voltage to apply in fractional units
5892 * between -1 and +1
5893 * - DifferentialPosition: Differential position to drive towards in rotations
5894 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5895 * increases peak power by ~15%. Set to false to use trapezoidal
5896 * commutation.
5897 *
5898 * FOC improves motor performance by leveraging torque (current)
5899 * control. However, this may be inconvenient for applications that
5900 * require specifying duty cycle or voltage. CTR-Electronics has
5901 * developed a hybrid method that combines the performances gains of
5902 * FOC while still allowing applications to provide duty cycle or
5903 * voltage demand. This not to be confused with simple sinusoidal
5904 * control or phase voltage control which lacks the performance
5905 * gains.
5906 * - DifferentialSlot: Select which gains are applied to the differential
5907 * controller by selecting the slot. Use the configuration
5908 * api to set the gain values for the selected slot before
5909 * enabling this feature. Slot must be within [0,2].
5910 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5911 * is zero (or within deadband). Set to false to use
5912 * the NeutralMode configuration setting (default).
5913 * This flag exists to provide the fundamental
5914 * behavior of this control when output is zero, which
5915 * is to provide 0V to the motor.
5916 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5917 * users to use other limit switch sensors connected to
5918 * robot controller. This also allows use of active
5919 * sensors that require external power.
5920 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5921 * users to use other limit switch sensors connected to
5922 * robot controller. This also allows use of active
5923 * sensors that require external power.
5924 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5925 * LimitForwardMotion and LimitReverseMotion parameters,
5926 * instead allowing motion.
5927 *
5928 * This can be useful on mechanisms such as an
5929 * intake/feeder, where a limit switch stops motion while
5930 * intaking but should be ignored when feeding to a
5931 * shooter.
5932 *
5933 * The hardware limit faults and Forward/ReverseLimit
5934 * signals will still report the values of the limit
5935 * switches regardless of this parameter.
5936 * - UseTimesync: Set to true to delay applying this control request until a
5937 * timesync boundary (requires Phoenix Pro and CANivore). This
5938 * eliminates the impact of nondeterministic network delays in
5939 * exchange for a larger but deterministic control latency.
5940 *
5941 * This requires setting the ControlTimesyncFreqHz config in
5942 * MotorOutputConfigs. Additionally, when this is enabled, the
5943 * UpdateFreqHz of this request should be set to 0 Hz.
5944 *
5945 * \param request Control object to request of the device
5946 * \returns Status Code of the request, 0 is OK
5947 */
5949
5950 /**
5951 * \brief Request a specified voltage with a differential position
5952 * closed-loop.
5953 *
5954 * \details This control mode will attempt to apply the specified
5955 * voltage to the motor. If the supply voltage is below the requested
5956 * voltage, the motor controller will output the supply voltage. It
5957 * will also set the motor's differential position setpoint to the
5958 * specified position.
5959 *
5960 * - DifferentialVoltage Parameters:
5961 * - TargetOutput: Voltage to attempt to drive at
5962 * - DifferentialPosition: Differential position to drive towards in rotations
5963 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5964 * increases peak power by ~15%. Set to false to use trapezoidal
5965 * commutation.
5966 *
5967 * FOC improves motor performance by leveraging torque (current)
5968 * control. However, this may be inconvenient for applications that
5969 * require specifying duty cycle or voltage. CTR-Electronics has
5970 * developed a hybrid method that combines the performances gains of
5971 * FOC while still allowing applications to provide duty cycle or
5972 * voltage demand. This not to be confused with simple sinusoidal
5973 * control or phase voltage control which lacks the performance
5974 * gains.
5975 * - DifferentialSlot: Select which gains are applied to the differential
5976 * controller by selecting the slot. Use the configuration
5977 * api to set the gain values for the selected slot before
5978 * enabling this feature. Slot must be within [0,2].
5979 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5980 * is zero (or within deadband). Set to false to use
5981 * the NeutralMode configuration setting (default).
5982 * This flag exists to provide the fundamental
5983 * behavior of this control when output is zero, which
5984 * is to provide 0V to the motor.
5985 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5986 * users to use other limit switch sensors connected to
5987 * robot controller. This also allows use of active
5988 * sensors that require external power.
5989 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5990 * users to use other limit switch sensors connected to
5991 * robot controller. This also allows use of active
5992 * sensors that require external power.
5993 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5994 * LimitForwardMotion and LimitReverseMotion parameters,
5995 * instead allowing motion.
5996 *
5997 * This can be useful on mechanisms such as an
5998 * intake/feeder, where a limit switch stops motion while
5999 * intaking but should be ignored when feeding to a
6000 * shooter.
6001 *
6002 * The hardware limit faults and Forward/ReverseLimit
6003 * signals will still report the values of the limit
6004 * switches regardless of this parameter.
6005 * - UseTimesync: Set to true to delay applying this control request until a
6006 * timesync boundary (requires Phoenix Pro and CANivore). This
6007 * eliminates the impact of nondeterministic network delays in
6008 * exchange for a larger but deterministic control latency.
6009 *
6010 * This requires setting the ControlTimesyncFreqHz config in
6011 * MotorOutputConfigs. Additionally, when this is enabled, the
6012 * UpdateFreqHz of this request should be set to 0 Hz.
6013 *
6014 * \param request Control object to request of the device
6015 * \returns Status Code of the request, 0 is OK
6016 */
6018
6019 /**
6020 * \brief Request PID to target position with a differential position
6021 * setpoint.
6022 *
6023 * \details This control mode will set the motor's position setpoint
6024 * to the position specified by the user. It will also set the motor's
6025 * differential position setpoint to the specified position.
6026 *
6027 * - DifferentialPositionDutyCycle Parameters:
6028 * - TargetPosition: Average position to drive toward in rotations.
6029 * - DifferentialPosition: Differential position to drive toward in rotations.
6030 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6031 * increases peak power by ~15%. Set to false to use trapezoidal
6032 * commutation.
6033 *
6034 * FOC improves motor performance by leveraging torque (current)
6035 * control. However, this may be inconvenient for applications that
6036 * require specifying duty cycle or voltage. CTR-Electronics has
6037 * developed a hybrid method that combines the performances gains of
6038 * FOC while still allowing applications to provide duty cycle or
6039 * voltage demand. This not to be confused with simple sinusoidal
6040 * control or phase voltage control which lacks the performance
6041 * gains.
6042 * - TargetSlot: Select which gains are applied to the primary controller by
6043 * selecting the slot. Use the configuration api to set the gain
6044 * values for the selected slot before enabling this feature. Slot
6045 * must be within [0,2].
6046 * - DifferentialSlot: Select which gains are applied to the differential
6047 * controller by selecting the slot. Use the configuration
6048 * api to set the gain values for the selected slot before
6049 * enabling this feature. Slot must be within [0,2].
6050 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6051 * is zero (or within deadband). Set to false to use
6052 * the NeutralMode configuration setting (default).
6053 * This flag exists to provide the fundamental
6054 * behavior of this control when output is zero, which
6055 * is to provide 0V to the motor.
6056 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6057 * users to use other limit switch sensors connected to
6058 * robot controller. This also allows use of active
6059 * sensors that require external power.
6060 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6061 * users to use other limit switch sensors connected to
6062 * robot controller. This also allows use of active
6063 * sensors that require external power.
6064 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6065 * LimitForwardMotion and LimitReverseMotion parameters,
6066 * instead allowing motion.
6067 *
6068 * This can be useful on mechanisms such as an
6069 * intake/feeder, where a limit switch stops motion while
6070 * intaking but should be ignored when feeding to a
6071 * shooter.
6072 *
6073 * The hardware limit faults and Forward/ReverseLimit
6074 * signals will still report the values of the limit
6075 * switches regardless of this parameter.
6076 * - UseTimesync: Set to true to delay applying this control request until a
6077 * timesync boundary (requires Phoenix Pro and CANivore). This
6078 * eliminates the impact of nondeterministic network delays in
6079 * exchange for a larger but deterministic control latency.
6080 *
6081 * This requires setting the ControlTimesyncFreqHz config in
6082 * MotorOutputConfigs. Additionally, when this is enabled, the
6083 * UpdateFreqHz of this request should be set to 0 Hz.
6084 *
6085 * \param request Control object to request of the device
6086 * \returns Status Code of the request, 0 is OK
6087 */
6089
6090 /**
6091 * \brief Request PID to target position with a differential position
6092 * setpoint
6093 *
6094 * \details This control mode will set the motor's position setpoint
6095 * to the position specified by the user. It will also set the motor's
6096 * differential position setpoint to the specified position.
6097 *
6098 * - DifferentialPositionVoltage Parameters:
6099 * - TargetPosition: Average position to drive toward in rotations.
6100 * - DifferentialPosition: Differential position to drive toward in rotations.
6101 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6102 * increases peak power by ~15%. Set to false to use trapezoidal
6103 * commutation.
6104 *
6105 * FOC improves motor performance by leveraging torque (current)
6106 * control. However, this may be inconvenient for applications that
6107 * require specifying duty cycle or voltage. CTR-Electronics has
6108 * developed a hybrid method that combines the performances gains of
6109 * FOC while still allowing applications to provide duty cycle or
6110 * voltage demand. This not to be confused with simple sinusoidal
6111 * control or phase voltage control which lacks the performance
6112 * gains.
6113 * - TargetSlot: Select which gains are applied to the primary controller by
6114 * selecting the slot. Use the configuration api to set the gain
6115 * values for the selected slot before enabling this feature. Slot
6116 * must be within [0,2].
6117 * - DifferentialSlot: Select which gains are applied to the differential
6118 * controller by selecting the slot. Use the configuration
6119 * api to set the gain values for the selected slot before
6120 * enabling this feature. Slot must be within [0,2].
6121 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6122 * is zero (or within deadband). Set to false to use
6123 * the NeutralMode configuration setting (default).
6124 * This flag exists to provide the fundamental
6125 * behavior of this control when output is zero, which
6126 * is to provide 0V to the motor.
6127 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6128 * users to use other limit switch sensors connected to
6129 * robot controller. This also allows use of active
6130 * sensors that require external power.
6131 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6132 * users to use other limit switch sensors connected to
6133 * robot controller. This also allows use of active
6134 * sensors that require external power.
6135 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6136 * LimitForwardMotion and LimitReverseMotion parameters,
6137 * instead allowing motion.
6138 *
6139 * This can be useful on mechanisms such as an
6140 * intake/feeder, where a limit switch stops motion while
6141 * intaking but should be ignored when feeding to a
6142 * shooter.
6143 *
6144 * The hardware limit faults and Forward/ReverseLimit
6145 * signals will still report the values of the limit
6146 * switches regardless of this parameter.
6147 * - UseTimesync: Set to true to delay applying this control request until a
6148 * timesync boundary (requires Phoenix Pro and CANivore). This
6149 * eliminates the impact of nondeterministic network delays in
6150 * exchange for a larger but deterministic control latency.
6151 *
6152 * This requires setting the ControlTimesyncFreqHz config in
6153 * MotorOutputConfigs. Additionally, when this is enabled, the
6154 * UpdateFreqHz of this request should be set to 0 Hz.
6155 *
6156 * \param request Control object to request of the device
6157 * \returns Status Code of the request, 0 is OK
6158 */
6160
6161 /**
6162 * \brief Request PID to target velocity with a differential position
6163 * setpoint.
6164 *
6165 * \details This control mode will set the motor's velocity setpoint
6166 * to the velocity specified by the user. It will also set the motor's
6167 * differential position setpoint to the specified position.
6168 *
6169 * - DifferentialVelocityDutyCycle Parameters:
6170 * - TargetVelocity: Average velocity to drive toward in rotations per second.
6171 * - DifferentialPosition: Differential position to drive toward in rotations.
6172 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6173 * increases peak power by ~15%. Set to false to use trapezoidal
6174 * commutation.
6175 *
6176 * FOC improves motor performance by leveraging torque (current)
6177 * control. However, this may be inconvenient for applications that
6178 * require specifying duty cycle or voltage. CTR-Electronics has
6179 * developed a hybrid method that combines the performances gains of
6180 * FOC while still allowing applications to provide duty cycle or
6181 * voltage demand. This not to be confused with simple sinusoidal
6182 * control or phase voltage control which lacks the performance
6183 * gains.
6184 * - TargetSlot: Select which gains are applied to the primary controller by
6185 * selecting the slot. Use the configuration api to set the gain
6186 * values for the selected slot before enabling this feature. Slot
6187 * must be within [0,2].
6188 * - DifferentialSlot: Select which gains are applied to the differential
6189 * controller by selecting the slot. Use the configuration
6190 * api to set the gain values for the selected slot before
6191 * enabling this feature. Slot must be within [0,2].
6192 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6193 * is zero (or within deadband). Set to false to use
6194 * the NeutralMode configuration setting (default).
6195 * This flag exists to provide the fundamental
6196 * behavior of this control when output is zero, which
6197 * is to provide 0V to the motor.
6198 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6199 * users to use other limit switch sensors connected to
6200 * robot controller. This also allows use of active
6201 * sensors that require external power.
6202 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6203 * users to use other limit switch sensors connected to
6204 * robot controller. This also allows use of active
6205 * sensors that require external power.
6206 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6207 * LimitForwardMotion and LimitReverseMotion parameters,
6208 * instead allowing motion.
6209 *
6210 * This can be useful on mechanisms such as an
6211 * intake/feeder, where a limit switch stops motion while
6212 * intaking but should be ignored when feeding to a
6213 * shooter.
6214 *
6215 * The hardware limit faults and Forward/ReverseLimit
6216 * signals will still report the values of the limit
6217 * switches regardless of this parameter.
6218 * - UseTimesync: Set to true to delay applying this control request until a
6219 * timesync boundary (requires Phoenix Pro and CANivore). This
6220 * eliminates the impact of nondeterministic network delays in
6221 * exchange for a larger but deterministic control latency.
6222 *
6223 * This requires setting the ControlTimesyncFreqHz config in
6224 * MotorOutputConfigs. Additionally, when this is enabled, the
6225 * UpdateFreqHz of this request should be set to 0 Hz.
6226 *
6227 * \param request Control object to request of the device
6228 * \returns Status Code of the request, 0 is OK
6229 */
6231
6232 /**
6233 * \brief Request PID to target velocity with a differential position
6234 * setpoint.
6235 *
6236 * \details This control mode will set the motor's velocity setpoint
6237 * to the velocity specified by the user. It will also set the motor's
6238 * differential position setpoint to the specified position.
6239 *
6240 * - DifferentialVelocityVoltage Parameters:
6241 * - TargetVelocity: Average velocity to drive toward in rotations per second.
6242 * - DifferentialPosition: Differential position to drive toward in rotations.
6243 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6244 * increases peak power by ~15%. Set to false to use trapezoidal
6245 * commutation.
6246 *
6247 * FOC improves motor performance by leveraging torque (current)
6248 * control. However, this may be inconvenient for applications that
6249 * require specifying duty cycle or voltage. CTR-Electronics has
6250 * developed a hybrid method that combines the performances gains of
6251 * FOC while still allowing applications to provide duty cycle or
6252 * voltage demand. This not to be confused with simple sinusoidal
6253 * control or phase voltage control which lacks the performance
6254 * gains.
6255 * - TargetSlot: Select which gains are applied to the primary controller by
6256 * selecting the slot. Use the configuration api to set the gain
6257 * values for the selected slot before enabling this feature. Slot
6258 * must be within [0,2].
6259 * - DifferentialSlot: Select which gains are applied to the differential
6260 * controller by selecting the slot. Use the configuration
6261 * api to set the gain values for the selected slot before
6262 * enabling this feature. Slot must be within [0,2].
6263 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6264 * is zero (or within deadband). Set to false to use
6265 * the NeutralMode configuration setting (default).
6266 * This flag exists to provide the fundamental
6267 * behavior of this control when output is zero, which
6268 * is to provide 0V to the motor.
6269 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6270 * users to use other limit switch sensors connected to
6271 * robot controller. This also allows use of active
6272 * sensors that require external power.
6273 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6274 * users to use other limit switch sensors connected to
6275 * robot controller. This also allows use of active
6276 * sensors that require external power.
6277 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6278 * LimitForwardMotion and LimitReverseMotion parameters,
6279 * instead allowing motion.
6280 *
6281 * This can be useful on mechanisms such as an
6282 * intake/feeder, where a limit switch stops motion while
6283 * intaking but should be ignored when feeding to a
6284 * shooter.
6285 *
6286 * The hardware limit faults and Forward/ReverseLimit
6287 * signals will still report the values of the limit
6288 * switches regardless of this parameter.
6289 * - UseTimesync: Set to true to delay applying this control request until a
6290 * timesync boundary (requires Phoenix Pro and CANivore). This
6291 * eliminates the impact of nondeterministic network delays in
6292 * exchange for a larger but deterministic control latency.
6293 *
6294 * This requires setting the ControlTimesyncFreqHz config in
6295 * MotorOutputConfigs. Additionally, when this is enabled, the
6296 * UpdateFreqHz of this request should be set to 0 Hz.
6297 *
6298 * \param request Control object to request of the device
6299 * \returns Status Code of the request, 0 is OK
6300 */
6302
6303 /**
6304 * \brief Requests Motion Magic® to target a final position using a
6305 * motion profile, and PID to a differential position setpoint.
6306 *
6307 * \details Motion Magic® produces a motion profile in real-time while
6308 * attempting to honor the Cruise Velocity, Acceleration, and
6309 * (optional) Jerk specified via the Motion Magic® configuration
6310 * values. This control mode does not use the Expo_kV or Expo_kA
6311 * configs.
6312 *
6313 * Target position can be changed on-the-fly and Motion Magic® will do
6314 * its best to adjust the profile. This control mode is duty cycle
6315 * based, so relevant closed-loop gains will use fractional duty cycle
6316 * for the numerator: +1.0 represents full forward output.
6317 *
6318 * - DifferentialMotionMagicDutyCycle Parameters:
6319 * - TargetPosition: Average position to drive toward in rotations.
6320 * - DifferentialPosition: Differential position to drive toward in rotations.
6321 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6322 * increases peak power by ~15%. Set to false to use trapezoidal
6323 * commutation.
6324 *
6325 * FOC improves motor performance by leveraging torque (current)
6326 * control. However, this may be inconvenient for applications that
6327 * require specifying duty cycle or voltage. CTR-Electronics has
6328 * developed a hybrid method that combines the performances gains of
6329 * FOC while still allowing applications to provide duty cycle or
6330 * voltage demand. This not to be confused with simple sinusoidal
6331 * control or phase voltage control which lacks the performance
6332 * gains.
6333 * - TargetSlot: Select which gains are applied to the primary controller by
6334 * selecting the slot. Use the configuration api to set the gain
6335 * values for the selected slot before enabling this feature. Slot
6336 * must be within [0,2].
6337 * - DifferentialSlot: Select which gains are applied to the differential
6338 * controller by selecting the slot. Use the configuration
6339 * api to set the gain values for the selected slot before
6340 * enabling this feature. Slot must be within [0,2].
6341 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6342 * is zero (or within deadband). Set to false to use
6343 * the NeutralMode configuration setting (default).
6344 * This flag exists to provide the fundamental
6345 * behavior of this control when output is zero, which
6346 * is to provide 0V to the motor.
6347 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6348 * users to use other limit switch sensors connected to
6349 * robot controller. This also allows use of active
6350 * sensors that require external power.
6351 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6352 * users to use other limit switch sensors connected to
6353 * robot controller. This also allows use of active
6354 * sensors that require external power.
6355 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6356 * LimitForwardMotion and LimitReverseMotion parameters,
6357 * instead allowing motion.
6358 *
6359 * This can be useful on mechanisms such as an
6360 * intake/feeder, where a limit switch stops motion while
6361 * intaking but should be ignored when feeding to a
6362 * shooter.
6363 *
6364 * The hardware limit faults and Forward/ReverseLimit
6365 * signals will still report the values of the limit
6366 * switches regardless of this parameter.
6367 * - UseTimesync: Set to true to delay applying this control request until a
6368 * timesync boundary (requires Phoenix Pro and CANivore). This
6369 * eliminates the impact of nondeterministic network delays in
6370 * exchange for a larger but deterministic control latency.
6371 *
6372 * This requires setting the ControlTimesyncFreqHz config in
6373 * MotorOutputConfigs. Additionally, when this is enabled, the
6374 * UpdateFreqHz of this request should be set to 0 Hz.
6375 *
6376 * \param request Control object to request of the device
6377 * \returns Status Code of the request, 0 is OK
6378 */
6380
6381 /**
6382 * \brief Requests Motion Magic® to target a final position using a
6383 * motion profile, and PID to a differential position setpoint.
6384 *
6385 * \details Motion Magic® produces a motion profile in real-time while
6386 * attempting to honor the Cruise Velocity, Acceleration, and
6387 * (optional) Jerk specified via the Motion Magic® configuration
6388 * values. This control mode does not use the Expo_kV or Expo_kA
6389 * configs.
6390 *
6391 * Target position can be changed on-the-fly and Motion Magic® will do
6392 * its best to adjust the profile. This control mode is
6393 * voltage-based, so relevant closed-loop gains will use Volts for the
6394 * numerator.
6395 *
6396 * - DifferentialMotionMagicVoltage Parameters:
6397 * - TargetPosition: Average position to drive toward in rotations.
6398 * - DifferentialPosition: Differential position to drive toward in rotations.
6399 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6400 * increases peak power by ~15%. Set to false to use trapezoidal
6401 * commutation.
6402 *
6403 * FOC improves motor performance by leveraging torque (current)
6404 * control. However, this may be inconvenient for applications that
6405 * require specifying duty cycle or voltage. CTR-Electronics has
6406 * developed a hybrid method that combines the performances gains of
6407 * FOC while still allowing applications to provide duty cycle or
6408 * voltage demand. This not to be confused with simple sinusoidal
6409 * control or phase voltage control which lacks the performance
6410 * gains.
6411 * - TargetSlot: Select which gains are applied to the primary controller by
6412 * selecting the slot. Use the configuration api to set the gain
6413 * values for the selected slot before enabling this feature. Slot
6414 * must be within [0,2].
6415 * - DifferentialSlot: Select which gains are applied to the differential
6416 * controller by selecting the slot. Use the configuration
6417 * api to set the gain values for the selected slot before
6418 * enabling this feature. Slot must be within [0,2].
6419 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6420 * is zero (or within deadband). Set to false to use
6421 * the NeutralMode configuration setting (default).
6422 * This flag exists to provide the fundamental
6423 * behavior of this control when output is zero, which
6424 * is to provide 0V to the motor.
6425 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6426 * users to use other limit switch sensors connected to
6427 * robot controller. This also allows use of active
6428 * sensors that require external power.
6429 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6430 * users to use other limit switch sensors connected to
6431 * robot controller. This also allows use of active
6432 * sensors that require external power.
6433 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6434 * LimitForwardMotion and LimitReverseMotion parameters,
6435 * instead allowing motion.
6436 *
6437 * This can be useful on mechanisms such as an
6438 * intake/feeder, where a limit switch stops motion while
6439 * intaking but should be ignored when feeding to a
6440 * shooter.
6441 *
6442 * The hardware limit faults and Forward/ReverseLimit
6443 * signals will still report the values of the limit
6444 * switches regardless of this parameter.
6445 * - UseTimesync: Set to true to delay applying this control request until a
6446 * timesync boundary (requires Phoenix Pro and CANivore). This
6447 * eliminates the impact of nondeterministic network delays in
6448 * exchange for a larger but deterministic control latency.
6449 *
6450 * This requires setting the ControlTimesyncFreqHz config in
6451 * MotorOutputConfigs. Additionally, when this is enabled, the
6452 * UpdateFreqHz of this request should be set to 0 Hz.
6453 *
6454 * \param request Control object to request of the device
6455 * \returns Status Code of the request, 0 is OK
6456 */
6458
6459 /**
6460 * \brief Follow the motor output of another Talon.
6461 *
6462 * \details If Talon is in torque control, the torque is copied -
6463 * which will increase the total torque applied. If Talon is in
6464 * percent supply output control, the duty cycle is matched. Motor
6465 * direction either matches master's configured direction or opposes
6466 * it based on OpposeMasterDirection.
6467 *
6468 * - Follower Parameters:
6469 * - MasterID: Device ID of the master to follow.
6470 * - OpposeMasterDirection: Set to false for motor invert to match the master's
6471 * configured Invert - which is typical when master and
6472 * follower are mechanically linked and spin in the same
6473 * direction. Set to true for motor invert to oppose
6474 * the master's configured Invert - this is typical
6475 * where the the master and follower mechanically spin
6476 * in opposite directions.
6477 *
6478 * \param request Control object to request of the device
6479 * \returns Status Code of the request, 0 is OK
6480 */
6482
6483 /**
6484 * \brief Follow the motor output of another Talon while ignoring the
6485 * master's invert setting.
6486 *
6487 * \details If Talon is in torque control, the torque is copied -
6488 * which will increase the total torque applied. If Talon is in
6489 * percent supply output control, the duty cycle is matched. Motor
6490 * direction is strictly determined by the configured invert and not
6491 * the master. If you want motor direction to match or oppose the
6492 * master, use FollowerRequest instead.
6493 *
6494 * - StrictFollower Parameters:
6495 * - MasterID: Device ID of the master to follow.
6496 *
6497 * \param request Control object to request of the device
6498 * \returns Status Code of the request, 0 is OK
6499 */
6501
6502 /**
6503 * \brief Follow the differential motor output of another Talon.
6504 *
6505 * \details If Talon is in torque control, the torque is copied -
6506 * which will increase the total torque applied. If Talon is in
6507 * percent supply output control, the duty cycle is matched. Motor
6508 * direction either matches master's configured direction or opposes
6509 * it based on OpposeMasterDirection.
6510 *
6511 * - DifferentialFollower Parameters:
6512 * - MasterID: Device ID of the differential master to follow.
6513 * - OpposeMasterDirection: Set to false for motor invert to match the master's
6514 * configured Invert - which is typical when master and
6515 * follower are mechanically linked and spin in the same
6516 * direction. Set to true for motor invert to oppose
6517 * the master's configured Invert - this is typical
6518 * where the the master and follower mechanically spin
6519 * in opposite directions.
6520 *
6521 * \param request Control object to request of the device
6522 * \returns Status Code of the request, 0 is OK
6523 */
6525
6526 /**
6527 * \brief Follow the differential motor output of another Talon while
6528 * ignoring the master's invert setting.
6529 *
6530 * \details If Talon is in torque control, the torque is copied -
6531 * which will increase the total torque applied. If Talon is in
6532 * percent supply output control, the duty cycle is matched. Motor
6533 * direction is strictly determined by the configured invert and not
6534 * the master. If you want motor direction to match or oppose the
6535 * master, use FollowerRequest instead.
6536 *
6537 * - DifferentialStrictFollower Parameters:
6538 * - MasterID: Device ID of the differential master to follow.
6539 *
6540 * \param request Control object to request of the device
6541 * \returns Status Code of the request, 0 is OK
6542 */
6544
6545 /**
6546 * \brief Request neutral output of actuator. The applied brake type
6547 * is determined by the NeutralMode configuration.
6548 *
6549 * - NeutralOut Parameters:
6550 * - UseTimesync: Set to true to delay applying this control request until a
6551 * timesync boundary (requires Phoenix Pro and CANivore). This
6552 * eliminates the impact of nondeterministic network delays in
6553 * exchange for a larger but deterministic control latency.
6554 *
6555 * This requires setting the ControlTimesyncFreqHz config in
6556 * MotorOutputConfigs. Additionally, when this is enabled, the
6557 * UpdateFreqHz of this request should be set to 0 Hz.
6558 *
6559 * \param request Control object to request of the device
6560 * \returns Status Code of the request, 0 is OK
6561 */
6563
6564 /**
6565 * \brief Request coast neutral output of actuator. The bridge is
6566 * disabled and the rotor is allowed to coast.
6567 *
6568 * - CoastOut Parameters:
6569 * - UseTimesync: Set to true to delay applying this control request until a
6570 * timesync boundary (requires Phoenix Pro and CANivore). This
6571 * eliminates the impact of nondeterministic network delays in
6572 * exchange for a larger but deterministic control latency.
6573 *
6574 * This requires setting the ControlTimesyncFreqHz config in
6575 * MotorOutputConfigs. Additionally, when this is enabled, the
6576 * UpdateFreqHz of this request should be set to 0 Hz.
6577 *
6578 * \param request Control object to request of the device
6579 * \returns Status Code of the request, 0 is OK
6580 */
6582
6583 /**
6584 * \brief Applies full neutral-brake by shorting motor leads together.
6585 *
6586 * - StaticBrake Parameters:
6587 * - UseTimesync: Set to true to delay applying this control request until a
6588 * timesync boundary (requires Phoenix Pro and CANivore). This
6589 * eliminates the impact of nondeterministic network delays in
6590 * exchange for a larger but deterministic control latency.
6591 *
6592 * This requires setting the ControlTimesyncFreqHz config in
6593 * MotorOutputConfigs. Additionally, when this is enabled, the
6594 * UpdateFreqHz of this request should be set to 0 Hz.
6595 *
6596 * \param request Control object to request of the device
6597 * \returns Status Code of the request, 0 is OK
6598 */
6600
6601 /**
6602 * \brief Requests Motion Magic® to target a final velocity using a
6603 * motion profile. This allows smooth transitions between velocity
6604 * set points. Users can optionally provide a duty cycle feedforward.
6605 *
6606 * \details Motion Magic® Velocity produces a motion profile in
6607 * real-time while attempting to honor the specified Acceleration and
6608 * (optional) Jerk. This control mode does not use the
6609 * CruiseVelocity, Expo_kV, or Expo_kA configs.
6610 *
6611 * If the specified acceleration is zero, the Acceleration under
6612 * Motion Magic® configuration parameter is used instead. This allows
6613 * for runtime adjustment of acceleration for advanced users. Jerk is
6614 * also specified in the Motion Magic® persistent configuration
6615 * values. If Jerk is set to zero, Motion Magic® will produce a
6616 * trapezoidal acceleration profile.
6617 *
6618 * Target velocity can also be changed on-the-fly and Motion Magic®
6619 * will do its best to adjust the profile. This control mode is duty
6620 * cycle based, so relevant closed-loop gains will use fractional duty
6621 * cycle for the numerator: +1.0 represents full forward output.
6622 *
6623 * - MotionMagicVelocityDutyCycle Parameters:
6624 * - Velocity: Target velocity to drive toward in rotations per second. This can
6625 * be changed on-the fly.
6626 * - Acceleration: This is the absolute Acceleration to use generating the
6627 * profile. If this parameter is zero, the Acceleration
6628 * persistent configuration parameter is used instead.
6629 * Acceleration is in rotations per second squared. If nonzero,
6630 * the signage does not matter as the absolute value is used.
6631 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6632 * increases peak power by ~15%. Set to false to use trapezoidal
6633 * commutation.
6634 *
6635 * FOC improves motor performance by leveraging torque (current)
6636 * control. However, this may be inconvenient for applications that
6637 * require specifying duty cycle or voltage. CTR-Electronics has
6638 * developed a hybrid method that combines the performances gains of
6639 * FOC while still allowing applications to provide duty cycle or
6640 * voltage demand. This not to be confused with simple sinusoidal
6641 * control or phase voltage control which lacks the performance
6642 * gains.
6643 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
6644 * - Slot: Select which gains are applied by selecting the slot. Use the
6645 * configuration api to set the gain values for the selected slot before
6646 * enabling this feature. Slot must be within [0,2].
6647 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6648 * is zero (or within deadband). Set to false to use
6649 * the NeutralMode configuration setting (default).
6650 * This flag exists to provide the fundamental
6651 * behavior of this control when output is zero, which
6652 * is to provide 0V to the motor.
6653 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6654 * users to use other limit switch sensors connected to
6655 * robot controller. This also allows use of active
6656 * sensors that require external power.
6657 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6658 * users to use other limit switch sensors connected to
6659 * robot controller. This also allows use of active
6660 * sensors that require external power.
6661 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6662 * LimitForwardMotion and LimitReverseMotion parameters,
6663 * instead allowing motion.
6664 *
6665 * This can be useful on mechanisms such as an
6666 * intake/feeder, where a limit switch stops motion while
6667 * intaking but should be ignored when feeding to a
6668 * shooter.
6669 *
6670 * The hardware limit faults and Forward/ReverseLimit
6671 * signals will still report the values of the limit
6672 * switches regardless of this parameter.
6673 * - UseTimesync: Set to true to delay applying this control request until a
6674 * timesync boundary (requires Phoenix Pro and CANivore). This
6675 * eliminates the impact of nondeterministic network delays in
6676 * exchange for a larger but deterministic control latency.
6677 *
6678 * This requires setting the ControlTimesyncFreqHz config in
6679 * MotorOutputConfigs. Additionally, when this is enabled, the
6680 * UpdateFreqHz of this request should be set to 0 Hz.
6681 *
6682 * \param request Control object to request of the device
6683 * \returns Status Code of the request, 0 is OK
6684 */
6686
6687 /**
6688 * \brief Requests Motion Magic® to target a final velocity using a
6689 * motion profile. This allows smooth transitions between velocity
6690 * set points. Users can optionally provide a voltage feedforward.
6691 *
6692 * \details Motion Magic® Velocity produces a motion profile in
6693 * real-time while attempting to honor the specified Acceleration and
6694 * (optional) Jerk. This control mode does not use the
6695 * CruiseVelocity, Expo_kV, or Expo_kA configs.
6696 *
6697 * If the specified acceleration is zero, the Acceleration under
6698 * Motion Magic® configuration parameter is used instead. This allows
6699 * for runtime adjustment of acceleration for advanced users. Jerk is
6700 * also specified in the Motion Magic® persistent configuration
6701 * values. If Jerk is set to zero, Motion Magic® will produce a
6702 * trapezoidal acceleration profile.
6703 *
6704 * Target velocity can also be changed on-the-fly and Motion Magic®
6705 * will do its best to adjust the profile. This control mode is
6706 * voltage-based, so relevant closed-loop gains will use Volts for the
6707 * numerator.
6708 *
6709 * - MotionMagicVelocityVoltage Parameters:
6710 * - Velocity: Target velocity to drive toward in rotations per second. This can
6711 * be changed on-the fly.
6712 * - Acceleration: This is the absolute Acceleration to use generating the
6713 * profile. If this parameter is zero, the Acceleration
6714 * persistent configuration parameter is used instead.
6715 * Acceleration is in rotations per second squared. If nonzero,
6716 * the signage does not matter as the absolute value is used.
6717 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6718 * increases peak power by ~15%. Set to false to use trapezoidal
6719 * commutation.
6720 *
6721 * FOC improves motor performance by leveraging torque (current)
6722 * control. However, this may be inconvenient for applications that
6723 * require specifying duty cycle or voltage. CTR-Electronics has
6724 * developed a hybrid method that combines the performances gains of
6725 * FOC while still allowing applications to provide duty cycle or
6726 * voltage demand. This not to be confused with simple sinusoidal
6727 * control or phase voltage control which lacks the performance
6728 * gains.
6729 * - FeedForward: Feedforward to apply in volts
6730 * - Slot: Select which gains are applied by selecting the slot. Use the
6731 * configuration api to set the gain values for the selected slot before
6732 * enabling this feature. Slot must be within [0,2].
6733 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6734 * is zero (or within deadband). Set to false to use
6735 * the NeutralMode configuration setting (default).
6736 * This flag exists to provide the fundamental
6737 * behavior of this control when output is zero, which
6738 * is to provide 0V to the motor.
6739 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6740 * users to use other limit switch sensors connected to
6741 * robot controller. This also allows use of active
6742 * sensors that require external power.
6743 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6744 * users to use other limit switch sensors connected to
6745 * robot controller. This also allows use of active
6746 * sensors that require external power.
6747 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6748 * LimitForwardMotion and LimitReverseMotion parameters,
6749 * instead allowing motion.
6750 *
6751 * This can be useful on mechanisms such as an
6752 * intake/feeder, where a limit switch stops motion while
6753 * intaking but should be ignored when feeding to a
6754 * shooter.
6755 *
6756 * The hardware limit faults and Forward/ReverseLimit
6757 * signals will still report the values of the limit
6758 * switches regardless of this parameter.
6759 * - UseTimesync: Set to true to delay applying this control request until a
6760 * timesync boundary (requires Phoenix Pro and CANivore). This
6761 * eliminates the impact of nondeterministic network delays in
6762 * exchange for a larger but deterministic control latency.
6763 *
6764 * This requires setting the ControlTimesyncFreqHz config in
6765 * MotorOutputConfigs. Additionally, when this is enabled, the
6766 * UpdateFreqHz of this request should be set to 0 Hz.
6767 *
6768 * \param request Control object to request of the device
6769 * \returns Status Code of the request, 0 is OK
6770 */
6772
6773 /**
6774 * \brief Requests Motion Magic® to target a final position using an
6775 * exponential motion profile. Users can optionally provide a duty
6776 * cycle feedforward.
6777 *
6778 * \details Motion Magic® Expo produces a motion profile in real-time
6779 * while attempting to honor the Cruise Velocity (optional) and the
6780 * mechanism kV and kA, specified via the Motion Magic® configuration
6781 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA
6782 * configs are always in output units of Volts.
6783 *
6784 * Setting Cruise Velocity to 0 will allow the profile to run to the
6785 * max possible velocity based on Expo_kV. This control mode does not
6786 * use the Acceleration or Jerk configs.
6787 *
6788 * Target position can be changed on-the-fly and Motion Magic® will do
6789 * its best to adjust the profile. This control mode is duty cycle
6790 * based, so relevant closed-loop gains will use fractional duty cycle
6791 * for the numerator: +1.0 represents full forward output.
6792 *
6793 * - MotionMagicExpoDutyCycle Parameters:
6794 * - Position: Position to drive toward in rotations.
6795 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6796 * increases peak power by ~15%. Set to false to use trapezoidal
6797 * commutation.
6798 *
6799 * FOC improves motor performance by leveraging torque (current)
6800 * control. However, this may be inconvenient for applications that
6801 * require specifying duty cycle or voltage. CTR-Electronics has
6802 * developed a hybrid method that combines the performances gains of
6803 * FOC while still allowing applications to provide duty cycle or
6804 * voltage demand. This not to be confused with simple sinusoidal
6805 * control or phase voltage control which lacks the performance
6806 * gains.
6807 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
6808 * - Slot: Select which gains are applied by selecting the slot. Use the
6809 * configuration api to set the gain values for the selected slot before
6810 * enabling this feature. Slot must be within [0,2].
6811 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6812 * is zero (or within deadband). Set to false to use
6813 * the NeutralMode configuration setting (default).
6814 * This flag exists to provide the fundamental
6815 * behavior of this control when output is zero, which
6816 * is to provide 0V to the motor.
6817 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6818 * users to use other limit switch sensors connected to
6819 * robot controller. This also allows use of active
6820 * sensors that require external power.
6821 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6822 * users to use other limit switch sensors connected to
6823 * robot controller. This also allows use of active
6824 * sensors that require external power.
6825 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6826 * LimitForwardMotion and LimitReverseMotion parameters,
6827 * instead allowing motion.
6828 *
6829 * This can be useful on mechanisms such as an
6830 * intake/feeder, where a limit switch stops motion while
6831 * intaking but should be ignored when feeding to a
6832 * shooter.
6833 *
6834 * The hardware limit faults and Forward/ReverseLimit
6835 * signals will still report the values of the limit
6836 * switches regardless of this parameter.
6837 * - UseTimesync: Set to true to delay applying this control request until a
6838 * timesync boundary (requires Phoenix Pro and CANivore). This
6839 * eliminates the impact of nondeterministic network delays in
6840 * exchange for a larger but deterministic control latency.
6841 *
6842 * This requires setting the ControlTimesyncFreqHz config in
6843 * MotorOutputConfigs. Additionally, when this is enabled, the
6844 * UpdateFreqHz of this request should be set to 0 Hz.
6845 *
6846 * \param request Control object to request of the device
6847 * \returns Status Code of the request, 0 is OK
6848 */
6850
6851 /**
6852 * \brief Requests Motion Magic® to target a final position using an
6853 * exponential motion profile. Users can optionally provide a voltage
6854 * feedforward.
6855 *
6856 * \details Motion Magic® Expo produces a motion profile in real-time
6857 * while attempting to honor the Cruise Velocity (optional) and the
6858 * mechanism kV and kA, specified via the Motion Magic® configuration
6859 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA
6860 * configs are always in output units of Volts.
6861 *
6862 * Setting Cruise Velocity to 0 will allow the profile to run to the
6863 * max possible velocity based on Expo_kV. This control mode does not
6864 * use the Acceleration or Jerk configs.
6865 *
6866 * Target position can be changed on-the-fly and Motion Magic® will do
6867 * its best to adjust the profile. This control mode is
6868 * voltage-based, so relevant closed-loop gains will use Volts for the
6869 * numerator.
6870 *
6871 * - MotionMagicExpoVoltage Parameters:
6872 * - Position: Position to drive toward in rotations.
6873 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6874 * increases peak power by ~15%. Set to false to use trapezoidal
6875 * commutation.
6876 *
6877 * FOC improves motor performance by leveraging torque (current)
6878 * control. However, this may be inconvenient for applications that
6879 * require specifying duty cycle or voltage. CTR-Electronics has
6880 * developed a hybrid method that combines the performances gains of
6881 * FOC while still allowing applications to provide duty cycle or
6882 * voltage demand. This not to be confused with simple sinusoidal
6883 * control or phase voltage control which lacks the performance
6884 * gains.
6885 * - FeedForward: Feedforward to apply in volts
6886 * - Slot: Select which gains are applied by selecting the slot. Use the
6887 * configuration api to set the gain values for the selected slot before
6888 * enabling this feature. Slot must be within [0,2].
6889 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6890 * is zero (or within deadband). Set to false to use
6891 * the NeutralMode configuration setting (default).
6892 * This flag exists to provide the fundamental
6893 * behavior of this control when output is zero, which
6894 * is to provide 0V to the motor.
6895 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6896 * users to use other limit switch sensors connected to
6897 * robot controller. This also allows use of active
6898 * sensors that require external power.
6899 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6900 * users to use other limit switch sensors connected to
6901 * robot controller. This also allows use of active
6902 * sensors that require external power.
6903 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6904 * LimitForwardMotion and LimitReverseMotion parameters,
6905 * instead allowing motion.
6906 *
6907 * This can be useful on mechanisms such as an
6908 * intake/feeder, where a limit switch stops motion while
6909 * intaking but should be ignored when feeding to a
6910 * shooter.
6911 *
6912 * The hardware limit faults and Forward/ReverseLimit
6913 * signals will still report the values of the limit
6914 * switches regardless of this parameter.
6915 * - UseTimesync: Set to true to delay applying this control request until a
6916 * timesync boundary (requires Phoenix Pro and CANivore). This
6917 * eliminates the impact of nondeterministic network delays in
6918 * exchange for a larger but deterministic control latency.
6919 *
6920 * This requires setting the ControlTimesyncFreqHz config in
6921 * MotorOutputConfigs. Additionally, when this is enabled, the
6922 * UpdateFreqHz of this request should be set to 0 Hz.
6923 *
6924 * \param request Control object to request of the device
6925 * \returns Status Code of the request, 0 is OK
6926 */
6928
6929 /**
6930 * \brief Requests Motion Magic® to target a final position using a
6931 * motion profile. This dynamic request allows runtime changes to
6932 * Cruise Velocity, Acceleration, and Jerk. Users can optionally
6933 * provide a duty cycle feedforward. This control requires use of a
6934 * CANivore.
6935 *
6936 * \details Motion Magic® produces a motion profile in real-time while
6937 * attempting to honor the specified Cruise Velocity, Acceleration,
6938 * and (optional) Jerk. This control mode does not use the Expo_kV or
6939 * Expo_kA configs.
6940 *
6941 * Target position can be changed on-the-fly and Motion Magic® will do
6942 * its best to adjust the profile. This control mode is duty cycle
6943 * based, so relevant closed-loop gains will use fractional duty cycle
6944 * for the numerator: +1.0 represents full forward output.
6945 *
6946 * - DynamicMotionMagicDutyCycle Parameters:
6947 * - Position: Position to drive toward in rotations.
6948 * - Velocity: Cruise velocity for profiling. The signage does not matter as the
6949 * device will use the absolute value for profile generation.
6950 * - Acceleration: Acceleration for profiling. The signage does not matter as
6951 * the device will use the absolute value for profile generation
6952 * - Jerk: Jerk for profiling. The signage does not matter as the device will
6953 * use the absolute value for profile generation.
6954 *
6955 * Jerk is optional; if this is set to zero, then Motion Magic® will not
6956 * apply a Jerk limit.
6957 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6958 * increases peak power by ~15%. Set to false to use trapezoidal
6959 * commutation.
6960 *
6961 * FOC improves motor performance by leveraging torque (current)
6962 * control. However, this may be inconvenient for applications that
6963 * require specifying duty cycle or voltage. CTR-Electronics has
6964 * developed a hybrid method that combines the performances gains of
6965 * FOC while still allowing applications to provide duty cycle or
6966 * voltage demand. This not to be confused with simple sinusoidal
6967 * control or phase voltage control which lacks the performance
6968 * gains.
6969 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
6970 * - Slot: Select which gains are applied by selecting the slot. Use the
6971 * configuration api to set the gain values for the selected slot before
6972 * enabling this feature. Slot must be within [0,2].
6973 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6974 * is zero (or within deadband). Set to false to use
6975 * the NeutralMode configuration setting (default).
6976 * This flag exists to provide the fundamental
6977 * behavior of this control when output is zero, which
6978 * is to provide 0V to the motor.
6979 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6980 * users to use other limit switch sensors connected to
6981 * robot controller. This also allows use of active
6982 * sensors that require external power.
6983 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6984 * users to use other limit switch sensors connected to
6985 * robot controller. This also allows use of active
6986 * sensors that require external power.
6987 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6988 * LimitForwardMotion and LimitReverseMotion parameters,
6989 * instead allowing motion.
6990 *
6991 * This can be useful on mechanisms such as an
6992 * intake/feeder, where a limit switch stops motion while
6993 * intaking but should be ignored when feeding to a
6994 * shooter.
6995 *
6996 * The hardware limit faults and Forward/ReverseLimit
6997 * signals will still report the values of the limit
6998 * switches regardless of this parameter.
6999 * - UseTimesync: Set to true to delay applying this control request until a
7000 * timesync boundary (requires Phoenix Pro and CANivore). This
7001 * eliminates the impact of nondeterministic network delays in
7002 * exchange for a larger but deterministic control latency.
7003 *
7004 * This requires setting the ControlTimesyncFreqHz config in
7005 * MotorOutputConfigs. Additionally, when this is enabled, the
7006 * UpdateFreqHz of this request should be set to 0 Hz.
7007 *
7008 * \param request Control object to request of the device
7009 * \returns Status Code of the request, 0 is OK
7010 */
7012
7013 /**
7014 * \brief Requests Motion Magic® to target a final position using a
7015 * motion profile. This dynamic request allows runtime changes to
7016 * Cruise Velocity, Acceleration, and Jerk. Users can optionally
7017 * provide a voltage feedforward. This control requires use of a
7018 * CANivore.
7019 *
7020 * \details Motion Magic® produces a motion profile in real-time while
7021 * attempting to honor the specified Cruise Velocity, Acceleration,
7022 * and (optional) Jerk. This control mode does not use the Expo_kV or
7023 * Expo_kA configs.
7024 *
7025 * Target position can be changed on-the-fly and Motion Magic® will do
7026 * its best to adjust the profile. This control mode is
7027 * voltage-based, so relevant closed-loop gains will use Volts for the
7028 * numerator.
7029 *
7030 * - DynamicMotionMagicVoltage Parameters:
7031 * - Position: Position to drive toward in rotations.
7032 * - Velocity: Cruise velocity for profiling. The signage does not matter as the
7033 * device will use the absolute value for profile generation.
7034 * - Acceleration: Acceleration for profiling. The signage does not matter as
7035 * the device will use the absolute value for profile generation.
7036 * - Jerk: Jerk for profiling. The signage does not matter as the device will
7037 * use the absolute value for profile generation.
7038 *
7039 * Jerk is optional; if this is set to zero, then Motion Magic® will not
7040 * apply a Jerk limit.
7041 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
7042 * increases peak power by ~15%. Set to false to use trapezoidal
7043 * commutation.
7044 *
7045 * FOC improves motor performance by leveraging torque (current)
7046 * control. However, this may be inconvenient for applications that
7047 * require specifying duty cycle or voltage. CTR-Electronics has
7048 * developed a hybrid method that combines the performances gains of
7049 * FOC while still allowing applications to provide duty cycle or
7050 * voltage demand. This not to be confused with simple sinusoidal
7051 * control or phase voltage control which lacks the performance
7052 * gains.
7053 * - FeedForward: Feedforward to apply in volts
7054 * - Slot: Select which gains are applied by selecting the slot. Use the
7055 * configuration api to set the gain values for the selected slot before
7056 * enabling this feature. Slot must be within [0,2].
7057 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
7058 * is zero (or within deadband). Set to false to use
7059 * the NeutralMode configuration setting (default).
7060 * This flag exists to provide the fundamental
7061 * behavior of this control when output is zero, which
7062 * is to provide 0V to the motor.
7063 * - LimitForwardMotion: Set to true to force forward limiting. This allows
7064 * users to use other limit switch sensors connected to
7065 * robot controller. This also allows use of active
7066 * sensors that require external power.
7067 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
7068 * users to use other limit switch sensors connected to
7069 * robot controller. This also allows use of active
7070 * sensors that require external power.
7071 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
7072 * LimitForwardMotion and LimitReverseMotion parameters,
7073 * instead allowing motion.
7074 *
7075 * This can be useful on mechanisms such as an
7076 * intake/feeder, where a limit switch stops motion while
7077 * intaking but should be ignored when feeding to a
7078 * shooter.
7079 *
7080 * The hardware limit faults and Forward/ReverseLimit
7081 * signals will still report the values of the limit
7082 * switches regardless of this parameter.
7083 * - UseTimesync: Set to true to delay applying this control request until a
7084 * timesync boundary (requires Phoenix Pro and CANivore). This
7085 * eliminates the impact of nondeterministic network delays in
7086 * exchange for a larger but deterministic control latency.
7087 *
7088 * This requires setting the ControlTimesyncFreqHz config in
7089 * MotorOutputConfigs. Additionally, when this is enabled, the
7090 * UpdateFreqHz of this request should be set to 0 Hz.
7091 *
7092 * \param request Control object to request of the device
7093 * \returns Status Code of the request, 0 is OK
7094 */
7096
7097 /**
7098 * \brief Differential control with duty cycle average target and
7099 * position difference target.
7100 *
7101 * - Diff_DutyCycleOut_Position Parameters:
7102 * - AverageRequest: Average DutyCycleOut request of the mechanism.
7103 * - DifferentialRequest: Differential PositionDutyCycle request of the
7104 * mechanism.
7105 *
7106 * \param request Control object to request of the device
7107 * \returns Status Code of the request, 0 is OK
7108 */
7109 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_DutyCycleOut_Position &request) override;
7110
7111 /**
7112 * \brief Differential control with position average target and
7113 * position difference target using dutycycle control.
7114 *
7115 * - Diff_PositionDutyCycle_Position Parameters:
7116 * - AverageRequest: Average PositionDutyCycle request of the mechanism.
7117 * - DifferentialRequest: Differential PositionDutyCycle request of the
7118 * mechanism.
7119 *
7120 * \param request Control object to request of the device
7121 * \returns Status Code of the request, 0 is OK
7122 */
7123 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionDutyCycle_Position &request) override;
7124
7125 /**
7126 * \brief Differential control with velocity average target and
7127 * position difference target using dutycycle control.
7128 *
7129 * - Diff_VelocityDutyCycle_Position Parameters:
7130 * - AverageRequest: Average VelocityDutyCYcle request of the mechanism.
7131 * - DifferentialRequest: Differential PositionDutyCycle request of the
7132 * mechanism.
7133 *
7134 * \param request Control object to request of the device
7135 * \returns Status Code of the request, 0 is OK
7136 */
7137 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityDutyCycle_Position &request) override;
7138
7139 /**
7140 * \brief Differential control with Motion Magic® average target and
7141 * position difference target using dutycycle control.
7142 *
7143 * - Diff_MotionMagicDutyCycle_Position Parameters:
7144 * - AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
7145 * - DifferentialRequest: Differential PositionDutyCycle request of the
7146 * mechanism.
7147 *
7148 * \param request Control object to request of the device
7149 * \returns Status Code of the request, 0 is OK
7150 */
7151 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicDutyCycle_Position &request) override;
7152
7153 /**
7154 * \brief Differential control with duty cycle average target and
7155 * velocity difference target.
7156 *
7157 * - Diff_DutyCycleOut_Velocity Parameters:
7158 * - AverageRequest: Average DutyCycleOut request of the mechanism.
7159 * - DifferentialRequest: Differential VelocityDutyCycle request of the
7160 * mechanism.
7161 *
7162 * \param request Control object to request of the device
7163 * \returns Status Code of the request, 0 is OK
7164 */
7165 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_DutyCycleOut_Velocity &request) override;
7166
7167 /**
7168 * \brief Differential control with position average target and
7169 * velocity difference target using dutycycle control.
7170 *
7171 * - Diff_PositionDutyCycle_Velocity Parameters:
7172 * - AverageRequest: Average PositionDutyCycle request of the mechanism.
7173 * - DifferentialRequest: Differential VelocityDutyCycle request of the
7174 * mechanism.
7175 *
7176 * \param request Control object to request of the device
7177 * \returns Status Code of the request, 0 is OK
7178 */
7179 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionDutyCycle_Velocity &request) override;
7180
7181 /**
7182 * \brief Differential control with velocity average target and
7183 * velocity difference target using dutycycle control.
7184 *
7185 * - Diff_VelocityDutyCycle_Velocity Parameters:
7186 * - AverageRequest: Average VelocityDutyCycle request of the mechanism.
7187 * - DifferentialRequest: Differential VelocityDutyCycle request of the
7188 * mechanism.
7189 *
7190 * \param request Control object to request of the device
7191 * \returns Status Code of the request, 0 is OK
7192 */
7193 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityDutyCycle_Velocity &request) override;
7194
7195 /**
7196 * \brief Differential control with Motion Magic® average target and
7197 * velocity difference target using dutycycle control.
7198 *
7199 * - Diff_MotionMagicDutyCycle_Velocity Parameters:
7200 * - AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
7201 * - DifferentialRequest: Differential VelocityDutyCycle request of the
7202 * mechanism.
7203 *
7204 * \param request Control object to request of the device
7205 * \returns Status Code of the request, 0 is OK
7206 */
7207 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicDutyCycle_Velocity &request) override;
7208
7209 /**
7210 * \brief Differential control with voltage average target and
7211 * position difference target.
7212 *
7213 * - Diff_VoltageOut_Position Parameters:
7214 * - AverageRequest: Average VoltageOut request of the mechanism.
7215 * - DifferentialRequest: Differential PositionVoltage request of the mechanism.
7216 *
7217 * \param request Control object to request of the device
7218 * \returns Status Code of the request, 0 is OK
7219 */
7220 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VoltageOut_Position &request) override;
7221
7222 /**
7223 * \brief Differential control with position average target and
7224 * position difference target using voltage control.
7225 *
7226 * - Diff_PositionVoltage_Position Parameters:
7227 * - AverageRequest: Average PositionVoltage request of the mechanism.
7228 * - DifferentialRequest: Differential PositionVoltage request of the mechanism.
7229 *
7230 * \param request Control object to request of the device
7231 * \returns Status Code of the request, 0 is OK
7232 */
7233 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionVoltage_Position &request) override;
7234
7235 /**
7236 * \brief Differential control with velocity average target and
7237 * position difference target using voltage control.
7238 *
7239 * - Diff_VelocityVoltage_Position Parameters:
7240 * - AverageRequest: Average VelocityVoltage request of the mechanism.
7241 * - DifferentialRequest: Differential PositionVoltage request of the mechanism.
7242 *
7243 * \param request Control object to request of the device
7244 * \returns Status Code of the request, 0 is OK
7245 */
7246 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityVoltage_Position &request) override;
7247
7248 /**
7249 * \brief Differential control with Motion Magic® average target and
7250 * position difference target using voltage control.
7251 *
7252 * - Diff_MotionMagicVoltage_Position Parameters:
7253 * - AverageRequest: Average MotionMagicVoltage request of the mechanism.
7254 * - DifferentialRequest: Differential PositionVoltage request of the mechanism.
7255 *
7256 * \param request Control object to request of the device
7257 * \returns Status Code of the request, 0 is OK
7258 */
7259 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVoltage_Position &request) override;
7260
7261 /**
7262 * \brief Differential control with voltage average target and
7263 * velocity difference target.
7264 *
7265 * - Diff_VoltageOut_Velocity Parameters:
7266 * - AverageRequest: Average VoltageOut request of the mechanism.
7267 * - DifferentialRequest: Differential VelocityVoltage request of the mechanism.
7268 *
7269 * \param request Control object to request of the device
7270 * \returns Status Code of the request, 0 is OK
7271 */
7272 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VoltageOut_Velocity &request) override;
7273
7274 /**
7275 * \brief Differential control with position average target and
7276 * velocity difference target using voltage control.
7277 *
7278 * - Diff_PositionVoltage_Velocity Parameters:
7279 * - AverageRequest: Average PositionVoltage request of the mechanism.
7280 * - DifferentialRequest: Differential VelocityVoltage request of the mechanism.
7281 *
7282 * \param request Control object to request of the device
7283 * \returns Status Code of the request, 0 is OK
7284 */
7285 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionVoltage_Velocity &request) override;
7286
7287 /**
7288 * \brief Differential control with velocity average target and
7289 * velocity difference target using voltage control.
7290 *
7291 * - Diff_VelocityVoltage_Velocity Parameters:
7292 * - AverageRequest: Average VelocityVoltage request of the mechanism.
7293 * - DifferentialRequest: Differential VelocityVoltage request of the mechanism.
7294 *
7295 * \param request Control object to request of the device
7296 * \returns Status Code of the request, 0 is OK
7297 */
7298 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityVoltage_Velocity &request) override;
7299
7300 /**
7301 * \brief Differential control with Motion Magic® average target and
7302 * velocity difference target using voltage control.
7303 *
7304 * - Diff_MotionMagicVoltage_Velocity Parameters:
7305 * - AverageRequest: Average MotionMagicVoltage request of the mechanism.
7306 * - DifferentialRequest: Differential VelocityVoltage request of the mechanism.
7307 *
7308 * \param request Control object to request of the device
7309 * \returns Status Code of the request, 0 is OK
7310 */
7311 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVoltage_Velocity &request) override;
7312
7313 /**
7314 * \brief Control device with generic control request object. User must make
7315 * sure the specified object is castable to a valid control request,
7316 * otherwise this function will fail at run-time and return the NotSupported
7317 * StatusCode
7318 *
7319 * \param request Control object to request of the device
7320 * \returns Status Code of the request, 0 is OK
7321 */
7323 {
7324 controls::ControlRequest const *ptr = &request;
7325 (void)ptr;
7326 auto const *DutyCycleOutValue = dynamic_cast<controls::DutyCycleOut const *>(ptr);
7327 if (DutyCycleOutValue != nullptr)
7328 return SetControl(*DutyCycleOutValue);
7329 auto const *VoltageOutValue = dynamic_cast<controls::VoltageOut const *>(ptr);
7330 if (VoltageOutValue != nullptr)
7331 return SetControl(*VoltageOutValue);
7332 auto const *PositionDutyCycleValue = dynamic_cast<controls::PositionDutyCycle const *>(ptr);
7333 if (PositionDutyCycleValue != nullptr)
7334 return SetControl(*PositionDutyCycleValue);
7335 auto const *PositionVoltageValue = dynamic_cast<controls::PositionVoltage const *>(ptr);
7336 if (PositionVoltageValue != nullptr)
7337 return SetControl(*PositionVoltageValue);
7338 auto const *VelocityDutyCycleValue = dynamic_cast<controls::VelocityDutyCycle const *>(ptr);
7339 if (VelocityDutyCycleValue != nullptr)
7340 return SetControl(*VelocityDutyCycleValue);
7341 auto const *VelocityVoltageValue = dynamic_cast<controls::VelocityVoltage const *>(ptr);
7342 if (VelocityVoltageValue != nullptr)
7343 return SetControl(*VelocityVoltageValue);
7344 auto const *MotionMagicDutyCycleValue = dynamic_cast<controls::MotionMagicDutyCycle const *>(ptr);
7345 if (MotionMagicDutyCycleValue != nullptr)
7346 return SetControl(*MotionMagicDutyCycleValue);
7347 auto const *MotionMagicVoltageValue = dynamic_cast<controls::MotionMagicVoltage const *>(ptr);
7348 if (MotionMagicVoltageValue != nullptr)
7349 return SetControl(*MotionMagicVoltageValue);
7350 auto const *DifferentialDutyCycleValue = dynamic_cast<controls::DifferentialDutyCycle const *>(ptr);
7351 if (DifferentialDutyCycleValue != nullptr)
7352 return SetControl(*DifferentialDutyCycleValue);
7353 auto const *DifferentialVoltageValue = dynamic_cast<controls::DifferentialVoltage const *>(ptr);
7354 if (DifferentialVoltageValue != nullptr)
7355 return SetControl(*DifferentialVoltageValue);
7356 auto const *DifferentialPositionDutyCycleValue = dynamic_cast<controls::DifferentialPositionDutyCycle const *>(ptr);
7357 if (DifferentialPositionDutyCycleValue != nullptr)
7358 return SetControl(*DifferentialPositionDutyCycleValue);
7359 auto const *DifferentialPositionVoltageValue = dynamic_cast<controls::DifferentialPositionVoltage const *>(ptr);
7360 if (DifferentialPositionVoltageValue != nullptr)
7361 return SetControl(*DifferentialPositionVoltageValue);
7362 auto const *DifferentialVelocityDutyCycleValue = dynamic_cast<controls::DifferentialVelocityDutyCycle const *>(ptr);
7363 if (DifferentialVelocityDutyCycleValue != nullptr)
7364 return SetControl(*DifferentialVelocityDutyCycleValue);
7365 auto const *DifferentialVelocityVoltageValue = dynamic_cast<controls::DifferentialVelocityVoltage const *>(ptr);
7366 if (DifferentialVelocityVoltageValue != nullptr)
7367 return SetControl(*DifferentialVelocityVoltageValue);
7368 auto const *DifferentialMotionMagicDutyCycleValue = dynamic_cast<controls::DifferentialMotionMagicDutyCycle const *>(ptr);
7369 if (DifferentialMotionMagicDutyCycleValue != nullptr)
7370 return SetControl(*DifferentialMotionMagicDutyCycleValue);
7371 auto const *DifferentialMotionMagicVoltageValue = dynamic_cast<controls::DifferentialMotionMagicVoltage const *>(ptr);
7372 if (DifferentialMotionMagicVoltageValue != nullptr)
7373 return SetControl(*DifferentialMotionMagicVoltageValue);
7374 auto const *FollowerValue = dynamic_cast<controls::Follower const *>(ptr);
7375 if (FollowerValue != nullptr)
7376 return SetControl(*FollowerValue);
7377 auto const *StrictFollowerValue = dynamic_cast<controls::StrictFollower const *>(ptr);
7378 if (StrictFollowerValue != nullptr)
7379 return SetControl(*StrictFollowerValue);
7380 auto const *DifferentialFollowerValue = dynamic_cast<controls::DifferentialFollower const *>(ptr);
7381 if (DifferentialFollowerValue != nullptr)
7382 return SetControl(*DifferentialFollowerValue);
7383 auto const *DifferentialStrictFollowerValue = dynamic_cast<controls::DifferentialStrictFollower const *>(ptr);
7384 if (DifferentialStrictFollowerValue != nullptr)
7385 return SetControl(*DifferentialStrictFollowerValue);
7386 auto const *NeutralOutValue = dynamic_cast<controls::NeutralOut const *>(ptr);
7387 if (NeutralOutValue != nullptr)
7388 return SetControl(*NeutralOutValue);
7389 auto const *CoastOutValue = dynamic_cast<controls::CoastOut const *>(ptr);
7390 if (CoastOutValue != nullptr)
7391 return SetControl(*CoastOutValue);
7392 auto const *StaticBrakeValue = dynamic_cast<controls::StaticBrake const *>(ptr);
7393 if (StaticBrakeValue != nullptr)
7394 return SetControl(*StaticBrakeValue);
7395 auto const *MotionMagicVelocityDutyCycleValue = dynamic_cast<controls::MotionMagicVelocityDutyCycle const *>(ptr);
7396 if (MotionMagicVelocityDutyCycleValue != nullptr)
7397 return SetControl(*MotionMagicVelocityDutyCycleValue);
7398 auto const *MotionMagicVelocityVoltageValue = dynamic_cast<controls::MotionMagicVelocityVoltage const *>(ptr);
7399 if (MotionMagicVelocityVoltageValue != nullptr)
7400 return SetControl(*MotionMagicVelocityVoltageValue);
7401 auto const *MotionMagicExpoDutyCycleValue = dynamic_cast<controls::MotionMagicExpoDutyCycle const *>(ptr);
7402 if (MotionMagicExpoDutyCycleValue != nullptr)
7403 return SetControl(*MotionMagicExpoDutyCycleValue);
7404 auto const *MotionMagicExpoVoltageValue = dynamic_cast<controls::MotionMagicExpoVoltage const *>(ptr);
7405 if (MotionMagicExpoVoltageValue != nullptr)
7406 return SetControl(*MotionMagicExpoVoltageValue);
7407 auto const *DynamicMotionMagicDutyCycleValue = dynamic_cast<controls::DynamicMotionMagicDutyCycle const *>(ptr);
7408 if (DynamicMotionMagicDutyCycleValue != nullptr)
7409 return SetControl(*DynamicMotionMagicDutyCycleValue);
7410 auto const *DynamicMotionMagicVoltageValue = dynamic_cast<controls::DynamicMotionMagicVoltage const *>(ptr);
7411 if (DynamicMotionMagicVoltageValue != nullptr)
7412 return SetControl(*DynamicMotionMagicVoltageValue);
7413 auto const *Diff_DutyCycleOut_PositionValue = dynamic_cast<controls::compound::Diff_DutyCycleOut_Position const *>(ptr);
7414 if (Diff_DutyCycleOut_PositionValue != nullptr)
7415 return SetControl(*Diff_DutyCycleOut_PositionValue);
7416 auto const *Diff_PositionDutyCycle_PositionValue = dynamic_cast<controls::compound::Diff_PositionDutyCycle_Position const *>(ptr);
7417 if (Diff_PositionDutyCycle_PositionValue != nullptr)
7418 return SetControl(*Diff_PositionDutyCycle_PositionValue);
7419 auto const *Diff_VelocityDutyCycle_PositionValue = dynamic_cast<controls::compound::Diff_VelocityDutyCycle_Position const *>(ptr);
7420 if (Diff_VelocityDutyCycle_PositionValue != nullptr)
7421 return SetControl(*Diff_VelocityDutyCycle_PositionValue);
7422 auto const *Diff_MotionMagicDutyCycle_PositionValue = dynamic_cast<controls::compound::Diff_MotionMagicDutyCycle_Position const *>(ptr);
7423 if (Diff_MotionMagicDutyCycle_PositionValue != nullptr)
7424 return SetControl(*Diff_MotionMagicDutyCycle_PositionValue);
7425 auto const *Diff_DutyCycleOut_VelocityValue = dynamic_cast<controls::compound::Diff_DutyCycleOut_Velocity const *>(ptr);
7426 if (Diff_DutyCycleOut_VelocityValue != nullptr)
7427 return SetControl(*Diff_DutyCycleOut_VelocityValue);
7428 auto const *Diff_PositionDutyCycle_VelocityValue = dynamic_cast<controls::compound::Diff_PositionDutyCycle_Velocity const *>(ptr);
7429 if (Diff_PositionDutyCycle_VelocityValue != nullptr)
7430 return SetControl(*Diff_PositionDutyCycle_VelocityValue);
7431 auto const *Diff_VelocityDutyCycle_VelocityValue = dynamic_cast<controls::compound::Diff_VelocityDutyCycle_Velocity const *>(ptr);
7432 if (Diff_VelocityDutyCycle_VelocityValue != nullptr)
7433 return SetControl(*Diff_VelocityDutyCycle_VelocityValue);
7434 auto const *Diff_MotionMagicDutyCycle_VelocityValue = dynamic_cast<controls::compound::Diff_MotionMagicDutyCycle_Velocity const *>(ptr);
7435 if (Diff_MotionMagicDutyCycle_VelocityValue != nullptr)
7436 return SetControl(*Diff_MotionMagicDutyCycle_VelocityValue);
7437 auto const *Diff_VoltageOut_PositionValue = dynamic_cast<controls::compound::Diff_VoltageOut_Position const *>(ptr);
7438 if (Diff_VoltageOut_PositionValue != nullptr)
7439 return SetControl(*Diff_VoltageOut_PositionValue);
7440 auto const *Diff_PositionVoltage_PositionValue = dynamic_cast<controls::compound::Diff_PositionVoltage_Position const *>(ptr);
7441 if (Diff_PositionVoltage_PositionValue != nullptr)
7442 return SetControl(*Diff_PositionVoltage_PositionValue);
7443 auto const *Diff_VelocityVoltage_PositionValue = dynamic_cast<controls::compound::Diff_VelocityVoltage_Position const *>(ptr);
7444 if (Diff_VelocityVoltage_PositionValue != nullptr)
7445 return SetControl(*Diff_VelocityVoltage_PositionValue);
7446 auto const *Diff_MotionMagicVoltage_PositionValue = dynamic_cast<controls::compound::Diff_MotionMagicVoltage_Position const *>(ptr);
7447 if (Diff_MotionMagicVoltage_PositionValue != nullptr)
7448 return SetControl(*Diff_MotionMagicVoltage_PositionValue);
7449 auto const *Diff_VoltageOut_VelocityValue = dynamic_cast<controls::compound::Diff_VoltageOut_Velocity const *>(ptr);
7450 if (Diff_VoltageOut_VelocityValue != nullptr)
7451 return SetControl(*Diff_VoltageOut_VelocityValue);
7452 auto const *Diff_PositionVoltage_VelocityValue = dynamic_cast<controls::compound::Diff_PositionVoltage_Velocity const *>(ptr);
7453 if (Diff_PositionVoltage_VelocityValue != nullptr)
7454 return SetControl(*Diff_PositionVoltage_VelocityValue);
7455 auto const *Diff_VelocityVoltage_VelocityValue = dynamic_cast<controls::compound::Diff_VelocityVoltage_Velocity const *>(ptr);
7456 if (Diff_VelocityVoltage_VelocityValue != nullptr)
7457 return SetControl(*Diff_VelocityVoltage_VelocityValue);
7458 auto const *Diff_MotionMagicVoltage_VelocityValue = dynamic_cast<controls::compound::Diff_MotionMagicVoltage_Velocity const *>(ptr);
7459 if (Diff_MotionMagicVoltage_VelocityValue != nullptr)
7460 return SetControl(*Diff_MotionMagicVoltage_VelocityValue);
7462 }
7463
7464
7465 /**
7466 * \brief Sets the mechanism position of the device in mechanism
7467 * rotations.
7468 *
7469 * \param newValue Value to set to. Units are in rotations.
7470 * \param timeoutSeconds Maximum time to wait up to in seconds.
7471 * \returns StatusCode of the set command
7472 */
7473 ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds) override
7474 {
7475 return GetConfigurator().SetPosition(newValue, timeoutSeconds);
7476 }
7477 /**
7478 * \brief Sets the mechanism position of the device in mechanism
7479 * rotations.
7480 *
7481 * This will wait up to 0.100 seconds (100ms) by default.
7482 *
7483 * \param newValue Value to set to. Units are in rotations.
7484 * \returns StatusCode of the set command
7485 */
7486 ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue) override
7487 {
7488 return SetPosition(newValue, 0.100_s);
7489 }
7490
7491 /**
7492 * \brief Clear the sticky faults in the device.
7493 *
7494 * \details This typically has no impact on the device functionality.
7495 * Instead, it just clears telemetry faults that are accessible via
7496 * API and Tuner Self-Test.
7497 *
7498 * \param timeoutSeconds Maximum time to wait up to in seconds.
7499 * \returns StatusCode of the set command
7500 */
7501 ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds) override
7502 {
7503 return GetConfigurator().ClearStickyFaults(timeoutSeconds);
7504 }
7505 /**
7506 * \brief Clear the sticky faults in the device.
7507 *
7508 * \details This typically has no impact on the device functionality.
7509 * Instead, it just clears telemetry faults that are accessible via
7510 * API and Tuner Self-Test.
7511 *
7512 * This will wait up to 0.100 seconds (100ms) by default.
7513 *
7514 * \returns StatusCode of the set command
7515 */
7517 {
7518 return ClearStickyFaults(0.100_s);
7519 }
7520
7521 /**
7522 * \brief Clear sticky fault: Hardware fault occurred
7523 *
7524 * \param timeoutSeconds Maximum time to wait up to in seconds.
7525 * \returns StatusCode of the set command
7526 */
7527 ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds) override
7528 {
7529 return GetConfigurator().ClearStickyFault_Hardware(timeoutSeconds);
7530 }
7531 /**
7532 * \brief Clear sticky fault: Hardware fault occurred
7533 *
7534 * This will wait up to 0.100 seconds (100ms) by default.
7535 *
7536 * \returns StatusCode of the set command
7537 */
7542
7543 /**
7544 * \brief Clear sticky fault: Processor temperature exceeded limit
7545 *
7546 * \param timeoutSeconds Maximum time to wait up to in seconds.
7547 * \returns StatusCode of the set command
7548 */
7549 ctre::phoenix::StatusCode ClearStickyFault_ProcTemp(units::time::second_t timeoutSeconds) override
7550 {
7551 return GetConfigurator().ClearStickyFault_ProcTemp(timeoutSeconds);
7552 }
7553 /**
7554 * \brief Clear sticky fault: Processor temperature exceeded limit
7555 *
7556 * This will wait up to 0.100 seconds (100ms) by default.
7557 *
7558 * \returns StatusCode of the set command
7559 */
7564
7565 /**
7566 * \brief Clear sticky fault: Device temperature exceeded limit
7567 *
7568 * \param timeoutSeconds Maximum time to wait up to in seconds.
7569 * \returns StatusCode of the set command
7570 */
7571 ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp(units::time::second_t timeoutSeconds) override
7572 {
7573 return GetConfigurator().ClearStickyFault_DeviceTemp(timeoutSeconds);
7574 }
7575 /**
7576 * \brief Clear sticky fault: Device temperature exceeded limit
7577 *
7578 * This will wait up to 0.100 seconds (100ms) by default.
7579 *
7580 * \returns StatusCode of the set command
7581 */
7586
7587 /**
7588 * \brief Clear sticky fault: Device supply voltage dropped to near
7589 * brownout levels
7590 *
7591 * \param timeoutSeconds Maximum time to wait up to in seconds.
7592 * \returns StatusCode of the set command
7593 */
7594 ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds) override
7595 {
7596 return GetConfigurator().ClearStickyFault_Undervoltage(timeoutSeconds);
7597 }
7598 /**
7599 * \brief Clear sticky fault: Device supply voltage dropped to near
7600 * brownout levels
7601 *
7602 * This will wait up to 0.100 seconds (100ms) by default.
7603 *
7604 * \returns StatusCode of the set command
7605 */
7610
7611 /**
7612 * \brief Clear sticky fault: Device boot while detecting the enable
7613 * signal
7614 *
7615 * \param timeoutSeconds Maximum time to wait up to in seconds.
7616 * \returns StatusCode of the set command
7617 */
7618 ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable(units::time::second_t timeoutSeconds) override
7619 {
7620 return GetConfigurator().ClearStickyFault_BootDuringEnable(timeoutSeconds);
7621 }
7622 /**
7623 * \brief Clear sticky fault: Device boot while detecting the enable
7624 * signal
7625 *
7626 * This will wait up to 0.100 seconds (100ms) by default.
7627 *
7628 * \returns StatusCode of the set command
7629 */
7634
7635 /**
7636 * \brief Clear sticky fault: An unlicensed feature is in use, device
7637 * may not behave as expected.
7638 *
7639 * \param timeoutSeconds Maximum time to wait up to in seconds.
7640 * \returns StatusCode of the set command
7641 */
7642 ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse(units::time::second_t timeoutSeconds) override
7643 {
7645 }
7646 /**
7647 * \brief Clear sticky fault: An unlicensed feature is in use, device
7648 * may not behave as expected.
7649 *
7650 * This will wait up to 0.100 seconds (100ms) by default.
7651 *
7652 * \returns StatusCode of the set command
7653 */
7658
7659 /**
7660 * \brief Clear sticky fault: Bridge was disabled most likely due to
7661 * supply voltage dropping too low.
7662 *
7663 * \param timeoutSeconds Maximum time to wait up to in seconds.
7664 * \returns StatusCode of the set command
7665 */
7666 ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout(units::time::second_t timeoutSeconds) override
7667 {
7668 return GetConfigurator().ClearStickyFault_BridgeBrownout(timeoutSeconds);
7669 }
7670 /**
7671 * \brief Clear sticky fault: Bridge was disabled most likely due to
7672 * supply voltage dropping too low.
7673 *
7674 * This will wait up to 0.100 seconds (100ms) by default.
7675 *
7676 * \returns StatusCode of the set command
7677 */
7682
7683 /**
7684 * \brief Clear sticky fault: The remote sensor has reset.
7685 *
7686 * \param timeoutSeconds Maximum time to wait up to in seconds.
7687 * \returns StatusCode of the set command
7688 */
7689 ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset(units::time::second_t timeoutSeconds) override
7690 {
7691 return GetConfigurator().ClearStickyFault_RemoteSensorReset(timeoutSeconds);
7692 }
7693 /**
7694 * \brief Clear sticky fault: The remote sensor has reset.
7695 *
7696 * This will wait up to 0.100 seconds (100ms) by default.
7697 *
7698 * \returns StatusCode of the set command
7699 */
7704
7705 /**
7706 * \brief Clear sticky fault: The remote Talon used for differential
7707 * control is not present on CAN Bus.
7708 *
7709 * \param timeoutSeconds Maximum time to wait up to in seconds.
7710 * \returns StatusCode of the set command
7711 */
7712 ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX(units::time::second_t timeoutSeconds) override
7713 {
7715 }
7716 /**
7717 * \brief Clear sticky fault: The remote Talon used for differential
7718 * control is not present on CAN Bus.
7719 *
7720 * This will wait up to 0.100 seconds (100ms) by default.
7721 *
7722 * \returns StatusCode of the set command
7723 */
7728
7729 /**
7730 * \brief Clear sticky fault: The remote sensor position has
7731 * overflowed. Because of the nature of remote sensors, it is possible
7732 * for the remote sensor position to overflow beyond what is supported
7733 * by the status signal frame. However, this is rare and cannot occur
7734 * over the course of an FRC match under normal use.
7735 *
7736 * \param timeoutSeconds Maximum time to wait up to in seconds.
7737 * \returns StatusCode of the set command
7738 */
7739 ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow(units::time::second_t timeoutSeconds) override
7740 {
7742 }
7743 /**
7744 * \brief Clear sticky fault: The remote sensor position has
7745 * overflowed. Because of the nature of remote sensors, it is possible
7746 * for the remote sensor position to overflow beyond what is supported
7747 * by the status signal frame. However, this is rare and cannot occur
7748 * over the course of an FRC match under normal use.
7749 *
7750 * This will wait up to 0.100 seconds (100ms) by default.
7751 *
7752 * \returns StatusCode of the set command
7753 */
7758
7759 /**
7760 * \brief Clear sticky fault: Supply Voltage has exceeded the maximum
7761 * voltage rating of device.
7762 *
7763 * \param timeoutSeconds Maximum time to wait up to in seconds.
7764 * \returns StatusCode of the set command
7765 */
7766 ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV(units::time::second_t timeoutSeconds) override
7767 {
7768 return GetConfigurator().ClearStickyFault_OverSupplyV(timeoutSeconds);
7769 }
7770 /**
7771 * \brief Clear sticky fault: Supply Voltage has exceeded the maximum
7772 * voltage rating of device.
7773 *
7774 * This will wait up to 0.100 seconds (100ms) by default.
7775 *
7776 * \returns StatusCode of the set command
7777 */
7782
7783 /**
7784 * \brief Clear sticky fault: Supply Voltage is unstable. Ensure you
7785 * are using a battery and current limited power supply.
7786 *
7787 * \param timeoutSeconds Maximum time to wait up to in seconds.
7788 * \returns StatusCode of the set command
7789 */
7790 ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV(units::time::second_t timeoutSeconds) override
7791 {
7792 return GetConfigurator().ClearStickyFault_UnstableSupplyV(timeoutSeconds);
7793 }
7794 /**
7795 * \brief Clear sticky fault: Supply Voltage is unstable. Ensure you
7796 * are using a battery and current limited power supply.
7797 *
7798 * This will wait up to 0.100 seconds (100ms) by default.
7799 *
7800 * \returns StatusCode of the set command
7801 */
7806
7807 /**
7808 * \brief Clear sticky fault: Reverse limit switch has been asserted.
7809 * Output is set to neutral.
7810 *
7811 * \param timeoutSeconds Maximum time to wait up to in seconds.
7812 * \returns StatusCode of the set command
7813 */
7814 ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit(units::time::second_t timeoutSeconds) override
7815 {
7816 return GetConfigurator().ClearStickyFault_ReverseHardLimit(timeoutSeconds);
7817 }
7818 /**
7819 * \brief Clear sticky fault: Reverse limit switch has been asserted.
7820 * Output is set to neutral.
7821 *
7822 * This will wait up to 0.100 seconds (100ms) by default.
7823 *
7824 * \returns StatusCode of the set command
7825 */
7830
7831 /**
7832 * \brief Clear sticky fault: Forward limit switch has been asserted.
7833 * Output is set to neutral.
7834 *
7835 * \param timeoutSeconds Maximum time to wait up to in seconds.
7836 * \returns StatusCode of the set command
7837 */
7838 ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit(units::time::second_t timeoutSeconds) override
7839 {
7840 return GetConfigurator().ClearStickyFault_ForwardHardLimit(timeoutSeconds);
7841 }
7842 /**
7843 * \brief Clear sticky fault: Forward limit switch has been asserted.
7844 * Output is set to neutral.
7845 *
7846 * This will wait up to 0.100 seconds (100ms) by default.
7847 *
7848 * \returns StatusCode of the set command
7849 */
7854
7855 /**
7856 * \brief Clear sticky fault: Reverse soft limit has been asserted.
7857 * Output is set to neutral.
7858 *
7859 * \param timeoutSeconds Maximum time to wait up to in seconds.
7860 * \returns StatusCode of the set command
7861 */
7862 ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit(units::time::second_t timeoutSeconds) override
7863 {
7864 return GetConfigurator().ClearStickyFault_ReverseSoftLimit(timeoutSeconds);
7865 }
7866 /**
7867 * \brief Clear sticky fault: Reverse soft limit has been asserted.
7868 * Output is set to neutral.
7869 *
7870 * This will wait up to 0.100 seconds (100ms) by default.
7871 *
7872 * \returns StatusCode of the set command
7873 */
7878
7879 /**
7880 * \brief Clear sticky fault: Forward soft limit has been asserted.
7881 * Output is set to neutral.
7882 *
7883 * \param timeoutSeconds Maximum time to wait up to in seconds.
7884 * \returns StatusCode of the set command
7885 */
7886 ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit(units::time::second_t timeoutSeconds) override
7887 {
7888 return GetConfigurator().ClearStickyFault_ForwardSoftLimit(timeoutSeconds);
7889 }
7890 /**
7891 * \brief Clear sticky fault: Forward soft limit has been asserted.
7892 * Output is set to neutral.
7893 *
7894 * This will wait up to 0.100 seconds (100ms) by default.
7895 *
7896 * \returns StatusCode of the set command
7897 */
7902
7903 /**
7904 * \brief Clear sticky fault: The remote soft limit device is not
7905 * present on CAN Bus.
7906 *
7907 * \param timeoutSeconds Maximum time to wait up to in seconds.
7908 * \returns StatusCode of the set command
7909 */
7910 ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote(units::time::second_t timeoutSeconds) override
7911 {
7913 }
7914 /**
7915 * \brief Clear sticky fault: The remote soft limit device is not
7916 * present on CAN Bus.
7917 *
7918 * This will wait up to 0.100 seconds (100ms) by default.
7919 *
7920 * \returns StatusCode of the set command
7921 */
7926
7927 /**
7928 * \brief Clear sticky fault: The remote limit switch device is not
7929 * present on CAN Bus.
7930 *
7931 * \param timeoutSeconds Maximum time to wait up to in seconds.
7932 * \returns StatusCode of the set command
7933 */
7934 ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote(units::time::second_t timeoutSeconds) override
7935 {
7937 }
7938 /**
7939 * \brief Clear sticky fault: The remote limit switch device is not
7940 * present on CAN Bus.
7941 *
7942 * This will wait up to 0.100 seconds (100ms) by default.
7943 *
7944 * \returns StatusCode of the set command
7945 */
7950
7951 /**
7952 * \brief Clear sticky fault: The remote sensor's data is no longer
7953 * trusted. This can happen if the remote sensor disappears from the
7954 * CAN bus or if the remote sensor indicates its data is no longer
7955 * valid, such as when a CANcoder's magnet strength falls into the
7956 * "red" range.
7957 *
7958 * \param timeoutSeconds Maximum time to wait up to in seconds.
7959 * \returns StatusCode of the set command
7960 */
7961 ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid(units::time::second_t timeoutSeconds) override
7962 {
7964 }
7965 /**
7966 * \brief Clear sticky fault: The remote sensor's data is no longer
7967 * trusted. This can happen if the remote sensor disappears from the
7968 * CAN bus or if the remote sensor indicates its data is no longer
7969 * valid, such as when a CANcoder's magnet strength falls into the
7970 * "red" range.
7971 *
7972 * This will wait up to 0.100 seconds (100ms) by default.
7973 *
7974 * \returns StatusCode of the set command
7975 */
7980
7981 /**
7982 * \brief Clear sticky fault: The remote sensor used for fusion has
7983 * fallen out of sync to the local sensor. A re-synchronization has
7984 * occurred, which may cause a discontinuity. This typically happens
7985 * if there is significant slop in the mechanism, or if the
7986 * RotorToSensorRatio configuration parameter is incorrect.
7987 *
7988 * \param timeoutSeconds Maximum time to wait up to in seconds.
7989 * \returns StatusCode of the set command
7990 */
7991 ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync(units::time::second_t timeoutSeconds) override
7992 {
7994 }
7995 /**
7996 * \brief Clear sticky fault: The remote sensor used for fusion has
7997 * fallen out of sync to the local sensor. A re-synchronization has
7998 * occurred, which may cause a discontinuity. This typically happens
7999 * if there is significant slop in the mechanism, or if the
8000 * RotorToSensorRatio configuration parameter is incorrect.
8001 *
8002 * This will wait up to 0.100 seconds (100ms) by default.
8003 *
8004 * \returns StatusCode of the set command
8005 */
8010
8011 /**
8012 * \brief Clear sticky fault: Stator current limit occured.
8013 *
8014 * \param timeoutSeconds Maximum time to wait up to in seconds.
8015 * \returns StatusCode of the set command
8016 */
8017 ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit(units::time::second_t timeoutSeconds) override
8018 {
8019 return GetConfigurator().ClearStickyFault_StatorCurrLimit(timeoutSeconds);
8020 }
8021 /**
8022 * \brief Clear sticky fault: Stator current limit occured.
8023 *
8024 * This will wait up to 0.100 seconds (100ms) by default.
8025 *
8026 * \returns StatusCode of the set command
8027 */
8032
8033 /**
8034 * \brief Clear sticky fault: Supply current limit occured.
8035 *
8036 * \param timeoutSeconds Maximum time to wait up to in seconds.
8037 * \returns StatusCode of the set command
8038 */
8039 ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit(units::time::second_t timeoutSeconds) override
8040 {
8041 return GetConfigurator().ClearStickyFault_SupplyCurrLimit(timeoutSeconds);
8042 }
8043 /**
8044 * \brief Clear sticky fault: Supply current limit occured.
8045 *
8046 * This will wait up to 0.100 seconds (100ms) by default.
8047 *
8048 * \returns StatusCode of the set command
8049 */
8054
8055 /**
8056 * \brief Clear sticky fault: Using Fused CANcoder feature while
8057 * unlicensed. Device has fallen back to remote CANcoder.
8058 *
8059 * \param timeoutSeconds Maximum time to wait up to in seconds.
8060 * \returns StatusCode of the set command
8061 */
8063 {
8065 }
8066 /**
8067 * \brief Clear sticky fault: Using Fused CANcoder feature while
8068 * unlicensed. Device has fallen back to remote CANcoder.
8069 *
8070 * This will wait up to 0.100 seconds (100ms) by default.
8071 *
8072 * \returns StatusCode of the set command
8073 */
8078
8079 /**
8080 * \brief Clear sticky fault: Static brake was momentarily disabled
8081 * due to excessive braking current while disabled.
8082 *
8083 * \param timeoutSeconds Maximum time to wait up to in seconds.
8084 * \returns StatusCode of the set command
8085 */
8086 ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled(units::time::second_t timeoutSeconds) override
8087 {
8089 }
8090 /**
8091 * \brief Clear sticky fault: Static brake was momentarily disabled
8092 * due to excessive braking current while disabled.
8093 *
8094 * This will wait up to 0.100 seconds (100ms) by default.
8095 *
8096 * \returns StatusCode of the set command
8097 */
8102
8103 /**
8104 * \brief Clear sticky fault: Bridge was disabled most likely due to a
8105 * short in the motor leads.
8106 *
8107 * \param timeoutSeconds Maximum time to wait up to in seconds.
8108 * \returns StatusCode of the set command
8109 */
8110 ctre::phoenix::StatusCode ClearStickyFault_BridgeShort(units::time::second_t timeoutSeconds) override
8111 {
8112 return GetConfigurator().ClearStickyFault_BridgeShort(timeoutSeconds);
8113 }
8114 /**
8115 * \brief Clear sticky fault: Bridge was disabled most likely due to a
8116 * short in the motor leads.
8117 *
8118 * This will wait up to 0.100 seconds (100ms) by default.
8119 *
8120 * \returns StatusCode of the set command
8121 */
8126
8127 /**
8128 * \brief Clear sticky fault: Hall sensor signals are invalid. Check
8129 * hall sensor and cabling. This fault can be used to detect when
8130 * hall cable is unplugged.
8131 *
8132 * \param timeoutSeconds Maximum time to wait up to in seconds.
8133 * \returns StatusCode of the set command
8134 */
8135 ctre::phoenix::StatusCode ClearStickyFault_HallSensorMissing(units::time::second_t timeoutSeconds) override
8136 {
8137 return GetConfigurator().ClearStickyFault_HallSensorMissing(timeoutSeconds);
8138 }
8139 /**
8140 * \brief Clear sticky fault: Hall sensor signals are invalid. Check
8141 * hall sensor and cabling. This fault can be used to detect when
8142 * hall cable is unplugged.
8143 *
8144 * This will wait up to 0.100 seconds (100ms) by default.
8145 *
8146 * \returns StatusCode of the set command
8147 */
8152
8153 /**
8154 * \brief Clear sticky fault: Hall sensor signals are invalid during
8155 * motor drive, so motor was disabled. Check hall sensor and cabling.
8156 *
8157 * \param timeoutSeconds Maximum time to wait up to in seconds.
8158 * \returns StatusCode of the set command
8159 */
8160 ctre::phoenix::StatusCode ClearStickyFault_DriveDisabledHallSensor(units::time::second_t timeoutSeconds) override
8161 {
8163 }
8164 /**
8165 * \brief Clear sticky fault: Hall sensor signals are invalid during
8166 * motor drive, so motor was disabled. Check hall sensor and cabling.
8167 *
8168 * This will wait up to 0.100 seconds (100ms) by default.
8169 *
8170 * \returns StatusCode of the set command
8171 */
8176
8177 /**
8178 * \brief Clear sticky fault: Motor temperature signal appears to not
8179 * be connected.
8180 *
8181 * \param timeoutSeconds Maximum time to wait up to in seconds.
8182 * \returns StatusCode of the set command
8183 */
8184 ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorMissing(units::time::second_t timeoutSeconds) override
8185 {
8187 }
8188 /**
8189 * \brief Clear sticky fault: Motor temperature signal appears to not
8190 * be connected.
8191 *
8192 * This will wait up to 0.100 seconds (100ms) by default.
8193 *
8194 * \returns StatusCode of the set command
8195 */
8200
8201 /**
8202 * \brief Clear sticky fault: Motor temperature signal indicates motor
8203 * is too hot.
8204 *
8205 * \param timeoutSeconds Maximum time to wait up to in seconds.
8206 * \returns StatusCode of the set command
8207 */
8208 ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorTooHot(units::time::second_t timeoutSeconds) override
8209 {
8211 }
8212 /**
8213 * \brief Clear sticky fault: Motor temperature signal indicates motor
8214 * is too hot.
8215 *
8216 * This will wait up to 0.100 seconds (100ms) by default.
8217 *
8218 * \returns StatusCode of the set command
8219 */
8224};
8225
8226}
8227}
8228
8229}
8230}
8231
ii that the Software will be uninterrupted or error free
Definition CTRE_LICENSE.txt:251
CTREXPORT int c_ctre_phoenix6_serialize_double(int spn, double value, char **str)
Class for getting information about an available CAN bus.
Definition CANBus.hpp:19
Represents a status signal with data of type T, and operations available to retrieve information abou...
Definition StatusSignal.hpp:656
Configs that affect audible components of the device.
Definition Configs.hpp:3989
std::string Serialize() const override
Definition Configs.hpp:4094
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:4104
std::string ToString() const override
Definition Configs.hpp:4084
Configs that affect general behavior during closed-looping.
Definition Configs.hpp:4648
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:4708
std::string ToString() const override
Definition Configs.hpp:4692
std::string Serialize() const override
Definition Configs.hpp:4700
Configs that affect the closed-loop control of this motor controller.
Definition Configs.hpp:3220
std::string Serialize() const override
Definition Configs.hpp:3378
std::string ToString() const override
Definition Configs.hpp:3368
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:3388
Configs that determine motor selection and commutation.
Definition Configs.hpp:5206
std::string ToString() const override
Definition Configs.hpp:5300
std::string Serialize() const override
Definition Configs.hpp:5310
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:5320
Configs that directly affect current limiting features.
Definition Configs.hpp:888
std::string Serialize() const override
Definition Configs.hpp:1149
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:1162
std::string ToString() const override
Definition Configs.hpp:1136
Custom Params.
Definition Configs.hpp:4544
std::string ToString() const override
Definition Configs.hpp:4613
std::string Serialize() const override
Definition Configs.hpp:4622
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:4631
Configs related to constants used for differential control of a mechanism.
Definition Configs.hpp:2908
std::string Serialize() const override
Definition Configs.hpp:3018
std::string ToString() const override
Definition Configs.hpp:3008
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:3028
Configs related to sensors used for differential control of a mechanism.
Definition Configs.hpp:2729
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:2889
std::string Serialize() const override
Definition Configs.hpp:2879
std::string ToString() const override
Definition Configs.hpp:2869
Configs that affect the external feedback sensor of this motor controller.
Definition Configs.hpp:2005
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:2694
std::string ToString() const override
Definition Configs.hpp:2662
std::string Serialize() const override
Definition Configs.hpp:2678
Configs that change how the motor controller behaves under different limit switch states.
Definition Configs.hpp:3415
std::string ToString() const override
Definition Configs.hpp:3920
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:3958
std::string Serialize() const override
Definition Configs.hpp:3939
Configs for Motion Magic®.
Definition Configs.hpp:4288
std::string Serialize() const override
Definition Configs.hpp:4502
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:4514
std::string ToString() const override
Definition Configs.hpp:4490
Configs that directly affect motor output.
Definition Configs.hpp:647
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:858
std::string ToString() const override
Definition Configs.hpp:832
std::string Serialize() const override
Definition Configs.hpp:845
Configs that affect the open-loop control of this motor controller.
Definition Configs.hpp:3053
std::string Serialize() const override
Definition Configs.hpp:3185
std::string ToString() const override
Definition Configs.hpp:3175
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:3195
Definition Configurator.hpp:22
ctre::phoenix::StatusCode SetConfigsPrivate(const std::string &serializedString, units::time::second_t timeoutSeconds, bool futureProofConfigs, bool overrideIfDuplicate)
Definition Configurator.hpp:77
ctre::phoenix::StatusCode GetConfigsPrivate(std::string &serializedString, units::time::second_t timeoutSeconds) const
Definition Configurator.hpp:101
units::time::second_t DefaultTimeoutSeconds
The default maximum amount of time to wait for a config.
Definition Configurator.hpp:27
Gains for the specified slot.
Definition Configs.hpp:5997
std::string ToString() const override
Definition Configs.hpp:6421
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:6453
std::string Serialize() const override
Definition Configs.hpp:6437
Gains for the specified slot.
Definition Configs.hpp:6492
std::string Serialize() const override
Definition Configs.hpp:6932
std::string ToString() const override
Definition Configs.hpp:6916
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:6948
Gains for the specified slot.
Definition Configs.hpp:6987
std::string Serialize() const override
Definition Configs.hpp:7427
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:7443
std::string ToString() const override
Definition Configs.hpp:7411
Gains for the specified slot.
Definition Configs.hpp:7481
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize)
Definition Configs.hpp:7998
std::string Serialize() const
Definition Configs.hpp:7981
Configs that affect how software-limit switches behave.
Definition Configs.hpp:4123
std::string ToString() const override
Definition Configs.hpp:4242
std::string Serialize() const override
Definition Configs.hpp:4253
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:4264
Class description for the Talon FXS motor controller.
Definition CoreTalonFXS.hpp:86
OpenLoopRampsConfigs OpenLoopRamps
Configs that affect the open-loop control of this motor controller.
Definition CoreTalonFXS.hpp:163
constexpr TalonFXSConfiguration & WithMotorOutput(MotorOutputConfigs newMotorOutput)
Modifies this configuration's MotorOutput parameter and returns itself for method-chaining and easier...
Definition CoreTalonFXS.hpp:264
MotorOutputConfigs MotorOutput
Configs that directly affect motor output.
Definition CoreTalonFXS.hpp:112
std::string Serialize() const
Get the serialized form of this configuration.
Definition CoreTalonFXS.hpp:608
constexpr TalonFXSConfiguration & WithClosedLoopGeneral(ClosedLoopGeneralConfigs newClosedLoopGeneral)
Modifies this configuration's ClosedLoopGeneral parameter and returns itself for method-chaining and ...
Definition CoreTalonFXS.hpp:499
constexpr TalonFXSConfiguration & WithOpenLoopRamps(OpenLoopRampsConfigs newOpenLoopRamps)
Modifies this configuration's OpenLoopRamps parameter and returns itself for method-chaining and easi...
Definition CoreTalonFXS.hpp:374
constexpr TalonFXSConfiguration & WithMotionMagic(MotionMagicConfigs newMotionMagic)
Modifies this configuration's MotionMagic parameter and returns itself for method-chaining and easier...
Definition CoreTalonFXS.hpp:465
constexpr TalonFXSConfiguration & WithDifferentialConstants(DifferentialConstantsConfigs newDifferentialConstants)
Modifies this configuration's DifferentialConstants parameter and returns itself for method-chaining ...
Definition CoreTalonFXS.hpp:357
ExternalFeedbackConfigs ExternalFeedback
Configs that affect the external feedback sensor of this motor controller.
Definition CoreTalonFXS.hpp:139
CommutationConfigs Commutation
Configs that determine motor selection and commutation.
Definition CoreTalonFXS.hpp:226
constexpr TalonFXSConfiguration & WithCommutation(CommutationConfigs newCommutation)
Modifies this configuration's Commutation parameter and returns itself for method-chaining and easier...
Definition CoreTalonFXS.hpp:517
constexpr TalonFXSConfiguration & WithHardwareLimitSwitch(HardwareLimitSwitchConfigs newHardwareLimitSwitch)
Modifies this configuration's HardwareLimitSwitch parameter and returns itself for method-chaining an...
Definition CoreTalonFXS.hpp:412
constexpr TalonFXSConfiguration & WithSlot0(Slot0Configs newSlot0)
Modifies this configuration's Slot0 parameter and returns itself for method-chaining and easier to us...
Definition CoreTalonFXS.hpp:535
ClosedLoopRampsConfigs ClosedLoopRamps
Configs that affect the closed-loop control of this motor controller.
Definition CoreTalonFXS.hpp:171
constexpr TalonFXSConfiguration & WithDifferentialSensors(DifferentialSensorsConfigs newDifferentialSensors)
Modifies this configuration's DifferentialSensors parameter and returns itself for method-chaining an...
Definition CoreTalonFXS.hpp:339
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize)
Take a string and deserialize it to this configuration.
Definition CoreTalonFXS.hpp:635
SoftwareLimitSwitchConfigs SoftwareLimitSwitch
Configs that affect how software-limit switches behave.
Definition CoreTalonFXS.hpp:196
constexpr TalonFXSConfiguration & WithSoftwareLimitSwitch(SoftwareLimitSwitchConfigs newSoftwareLimitSwitch)
Modifies this configuration's SoftwareLimitSwitch parameter and returns itself for method-chaining an...
Definition CoreTalonFXS.hpp:447
constexpr TalonFXSConfiguration & WithAudio(AudioConfigs newAudio)
Modifies this configuration's Audio parameter and returns itself for method-chaining and easier to us...
Definition CoreTalonFXS.hpp:429
constexpr TalonFXSConfiguration & WithCustomParams(CustomParamsConfigs newCustomParams)
Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easie...
Definition CoreTalonFXS.hpp:482
MotionMagicConfigs MotionMagic
Configs for Motion Magic®.
Definition CoreTalonFXS.hpp:204
ClosedLoopGeneralConfigs ClosedLoopGeneral
Configs that affect general behavior during closed-looping.
Definition CoreTalonFXS.hpp:218
constexpr TalonFXSConfiguration & WithExternalFeedback(ExternalFeedbackConfigs newExternalFeedback)
Modifies this configuration's ExternalFeedback parameter and returns itself for method-chaining and e...
Definition CoreTalonFXS.hpp:321
constexpr TalonFXSConfiguration & WithVoltage(VoltageConfigs newVoltage)
Modifies this configuration's Voltage parameter and returns itself for method-chaining and easier to ...
Definition CoreTalonFXS.hpp:300
constexpr TalonFXSConfiguration & WithSlot2(Slot2Configs newSlot2)
Modifies this configuration's Slot2 parameter and returns itself for method-chaining and easier to us...
Definition CoreTalonFXS.hpp:571
HardwareLimitSwitchConfigs HardwareLimitSwitch
Configs that change how the motor controller behaves under different limit switch states.
Definition CoreTalonFXS.hpp:181
std::string ToString() const
Get the string representation of this configuration.
Definition CoreTalonFXS.hpp:580
AudioConfigs Audio
Configs that affect audible components of the device.
Definition CoreTalonFXS.hpp:188
bool FutureProofConfigs
True if we should factory default newer unsupported configs, false to leave newer unsupported configs...
Definition CoreTalonFXS.hpp:103
CurrentLimitsConfigs CurrentLimits
Configs that directly affect current limiting features.
Definition CoreTalonFXS.hpp:120
CustomParamsConfigs CustomParams
Custom Params.
Definition CoreTalonFXS.hpp:211
Slot1Configs Slot1
Gains for the specified slot.
Definition CoreTalonFXS.hpp:242
Slot2Configs Slot2
Gains for the specified slot.
Definition CoreTalonFXS.hpp:250
VoltageConfigs Voltage
Configs that affect Voltage control types.
Definition CoreTalonFXS.hpp:128
constexpr TalonFXSConfiguration & WithClosedLoopRamps(ClosedLoopRampsConfigs newClosedLoopRamps)
Modifies this configuration's ClosedLoopRamps parameter and returns itself for method-chaining and ea...
Definition CoreTalonFXS.hpp:392
Slot0Configs Slot0
Gains for the specified slot.
Definition CoreTalonFXS.hpp:234
constexpr TalonFXSConfiguration & WithSlot1(Slot1Configs newSlot1)
Modifies this configuration's Slot1 parameter and returns itself for method-chaining and easier to us...
Definition CoreTalonFXS.hpp:553
DifferentialSensorsConfigs DifferentialSensors
Configs related to sensors used for differential control of a mechanism.
Definition CoreTalonFXS.hpp:147
constexpr TalonFXSConfiguration & WithCurrentLimits(CurrentLimitsConfigs newCurrentLimits)
Modifies this configuration's CurrentLimits parameter and returns itself for method-chaining and easi...
Definition CoreTalonFXS.hpp:282
DifferentialConstantsConfigs DifferentialConstants
Configs related to constants used for differential control of a mechanism.
Definition CoreTalonFXS.hpp:155
Class description for the Talon FXS motor controller.
Definition CoreTalonFXS.hpp:666
ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout()
Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low.
Definition CoreTalonFXS.hpp:2206
ctre::phoenix::StatusCode Apply(const VoltageConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:898
ctre::phoenix::StatusCode ClearStickyFaults()
Clear the sticky faults in the device.
Definition CoreTalonFXS.hpp:1936
ctre::phoenix::StatusCode ClearStickyFault_HallSensorMissing(units::time::second_t timeoutSeconds)
Clear sticky fault: Hall sensor signals are invalid.
Definition CoreTalonFXS.hpp:2978
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds)
Clear sticky fault: Device supply voltage dropped to near brownout levels.
Definition CoreTalonFXS.hpp:2106
ctre::phoenix::StatusCode Apply(const SlotConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1872
ctre::phoenix::StatusCode ClearStickyFault_Hardware()
Clear sticky fault: Hardware fault occurred.
Definition CoreTalonFXS.hpp:1977
ctre::phoenix::StatusCode Refresh(CurrentLimitsConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:820
ctre::phoenix::StatusCode Refresh(HardwareLimitSwitchConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1227
ctre::phoenix::StatusCode Refresh(HardwareLimitSwitchConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1240
ctre::phoenix::StatusCode Refresh(SlotConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1827
ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit(units::time::second_t timeoutSeconds)
Clear sticky fault: Forward soft limit has been asserted.
Definition CoreTalonFXS.hpp:2578
ctre::phoenix::StatusCode Refresh(DifferentialSensorsConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1000
ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote()
Clear sticky fault: The remote limit switch device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:2639
ctre::phoenix::StatusCode Refresh(ExternalFeedbackConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:940
ctre::phoenix::StatusCode Refresh(CustomParamsConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1467
ctre::phoenix::StatusCode Refresh(TalonFXSConfiguration &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:685
ctre::phoenix::StatusCode ClearStickyFault_ProcTemp(units::time::second_t timeoutSeconds)
Clear sticky fault: Processor temperature exceeded limit.
Definition CoreTalonFXS.hpp:2030
ctre::phoenix::StatusCode Apply(const ClosedLoopGeneralConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1558
ctre::phoenix::StatusCode Refresh(MotorOutputConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:760
ctre::phoenix::StatusCode Apply(const MotionMagicConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1438
ctre::phoenix::StatusCode ClearStickyFault_ProcTemp()
Clear sticky fault: Processor temperature exceeded limit.
Definition CoreTalonFXS.hpp:2014
ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled(units::time::second_t timeoutSeconds)
Clear sticky fault: Static brake was momentarily disabled due to excessive braking current while disa...
Definition CoreTalonFXS.hpp:2898
ctre::phoenix::StatusCode Refresh(Slot0Configs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1660
ctre::phoenix::StatusCode Apply(const VoltageConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:912
ctre::phoenix::StatusCode Apply(const DifferentialConstantsConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1078
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorMissing(units::time::second_t timeoutSeconds)
Clear sticky fault: Motor temperature signal appears to not be connected.
Definition CoreTalonFXS.hpp:3056
ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV(units::time::second_t timeoutSeconds)
Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device.
Definition CoreTalonFXS.hpp:2383
ctre::phoenix::StatusCode Refresh(ClosedLoopGeneralConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1540
ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled()
Clear sticky fault: Static brake was momentarily disabled due to excessive braking current while disa...
Definition CoreTalonFXS.hpp:2881
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset(units::time::second_t timeoutSeconds)
Clear sticky fault: The remote sensor has reset.
Definition CoreTalonFXS.hpp:2260
ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit()
Clear sticky fault: Reverse limit switch has been asserted.
Definition CoreTalonFXS.hpp:2444
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse(units::time::second_t timeoutSeconds)
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
Definition CoreTalonFXS.hpp:2184
ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit()
Clear sticky fault: Forward soft limit has been asserted.
Definition CoreTalonFXS.hpp:2561
ctre::phoenix::StatusCode Refresh(MotionMagicConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1420
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow()
Clear sticky fault: The remote sensor position has overflowed.
Definition CoreTalonFXS.hpp:2324
ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue)
Sets the mechanism position of the device in mechanism rotations.
Definition CoreTalonFXS.hpp:1893
ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync()
Clear sticky fault: The remote sensor used for fusion has fallen out of sync to the local sensor.
Definition CoreTalonFXS.hpp:2726
ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit(units::time::second_t timeoutSeconds)
Clear sticky fault: Forward limit switch has been asserted.
Definition CoreTalonFXS.hpp:2500
ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit(units::time::second_t timeoutSeconds)
Clear sticky fault: Reverse soft limit has been asserted.
Definition CoreTalonFXS.hpp:2539
ctre::phoenix::StatusCode Apply(const AudioConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1332
ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV()
Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device.
Definition CoreTalonFXS.hpp:2366
ctre::phoenix::StatusCode Apply(const SoftwareLimitSwitchConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1392
ctre::phoenix::StatusCode Apply(const HardwareLimitSwitchConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1272
ctre::phoenix::StatusCode ClearStickyFault_BridgeShort(units::time::second_t timeoutSeconds)
Clear sticky fault: Bridge was disabled most likely due to a short in the motor leads.
Definition CoreTalonFXS.hpp:2937
ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit()
Clear sticky fault: Reverse soft limit has been asserted.
Definition CoreTalonFXS.hpp:2522
ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout(units::time::second_t timeoutSeconds)
Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low.
Definition CoreTalonFXS.hpp:2223
ctre::phoenix::StatusCode Apply(const HardwareLimitSwitchConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1258
ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit()
Clear sticky fault: Supply current limit occured.
Definition CoreTalonFXS.hpp:2804
ctre::phoenix::StatusCode Refresh(MotionMagicConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1407
ctre::phoenix::StatusCode Refresh(Slot2Configs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1780
ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds)
Sets the mechanism position of the device in mechanism rotations.
Definition CoreTalonFXS.hpp:1911
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage()
Clear sticky fault: Device supply voltage dropped to near brownout levels.
Definition CoreTalonFXS.hpp:2089
ctre::phoenix::StatusCode Refresh(DifferentialConstantsConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1060
ctre::phoenix::StatusCode Apply(const OpenLoopRampsConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1152
ctre::phoenix::StatusCode Apply(const ExternalFeedbackConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:958
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorTooHot()
Clear sticky fault: Motor temperature signal indicates motor is too hot.
Definition CoreTalonFXS.hpp:3078
ctre::phoenix::StatusCode ClearStickyFault_HallSensorMissing()
Clear sticky fault: Hall sensor signals are invalid.
Definition CoreTalonFXS.hpp:2960
ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed(units::time::second_t timeoutSeconds)
Clear sticky fault: Using Fused CANcoder feature while unlicensed.
Definition CoreTalonFXS.hpp:2859
ctre::phoenix::StatusCode Refresh(Slot0Configs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1647
ctre::phoenix::StatusCode Apply(const CurrentLimitsConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:852
ctre::phoenix::StatusCode Apply(const MotorOutputConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:792
ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote()
Clear sticky fault: The remote soft limit device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:2600
ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit(units::time::second_t timeoutSeconds)
Clear sticky fault: Stator current limit occured.
Definition CoreTalonFXS.hpp:2783
ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed()
Clear sticky fault: Using Fused CANcoder feature while unlicensed.
Definition CoreTalonFXS.hpp:2842
ctre::phoenix::StatusCode Refresh(DifferentialSensorsConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:987
ctre::phoenix::StatusCode Apply(const Slot1Configs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1752
ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit()
Clear sticky fault: Forward limit switch has been asserted.
Definition CoreTalonFXS.hpp:2483
ctre::phoenix::StatusCode Apply(const Slot0Configs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1678
ctre::phoenix::StatusCode Refresh(SoftwareLimitSwitchConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1347
ctre::phoenix::StatusCode Refresh(OpenLoopRampsConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1107
ctre::phoenix::StatusCode Apply(const Slot1Configs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1738
ctre::phoenix::StatusCode Apply(const Slot0Configs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1692
ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote(units::time::second_t timeoutSeconds)
Clear sticky fault: The remote limit switch device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:2656
ctre::phoenix::StatusCode ClearStickyFault_DriveDisabledHallSensor()
Clear sticky fault: Hall sensor signals are invalid during motor drive, so motor was disabled.
Definition CoreTalonFXS.hpp:3000
ctre::phoenix::StatusCode Refresh(SoftwareLimitSwitchConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1360
ctre::phoenix::StatusCode ClearStickyFault_DriveDisabledHallSensor(units::time::second_t timeoutSeconds)
Clear sticky fault: Hall sensor signals are invalid during motor drive, so motor was disabled.
Definition CoreTalonFXS.hpp:3017
ctre::phoenix::StatusCode Refresh(Slot1Configs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1720
ctre::phoenix::StatusCode Apply(const MotorOutputConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:778
ctre::phoenix::StatusCode Apply(const DifferentialSensorsConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1032
ctre::phoenix::StatusCode Refresh(AudioConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1287
ctre::phoenix::StatusCode Apply(const MotionMagicConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1452
ctre::phoenix::StatusCode Refresh(ClosedLoopRampsConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1180
ctre::phoenix::StatusCode Refresh(CustomParamsConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1480
ctre::phoenix::StatusCode Refresh(CommutationConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1600
ctre::phoenix::StatusCode Apply(const CurrentLimitsConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:838
ctre::phoenix::StatusCode Apply(const SlotConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1858
ctre::phoenix::StatusCode Apply(const DifferentialSensorsConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1018
ctre::phoenix::StatusCode Apply(const SoftwareLimitSwitchConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1378
ctre::phoenix::StatusCode Refresh(CommutationConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1587
ctre::phoenix::StatusCode Refresh(AudioConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1300
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse()
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
Definition CoreTalonFXS.hpp:2167
ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit()
Clear sticky fault: Stator current limit occured.
Definition CoreTalonFXS.hpp:2767
ctre::phoenix::StatusCode Apply(const Slot2Configs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1798
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp(units::time::second_t timeoutSeconds)
Clear sticky fault: Device temperature exceeded limit.
Definition CoreTalonFXS.hpp:2067
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid(units::time::second_t timeoutSeconds)
Clear sticky fault: The remote sensor's data is no longer trusted.
Definition CoreTalonFXS.hpp:2701
ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV()
Clear sticky fault: Supply Voltage is unstable.
Definition CoreTalonFXS.hpp:2405
ctre::phoenix::StatusCode Apply(const TalonFXSConfiguration &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:731
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable()
Clear sticky fault: Device boot while detecting the enable signal.
Definition CoreTalonFXS.hpp:2128
ctre::phoenix::StatusCode ClearStickyFault_BridgeShort()
Clear sticky fault: Bridge was disabled most likely due to a short in the motor leads.
Definition CoreTalonFXS.hpp:2920
ctre::phoenix::StatusCode Refresh(VoltageConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:880
ctre::phoenix::StatusCode Apply(const CommutationConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1618
ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX()
Clear sticky fault: The remote Talon used for differential control is not present on CAN Bus.
Definition CoreTalonFXS.hpp:2282
ctre::phoenix::StatusCode Apply(const CommutationConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1632
ctre::phoenix::StatusCode Apply(const CustomParamsConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1498
ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync(units::time::second_t timeoutSeconds)
Clear sticky fault: The remote sensor used for fusion has fallen out of sync to the local sensor.
Definition CoreTalonFXS.hpp:2746
ctre::phoenix::StatusCode Apply(const ClosedLoopRampsConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1198
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp()
Clear sticky fault: Device temperature exceeded limit.
Definition CoreTalonFXS.hpp:2051
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorTooHot(units::time::second_t timeoutSeconds)
Clear sticky fault: Motor temperature signal indicates motor is too hot.
Definition CoreTalonFXS.hpp:3095
ctre::phoenix::StatusCode Refresh(Slot1Configs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1707
ctre::phoenix::StatusCode Apply(const ClosedLoopGeneralConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1572
ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX(units::time::second_t timeoutSeconds)
Clear sticky fault: The remote Talon used for differential control is not present on CAN Bus.
Definition CoreTalonFXS.hpp:2299
ctre::phoenix::StatusCode Apply(const ExternalFeedbackConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:972
ctre::phoenix::StatusCode Apply(const OpenLoopRampsConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1138
ctre::phoenix::StatusCode Refresh(CurrentLimitsConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:807
ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit(units::time::second_t timeoutSeconds)
Clear sticky fault: Supply current limit occured.
Definition CoreTalonFXS.hpp:2820
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorMissing()
Clear sticky fault: Motor temperature signal appears to not be connected.
Definition CoreTalonFXS.hpp:3039
ctre::phoenix::StatusCode Refresh(SlotConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1840
ctre::phoenix::StatusCode Refresh(VoltageConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:867
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset()
Clear sticky fault: The remote sensor has reset.
Definition CoreTalonFXS.hpp:2244
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable(units::time::second_t timeoutSeconds)
Clear sticky fault: Device boot while detecting the enable signal.
Definition CoreTalonFXS.hpp:2145
ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV(units::time::second_t timeoutSeconds)
Clear sticky fault: Supply Voltage is unstable.
Definition CoreTalonFXS.hpp:2422
ctre::phoenix::StatusCode Apply(const ClosedLoopRampsConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1212
ctre::phoenix::StatusCode Refresh(ExternalFeedbackConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:927
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid()
Clear sticky fault: The remote sensor's data is no longer trusted.
Definition CoreTalonFXS.hpp:2681
ctre::phoenix::StatusCode Refresh(DifferentialConstantsConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1047
ctre::phoenix::StatusCode Refresh(ClosedLoopRampsConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1167
ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote(units::time::second_t timeoutSeconds)
Clear sticky fault: The remote soft limit device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:2617
ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit(units::time::second_t timeoutSeconds)
Clear sticky fault: Reverse limit switch has been asserted.
Definition CoreTalonFXS.hpp:2461
ctre::phoenix::StatusCode Refresh(OpenLoopRampsConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1120
ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds)
Clear sticky fault: Hardware fault occurred.
Definition CoreTalonFXS.hpp:1993
ctre::phoenix::StatusCode Apply(const AudioConfigs &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1318
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow(units::time::second_t timeoutSeconds)
Clear sticky fault: The remote sensor position has overflowed.
Definition CoreTalonFXS.hpp:2344
ctre::phoenix::StatusCode Apply(const DifferentialConstantsConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1092
ctre::phoenix::StatusCode Apply(const Slot2Configs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1812
ctre::phoenix::StatusCode Refresh(Slot2Configs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1767
ctre::phoenix::StatusCode Apply(const TalonFXSConfiguration &configs)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:717
ctre::phoenix::StatusCode Refresh(MotorOutputConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:747
ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds)
Clear the sticky faults in the device.
Definition CoreTalonFXS.hpp:1956
ctre::phoenix::StatusCode Apply(const CustomParamsConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CoreTalonFXS.hpp:1512
ctre::phoenix::StatusCode Refresh(TalonFXSConfiguration &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:699
ctre::phoenix::StatusCode Refresh(ClosedLoopGeneralConfigs &configs) const
Refreshes the values of the specified config group.
Definition CoreTalonFXS.hpp:1527
Configs that affect Voltage control types.
Definition Configs.hpp:1192
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:1316
std::string Serialize() const override
Definition Configs.hpp:1306
std::string ToString() const override
Definition Configs.hpp:1296
Request coast neutral output of actuator.
Definition CoastOut.hpp:26
Abstract Control Request class that other control requests extend for use.
Definition ControlRequest.hpp:30
Request a specified motor duty cycle with a differential position closed-loop.
Definition DifferentialDutyCycle.hpp:30
Follow the differential motor output of another Talon.
Definition DifferentialFollower.hpp:29
Requests Motion Magic® to target a final position using a motion profile, and PID to a differential p...
Definition DifferentialMotionMagicDutyCycle.hpp:34
Requests Motion Magic® to target a final position using a motion profile, and PID to a differential p...
Definition DifferentialMotionMagicVoltage.hpp:33
Request PID to target position with a differential position setpoint.
Definition DifferentialPositionDutyCycle.hpp:28
Request PID to target position with a differential position setpoint.
Definition DifferentialPositionVoltage.hpp:28
Follow the differential motor output of another Talon while ignoring the master's invert setting.
Definition DifferentialStrictFollower.hpp:31
Request PID to target velocity with a differential position setpoint.
Definition DifferentialVelocityDutyCycle.hpp:29
Request PID to target velocity with a differential position setpoint.
Definition DifferentialVelocityVoltage.hpp:29
Request a specified voltage with a differential position closed-loop.
Definition DifferentialVoltage.hpp:30
Request a specified motor duty cycle.
Definition DutyCycleOut.hpp:27
Requires Phoenix Pro and CANivore; Requests Motion Magic® to target a final position using a motion p...
Definition DynamicMotionMagicDutyCycle.hpp:41
Requires Phoenix Pro and CANivore; Requests Motion Magic® to target a final position using a motion p...
Definition DynamicMotionMagicVoltage.hpp:40
Follow the motor output of another Talon.
Definition Follower.hpp:29
Requests Motion Magic® to target a final position using a motion profile.
Definition MotionMagicDutyCycle.hpp:35
Requests Motion Magic® to target a final position using an exponential motion profile.
Definition MotionMagicExpoDutyCycle.hpp:38
Requests Motion Magic® to target a final position using an exponential motion profile.
Definition MotionMagicExpoVoltage.hpp:37
Requests Motion Magic® to target a final velocity using a motion profile.
Definition MotionMagicVelocityDutyCycle.hpp:42
Requests Motion Magic® to target a final velocity using a motion profile.
Definition MotionMagicVelocityVoltage.hpp:41
Requests Motion Magic® to target a final position using a motion profile.
Definition MotionMagicVoltage.hpp:34
Request neutral output of actuator.
Definition NeutralOut.hpp:26
Request PID to target position with duty cycle feedforward.
Definition PositionDutyCycle.hpp:30
Request PID to target position with voltage feedforward.
Definition PositionVoltage.hpp:30
Applies full neutral-brake by shorting motor leads together.
Definition StaticBrake.hpp:25
Follow the motor output of another Talon while ignoring the master's invert setting.
Definition StrictFollower.hpp:31
Request PID to target velocity with duty cycle feedforward.
Definition VelocityDutyCycle.hpp:30
Request PID to target velocity with voltage feedforward.
Definition VelocityVoltage.hpp:30
Request a specified voltage.
Definition VoltageOut.hpp:28
Definition DeviceIdentifier.hpp:19
Parent class for all devices.
Definition ParentDevice.hpp:28
Class description for the Talon FXS motor controller.
Definition CoreTalonFXS.hpp:3113
StatusSignal< bool > & GetStickyFault_Undervoltage(bool refresh=true) override
Device supply voltage dropped to near brownout levels.
StatusSignal< double > & GetDifferentialClosedLoopProportionalOutput(bool refresh=true) override
Differential closed loop proportional component.
StatusSignal< bool > & GetStickyFault_BridgeShort(bool refresh=true) override
Bridge was disabled most likely due to a short in the motor leads.
ctre::phoenix::StatusCode SetControl(const controls::MotionMagicVelocityVoltage &request) override
Requests Motion Magic® to target a final velocity using a motion profile.
ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote(units::time::second_t timeoutSeconds) override
Clear sticky fault: The remote limit switch device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:7934
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse() override
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
Definition CoreTalonFXS.hpp:7654
StatusSignal< bool > & GetStickyFault_UnstableSupplyV(bool refresh=true) override
Supply Voltage is unstable.
StatusSignal< double > & GetClosedLoopDerivativeOutput(bool refresh=true) override
Closed loop derivative component.
StatusSignal< bool > & GetStickyFault_StaticBrakeDisabled(bool refresh=true) override
Static brake was momentarily disabled due to excessive braking current while disabled.
StatusSignal< bool > & GetStickyFault_RemoteSensorPosOverflow(bool refresh=true) override
The remote sensor position has overflowed.
ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit() override
Clear sticky fault: Forward limit switch has been asserted.
Definition CoreTalonFXS.hpp:7850
ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds) override
Clear the sticky faults in the device.
Definition CoreTalonFXS.hpp:7501
StatusSignal< bool > & GetStickyFault_HallSensorMissing(bool refresh=true) override
Hall sensor signals are invalid.
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityDutyCycle_Velocity &request) override
Differential control with velocity average target and velocity difference target using dutycycle cont...
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionVoltage_Position &request) override
Differential control with position average target and position difference target using voltage contro...
ctre::phoenix::StatusCode ClearStickyFault_DriveDisabledHallSensor() override
Clear sticky fault: Hall sensor signals are invalid during motor drive, so motor was disabled.
Definition CoreTalonFXS.hpp:8172
StatusSignal< units::angular_velocity::turns_per_second_t > & GetRawPulseWidthVelocity(bool refresh=true) override
The raw velocity retrieved from the connected pulse-width encoder.
StatusSignal< bool > & GetStickyFault_SupplyCurrLimit(bool refresh=true) override
Supply current limit occured.
StatusSignal< signals::MotorOutputStatusValue > & GetMotorOutputStatus(bool refresh=true) override
Assess the status of the motor output with respect to load and supply.
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp() override
Clear sticky fault: Device temperature exceeded limit.
Definition CoreTalonFXS.hpp:7582
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorMissing() override
Clear sticky fault: Motor temperature signal appears to not be connected.
Definition CoreTalonFXS.hpp:8196
StatusSignal< bool > & GetFault_RemoteSensorPosOverflow(bool refresh=true) override
The remote sensor position has overflowed.
ctre::phoenix::StatusCode ClearStickyFault_BridgeShort(units::time::second_t timeoutSeconds) override
Clear sticky fault: Bridge was disabled most likely due to a short in the motor leads.
Definition CoreTalonFXS.hpp:8110
ctre::phoenix::StatusCode SetControl(const controls::ControlRequest &request) override
Control device with generic control request object.
Definition CoreTalonFXS.hpp:7322
StatusSignal< int > & GetVersion(bool refresh=true) override
Full Version of firmware in device.
ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote(units::time::second_t timeoutSeconds) override
Clear sticky fault: The remote soft limit device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:7910
configs::TalonFXSConfigurator const & GetConfigurator() const
Gets the configurator for this TalonFXS.
Definition CoreTalonFXS.hpp:3165
ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit(units::time::second_t timeoutSeconds) override
Clear sticky fault: Supply current limit occured.
Definition CoreTalonFXS.hpp:8039
StatusSignal< double > & GetDifferentialClosedLoopDerivativeOutput(bool refresh=true) override
Differential closed loop derivative component.
StatusSignal< bool > & GetFault_BootDuringEnable(bool refresh=true) override
Device boot while detecting the enable signal.
StatusSignal< units::angle::turn_t > & GetPosition(bool refresh=true) override
Position of the device in mechanism rotations.
StatusSignal< double > & GetDifferentialClosedLoopOutput(bool refresh=true) override
Differential closed loop total output.
StatusSignal< bool > & GetFault_Undervoltage(bool refresh=true) override
Device supply voltage dropped to near brownout levels.
StatusSignal< bool > & GetFault_MissingHardLimitRemote(bool refresh=true) override
The remote limit switch device is not present on CAN Bus.
ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV(units::time::second_t timeoutSeconds) override
Clear sticky fault: Supply Voltage is unstable.
Definition CoreTalonFXS.hpp:7790
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityVoltage_Velocity &request) override
Differential control with velocity average target and velocity difference target using voltage contro...
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionDutyCycle_Position &request) override
Differential control with position average target and position difference target using dutycycle cont...
ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX() override
Clear sticky fault: The remote Talon used for differential control is not present on CAN Bus.
Definition CoreTalonFXS.hpp:7724
StatusSignal< bool > & GetFault_SupplyCurrLimit(bool refresh=true) override
Supply current limit occured.
StatusSignal< signals::DifferentialControlModeValue > & GetDifferentialControlMode(bool refresh=true) override
The active control mode of the differential controller.
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityVoltage_Position &request) override
Differential control with velocity average target and position difference target using voltage contro...
ctre::phoenix::StatusCode SetControl(const controls::NeutralOut &request) override
Request neutral output of actuator.
StatusSignal< int > & GetVersionMinor(bool refresh=true) override
App Minor Version number.
StatusSignal< bool > & GetFault_MotorTempSensorMissing(bool refresh=true) override
Motor temperature signal appears to not be connected.
StatusSignal< bool > & GetFault_ForwardSoftLimit(bool refresh=true) override
Forward soft limit has been asserted.
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset(units::time::second_t timeoutSeconds) override
Clear sticky fault: The remote sensor has reset.
Definition CoreTalonFXS.hpp:7689
StatusSignal< units::current::ampere_t > & GetStatorCurrent(bool refresh=true) override
Current corresponding to the stator windings.
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorTooHot() override
Clear sticky fault: Motor temperature signal indicates motor is too hot.
Definition CoreTalonFXS.hpp:8220
StatusSignal< bool > & GetFault_HallSensorMissing(bool refresh=true) override
Hall sensor signals are invalid.
StatusSignal< units::angular_velocity::turns_per_second_t > & GetRotorVelocity(bool refresh=true) override
Velocity of the motor rotor.
ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit(units::time::second_t timeoutSeconds) override
Clear sticky fault: Forward limit switch has been asserted.
Definition CoreTalonFXS.hpp:7838
StatusSignal< double > & GetClosedLoopOutput(bool refresh=true) override
Closed loop total output.
ctre::phoenix::StatusCode SetControl(const controls::MotionMagicVoltage &request) override
Requests Motion Magic® to target a final position using a motion profile.
StatusSignal< bool > & GetStickyFault_BootDuringEnable(bool refresh=true) override
Device boot while detecting the enable signal.
ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit() override
Clear sticky fault: Reverse soft limit has been asserted.
Definition CoreTalonFXS.hpp:7874
StatusSignal< bool > & GetStickyFault_RemoteSensorReset(bool refresh=true) override
The remote sensor has reset.
StatusSignal< bool > & GetFault_RemoteSensorDataInvalid(bool refresh=true) override
The remote sensor's data is no longer trusted.
ctre::phoenix::StatusCode SetControl(const controls::VoltageOut &request) override
Request a specified voltage.
StatusSignal< int > & GetClosedLoopSlot(bool refresh=true) override
The slot that the closed-loop PID is using.
ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled() override
Clear sticky fault: Static brake was momentarily disabled due to excessive braking current while disa...
Definition CoreTalonFXS.hpp:8098
StatusSignal< signals::BridgeOutputValue > & GetBridgeOutput(bool refresh=true) override
The applied output of the bridge.
StatusSignal< units::angular_velocity::turns_per_second_t > & GetDifferentialDifferenceVelocity(bool refresh=true) override
Difference component of the differential velocity of device.
StatusSignal< bool > & GetStickyFault_FusedSensorOutOfSync(bool refresh=true) override
The remote sensor used for fusion has fallen out of sync to the local sensor.
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicDutyCycle_Position &request) override
Differential control with Motion Magic® average target and position difference target using dutycycle...
ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit(units::time::second_t timeoutSeconds) override
Clear sticky fault: Reverse limit switch has been asserted.
Definition CoreTalonFXS.hpp:7814
StatusSignal< bool > & GetFault_MissingDifferentialFX(bool refresh=true) override
The remote Talon used for differential control is not present on CAN Bus.
StatusSignal< double > & GetDifferentialOutput(bool refresh=true) override
The calculated motor output for differential followers.
ctre::phoenix::StatusCode ClearStickyFault_HallSensorMissing() override
Clear sticky fault: Hall sensor signals are invalid.
Definition CoreTalonFXS.hpp:8148
StatusSignal< units::dimensionless::scalar_t > & GetDutyCycle(bool refresh=true) override
The applied motor duty cycle.
ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync(units::time::second_t timeoutSeconds) override
Clear sticky fault: The remote sensor used for fusion has fallen out of sync to the local sensor.
Definition CoreTalonFXS.hpp:7991
ctre::phoenix::StatusCode ClearStickyFault_BridgeShort() override
Clear sticky fault: Bridge was disabled most likely due to a short in the motor leads.
Definition CoreTalonFXS.hpp:8122
StatusSignal< double > & GetDifferentialClosedLoopFeedForward(bool refresh=true) override
Differential Feedforward passed by the user.
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVoltage_Position &request) override
Differential control with Motion Magic® average target and position difference target using voltage c...
ctre::phoenix::StatusCode SetControl(const controls::DifferentialMotionMagicDutyCycle &request) override
Requests Motion Magic® to target a final position using a motion profile, and PID to a differential p...
StatusSignal< bool > & GetFault_RemoteSensorReset(bool refresh=true) override
The remote sensor has reset.
ctre::phoenix::StatusCode ClearStickyFaults() override
Clear the sticky faults in the device.
Definition CoreTalonFXS.hpp:7516
ctre::phoenix::StatusCode SetControl(const controls::Follower &request) override
Follow the motor output of another Talon.
ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout(units::time::second_t timeoutSeconds) override
Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low.
Definition CoreTalonFXS.hpp:7666
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse(units::time::second_t timeoutSeconds) override
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
Definition CoreTalonFXS.hpp:7642
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp(units::time::second_t timeoutSeconds) override
Clear sticky fault: Device temperature exceeded limit.
Definition CoreTalonFXS.hpp:7571
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset() override
Clear sticky fault: The remote sensor has reset.
Definition CoreTalonFXS.hpp:7700
StatusSignal< ctre::unit::newton_meters_per_ampere_t > & GetMotorKT(bool refresh=true) override
The torque constant (K_T) of the motor.
StatusSignal< bool > & GetStickyFault_DriveDisabledHallSensor(bool refresh=true) override
Hall sensor signals are invalid during motor drive, so motor was disabled.
StatusSignal< bool > & GetStickyFault_ReverseHardLimit(bool refresh=true) override
Reverse limit switch has been asserted.
StatusSignal< units::angular_velocity::turns_per_second_t > & GetDifferentialAverageVelocity(bool refresh=true) override
Average component of the differential velocity of device.
CoreTalonFXS(int deviceId, std::string canbus="")
Constructs a new Talon FXS motor controller object.
StatusSignal< bool > & GetStickyFault_MotorTempSensorTooHot(bool refresh=true) override
Motor temperature signal indicates motor is too hot.
StatusSignal< signals::ExternalMotorTempStatusValue > & GetExternalMotorTempStatus(bool refresh=true) override
Status of the temperature sensor of the external motor.
ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit(units::time::second_t timeoutSeconds) override
Clear sticky fault: Reverse soft limit has been asserted.
Definition CoreTalonFXS.hpp:7862
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VoltageOut_Velocity &request) override
Differential control with voltage average target and velocity difference target.
StatusSignal< bool > & GetStickyFault_UsingFusedCANcoderWhileUnlicensed(bool refresh=true) override
Using Fused CANcoder feature while unlicensed.
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVoltage_Velocity &request) override
Differential control with Motion Magic® average target and velocity difference target using voltage c...
StatusSignal< signals::AppliedRotorPolarityValue > & GetAppliedRotorPolarity(bool refresh=true) override
The applied rotor polarity as seen from the front of the motor.
StatusSignal< int > & GetVersionBuild(bool refresh=true) override
App Build Version number.
ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit() override
Clear sticky fault: Forward soft limit has been asserted.
Definition CoreTalonFXS.hpp:7898
StatusSignal< units::voltage::volt_t > & GetSupplyVoltage(bool refresh=true) override
Measured supply voltage to the device.
ctre::phoenix::StatusCode SetControl(const controls::PositionVoltage &request) override
Request PID to target position with voltage feedforward.
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionDutyCycle_Velocity &request) override
Differential control with position average target and velocity difference target using dutycycle cont...
StatusSignal< units::angle::turn_t > & GetRotorPosition(bool refresh=true) override
Position of the motor rotor.
StatusSignal< bool > & GetStickyFault_MotorTempSensorMissing(bool refresh=true) override
Motor temperature signal appears to not be connected.
StatusSignal< ctre::unit::rpm_per_volt_t > & GetMotorKV(bool refresh=true) override
The velocity constant (K_V) of the motor.
ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout() override
Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low.
Definition CoreTalonFXS.hpp:7678
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid() override
Clear sticky fault: The remote sensor's data is no longer trusted.
Definition CoreTalonFXS.hpp:7976
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable() override
Clear sticky fault: Device boot while detecting the enable signal.
Definition CoreTalonFXS.hpp:7630
StatusSignal< units::temperature::celsius_t > & GetExternalMotorTemp(bool refresh=true) override
Temperature of the external motor.
ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds) override
Sets the mechanism position of the device in mechanism rotations.
Definition CoreTalonFXS.hpp:7473
StatusSignal< units::current::ampere_t > & GetMotorStallCurrent(bool refresh=true) override
The stall current of the motor at 12 V output.
ctre::phoenix::StatusCode SetControl(const controls::DifferentialVelocityDutyCycle &request) override
Request PID to target velocity with a differential position setpoint.
ctre::phoenix::StatusCode SetControl(const controls::CoastOut &request) override
Request coast neutral output of actuator.
StatusSignal< double > & GetClosedLoopError(bool refresh=true) override
The difference between target reference and current measurement.
StatusSignal< units::angle::turn_t > & GetDifferentialAveragePosition(bool refresh=true) override
Average component of the differential position of device.
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityDutyCycle_Position &request) override
Differential control with velocity average target and position difference target using dutycycle cont...
ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit() override
Clear sticky fault: Stator current limit occured.
Definition CoreTalonFXS.hpp:8028
StatusSignal< bool > & GetFault_ReverseHardLimit(bool refresh=true) override
Reverse limit switch has been asserted.
ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit() override
Clear sticky fault: Reverse limit switch has been asserted.
Definition CoreTalonFXS.hpp:7826
StatusSignal< units::angular_acceleration::turns_per_second_squared_t > & GetAcceleration(bool refresh=true) override
Acceleration of the device in mechanism rotations per second².
StatusSignal< double > & GetClosedLoopFeedForward(bool refresh=true) override
Feedforward passed by the user.
StatusSignal< bool > & GetStickyFault_BridgeBrownout(bool refresh=true) override
Bridge was disabled most likely due to supply voltage dropping too low.
StatusSignal< units::voltage::volt_t > & GetFiveVRailVoltage(bool refresh=true) override
The measured voltage of the 5V rail available on the JST and dataport connectors.
StatusSignal< int > & GetStickyFaultField(bool refresh=true) override
Integer representing all (persistent) sticky fault flags reported by the device.
StatusSignal< bool > & GetFault_MotorTempSensorTooHot(bool refresh=true) override
Motor temperature signal indicates motor is too hot.
StatusSignal< bool > & GetFault_UnstableSupplyV(bool refresh=true) override
Supply Voltage is unstable.
StatusSignal< bool > & GetStickyFault_ForwardSoftLimit(bool refresh=true) override
Forward soft limit has been asserted.
StatusSignal< double > & GetClosedLoopReference(bool refresh=true) override
Value that the closed loop is targeting.
ctre::phoenix::StatusCode SetControl(const controls::PositionDutyCycle &request) override
Request PID to target position with duty cycle feedforward.
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow() override
Clear sticky fault: The remote sensor position has overflowed.
Definition CoreTalonFXS.hpp:7754
StatusSignal< units::current::ampere_t > & GetTorqueCurrent(bool refresh=true) override
Current corresponding to the torque output by the motor.
StatusSignal< bool > & GetStickyFault_ForwardHardLimit(bool refresh=true) override
Forward limit switch has been asserted.
StatusSignal< bool > & GetStickyFault_StatorCurrLimit(bool refresh=true) override
Stator current limit occured.
StatusSignal< double > & GetDifferentialClosedLoopReference(bool refresh=true) override
Value that the differential closed loop is targeting.
ctre::phoenix::StatusCode SetControl(const controls::DifferentialPositionDutyCycle &request) override
Request PID to target position with a differential position setpoint.
StatusSignal< int > & GetVersionBugfix(bool refresh=true) override
App Bugfix Version number.
ctre::phoenix::StatusCode SetControl(const controls::DifferentialStrictFollower &request) override
Follow the differential motor output of another Talon while ignoring the master's invert setting.
StatusSignal< bool > & GetStickyFault_MissingSoftLimitRemote(bool refresh=true) override
The remote soft limit device is not present on CAN Bus.
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow(units::time::second_t timeoutSeconds) override
Clear sticky fault: The remote sensor position has overflowed.
Definition CoreTalonFXS.hpp:7739
ctre::phoenix::StatusCode SetControl(const controls::DutyCycleOut &request) override
Request a specified motor duty cycle.
ctre::phoenix::StatusCode SetControl(const controls::DifferentialFollower &request) override
Follow the differential motor output of another Talon.
StatusSignal< bool > & GetFault_ProcTemp(bool refresh=true) override
Processor temperature exceeded limit.
StatusSignal< units::current::ampere_t > & GetSupplyCurrent(bool refresh=true) override
Measured supply side current.
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_DutyCycleOut_Position &request) override
Differential control with duty cycle average target and position difference target.
StatusSignal< int > & GetFaultField(bool refresh=true) override
Integer representing all fault flags reported by the device.
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionVoltage_Velocity &request) override
Differential control with position average target and velocity difference target using voltage contro...
StatusSignal< bool > & GetStickyFault_RemoteSensorDataInvalid(bool refresh=true) override
The remote sensor's data is no longer trusted.
StatusSignal< units::angle::turn_t > & GetRawQuadraturePosition(bool refresh=true) override
The raw position retrieved from the connected quadrature encoder.
ctre::phoenix::StatusCode SetControl(const controls::StaticBrake &request) override
Applies full neutral-brake by shorting motor leads together.
StatusSignal< bool > & GetFault_Hardware(bool refresh=true) override
Hardware fault occurred.
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VoltageOut_Position &request) override
Differential control with voltage average target and position difference target.
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicDutyCycle_Velocity &request) override
Differential control with Motion Magic® average target and velocity difference target using dutycycle...
ctre::phoenix::StatusCode ClearStickyFault_HallSensorMissing(units::time::second_t timeoutSeconds) override
Clear sticky fault: Hall sensor signals are invalid.
Definition CoreTalonFXS.hpp:8135
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorMissing(units::time::second_t timeoutSeconds) override
Clear sticky fault: Motor temperature signal appears to not be connected.
Definition CoreTalonFXS.hpp:8184
StatusSignal< units::angular_velocity::turns_per_second_t > & GetRawQuadratureVelocity(bool refresh=true) override
The raw velocity retrieved from the connected quadrature encoder.
ctre::phoenix::StatusCode SetControl(const controls::MotionMagicDutyCycle &request) override
Requests Motion Magic® to target a final position using a motion profile.
ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds) override
Clear sticky fault: Hardware fault occurred.
Definition CoreTalonFXS.hpp:7527
ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_DutyCycleOut_Velocity &request) override
Differential control with duty cycle average target and velocity difference target.
ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed() override
Clear sticky fault: Using Fused CANcoder feature while unlicensed.
Definition CoreTalonFXS.hpp:8074
ctre::phoenix::StatusCode SetControl(const controls::StrictFollower &request) override
Follow the motor output of another Talon while ignoring the master's invert setting.
StatusSignal< bool > & GetFault_DriveDisabledHallSensor(bool refresh=true) override
Hall sensor signals are invalid during motor drive, so motor was disabled.
StatusSignal< units::temperature::celsius_t > & GetAncillaryDeviceTemp(bool refresh=true) override
Temperature of device from second sensor.
StatusSignal< bool > & GetStickyFault_ReverseSoftLimit(bool refresh=true) override
Reverse soft limit has been asserted.
StatusSignal< bool > & GetFault_ForwardHardLimit(bool refresh=true) override
Forward limit switch has been asserted.
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorTooHot(units::time::second_t timeoutSeconds) override
Clear sticky fault: Motor temperature signal indicates motor is too hot.
Definition CoreTalonFXS.hpp:8208
StatusSignal< bool > & GetFault_UsingFusedCANcoderWhileUnlicensed(bool refresh=true) override
Using Fused CANcoder feature while unlicensed.
ctre::phoenix::StatusCode SetControl(const controls::DifferentialVelocityVoltage &request) override
Request PID to target velocity with a differential position setpoint.
StatusSignal< bool > & GetStickyFault_OverSupplyV(bool refresh=true) override
Supply Voltage has exceeded the maximum voltage rating of device.
ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync() override
Clear sticky fault: The remote sensor used for fusion has fallen out of sync to the local sensor.
Definition CoreTalonFXS.hpp:8006
StatusSignal< double > & GetClosedLoopReferenceSlope(bool refresh=true) override
Derivative of the target that the closed loop is targeting.
StatusSignal< bool > & GetFault_StaticBrakeDisabled(bool refresh=true) override
Static brake was momentarily disabled due to excessive braking current while disabled.
configs::TalonFXSConfigurator & GetConfigurator()
Gets the configurator for this TalonFXS.
Definition CoreTalonFXS.hpp:3153
CoreTalonFXS(int deviceId, CANBus canbus)
Constructs a new Talon FXS motor controller object.
Definition CoreTalonFXS.hpp:3142
StatusSignal< units::voltage::volt_t > & GetMotorVoltage(bool refresh=true) override
The applied (output) motor voltage.
StatusSignal< double > & GetClosedLoopIntegratedOutput(bool refresh=true) override
Closed loop integrated component.
ctre::phoenix::StatusCode SetControl(const controls::MotionMagicExpoVoltage &request) override
Requests Motion Magic® to target a final position using an exponential motion profile.
StatusSignal< signals::MotionMagicIsRunningValue > & GetMotionMagicIsRunning(bool refresh=true) override
Check if Motion Magic® is running.
StatusSignal< bool > & GetIsProLicensed(bool refresh=true) override
Whether the device is Phoenix Pro licensed.
StatusSignal< bool > & GetFault_MissingSoftLimitRemote(bool refresh=true) override
The remote soft limit device is not present on CAN Bus.
ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit(units::time::second_t timeoutSeconds) override
Clear sticky fault: Forward soft limit has been asserted.
Definition CoreTalonFXS.hpp:7886
ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote() override
Clear sticky fault: The remote soft limit device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:7922
StatusSignal< units::angular_velocity::turns_per_second_t > & GetVelocity(bool refresh=true) override
Velocity of the device in mechanism rotations per second.
StatusSignal< bool > & GetFault_ReverseSoftLimit(bool refresh=true) override
Reverse soft limit has been asserted.
StatusSignal< int > & GetVersionMajor(bool refresh=true) override
App Major Version number.
StatusSignal< double > & GetDifferentialClosedLoopError(bool refresh=true) override
The difference between target differential reference and current measurement.
StatusSignal< bool > & GetStickyFault_ProcTemp(bool refresh=true) override
Processor temperature exceeded limit.
StatusSignal< double > & GetDifferentialClosedLoopReferenceSlope(bool refresh=true) override
Derivative of the target that the differential closed loop is targeting.
ctre::phoenix::StatusCode SetControl(const controls::DifferentialMotionMagicVoltage &request) override
Requests Motion Magic® to target a final position using a motion profile, and PID to a differential p...
StatusSignal< signals::ControlModeValue > & GetControlMode(bool refresh=true) override
The active control mode of the motor controller.
StatusSignal< double > & GetClosedLoopProportionalOutput(bool refresh=true) override
Closed loop proportional component.
ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled(units::time::second_t timeoutSeconds) override
Clear sticky fault: Static brake was momentarily disabled due to excessive braking current while disa...
Definition CoreTalonFXS.hpp:8086
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage() override
Clear sticky fault: Device supply voltage dropped to near brownout levels.
Definition CoreTalonFXS.hpp:7606
StatusSignal< units::temperature::celsius_t > & GetProcessorTemp(bool refresh=true) override
Temperature of the processor.
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable(units::time::second_t timeoutSeconds) override
Clear sticky fault: Device boot while detecting the enable signal.
Definition CoreTalonFXS.hpp:7618
StatusSignal< bool > & GetStickyFault_Hardware(bool refresh=true) override
Hardware fault occurred.
ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue) override
Sets the mechanism position of the device in mechanism rotations.
Definition CoreTalonFXS.hpp:7486
ctre::phoenix::StatusCode ClearStickyFault_Hardware() override
Clear sticky fault: Hardware fault occurred.
Definition CoreTalonFXS.hpp:7538
StatusSignal< bool > & GetFault_FusedSensorOutOfSync(bool refresh=true) override
The remote sensor used for fusion has fallen out of sync to the local sensor.
ctre::phoenix::StatusCode SetControl(const controls::DynamicMotionMagicDutyCycle &request) override
Requests Motion Magic® to target a final position using a motion profile.
sim::TalonFXSSimState & GetSimState()
Get the simulation state for this device.
Definition CoreTalonFXS.hpp:3183
StatusSignal< bool > & GetStickyFault_DeviceTemp(bool refresh=true) override
Device temperature exceeded limit.
ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote() override
Clear sticky fault: The remote limit switch device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:7946
ctre::phoenix::StatusCode ClearStickyFault_ProcTemp(units::time::second_t timeoutSeconds) override
Clear sticky fault: Processor temperature exceeded limit.
Definition CoreTalonFXS.hpp:7549
ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit() override
Clear sticky fault: Supply current limit occured.
Definition CoreTalonFXS.hpp:8050
StatusSignal< bool > & GetFault_BridgeBrownout(bool refresh=true) override
Bridge was disabled most likely due to supply voltage dropping too low.
StatusSignal< bool > & GetFault_UnlicensedFeatureInUse(bool refresh=true) override
An unlicensed feature is in use, device may not behave as expected.
StatusSignal< int > & GetDifferentialClosedLoopSlot(bool refresh=true) override
The slot that the closed-loop differential PID is using.
StatusSignal< units::angle::turn_t > & GetRawPulseWidthPosition(bool refresh=true) override
The raw position retrieved from the connected pulse-width encoder.
ctre::phoenix::StatusCode SetControl(const controls::DynamicMotionMagicVoltage &request) override
Requests Motion Magic® to target a final position using a motion profile.
StatusSignal< bool > & GetFault_StatorCurrLimit(bool refresh=true) override
Stator current limit occured.
ctre::phoenix::StatusCode SetControl(const controls::MotionMagicExpoDutyCycle &request) override
Requests Motion Magic® to target a final position using an exponential motion profile.
ctre::phoenix::StatusCode SetControl(const controls::DifferentialVoltage &request) override
Request a specified voltage with a differential position closed-loop.
ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV() override
Clear sticky fault: Supply Voltage is unstable.
Definition CoreTalonFXS.hpp:7802
StatusSignal< units::temperature::celsius_t > & GetDeviceTemp(bool refresh=true) override
Temperature of device.
StatusSignal< bool > & GetStickyFault_MissingDifferentialFX(bool refresh=true) override
The remote Talon used for differential control is not present on CAN Bus.
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid(units::time::second_t timeoutSeconds) override
Clear sticky fault: The remote sensor's data is no longer trusted.
Definition CoreTalonFXS.hpp:7961
ctre::phoenix::StatusCode SetControl(const controls::DifferentialPositionVoltage &request) override
Request PID to target position with a differential position setpoint.
ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed(units::time::second_t timeoutSeconds) override
Clear sticky fault: Using Fused CANcoder feature while unlicensed.
Definition CoreTalonFXS.hpp:8062
StatusSignal< signals::ReverseLimitValue > & GetReverseLimit(bool refresh=true) override
Reverse Limit Pin.
ctre::phoenix::StatusCode ClearStickyFault_DriveDisabledHallSensor(units::time::second_t timeoutSeconds) override
Clear sticky fault: Hall sensor signals are invalid during motor drive, so motor was disabled.
Definition CoreTalonFXS.hpp:8160
StatusSignal< bool > & GetFault_OverSupplyV(bool refresh=true) override
Supply Voltage has exceeded the maximum voltage rating of device.
ctre::phoenix::StatusCode SetControl(const controls::DifferentialDutyCycle &request) override
Request a specified motor duty cycle with a differential position closed-loop.
ctre::phoenix::StatusCode SetControl(const controls::VelocityVoltage &request) override
Request PID to target velocity with voltage feedforward.
ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV() override
Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device.
Definition CoreTalonFXS.hpp:7778
ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV(units::time::second_t timeoutSeconds) override
Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device.
Definition CoreTalonFXS.hpp:7766
StatusSignal< units::angle::turn_t > & GetDifferentialDifferencePosition(bool refresh=true) override
Difference component of the differential position of device.
ctre::phoenix::StatusCode SetControl(const controls::MotionMagicVelocityDutyCycle &request) override
Requests Motion Magic® to target a final velocity using a motion profile.
ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit(units::time::second_t timeoutSeconds) override
Clear sticky fault: Stator current limit occured.
Definition CoreTalonFXS.hpp:8017
ctre::phoenix::StatusCode SetControl(const controls::VelocityDutyCycle &request) override
Request PID to target velocity with duty cycle feedforward.
StatusSignal< bool > & GetStickyFault_UnlicensedFeatureInUse(bool refresh=true) override
An unlicensed feature is in use, device may not behave as expected.
StatusSignal< bool > & GetFault_BridgeShort(bool refresh=true) override
Bridge was disabled most likely due to a short in the motor leads.
ctre::phoenix::StatusCode ClearStickyFault_ProcTemp() override
Clear sticky fault: Processor temperature exceeded limit.
Definition CoreTalonFXS.hpp:7560
StatusSignal< bool > & GetStickyFault_MissingHardLimitRemote(bool refresh=true) override
The remote limit switch device is not present on CAN Bus.
ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX(units::time::second_t timeoutSeconds) override
Clear sticky fault: The remote Talon used for differential control is not present on CAN Bus.
Definition CoreTalonFXS.hpp:7712
StatusSignal< double > & GetDifferentialClosedLoopIntegratedOutput(bool refresh=true) override
Differential closed loop integrated component.
StatusSignal< signals::ConnectedMotorValue > & GetConnectedMotor(bool refresh=true) override
The type of motor attached to the Talon.
StatusSignal< bool > & GetFault_DeviceTemp(bool refresh=true) override
Device temperature exceeded limit.
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds) override
Clear sticky fault: Device supply voltage dropped to near brownout levels.
Definition CoreTalonFXS.hpp:7594
StatusSignal< signals::DeviceEnableValue > & GetDeviceEnable(bool refresh=true) override
Indicates if device is actuator enabled.
StatusSignal< signals::ForwardLimitValue > & GetForwardLimit(bool refresh=true) override
Forward Limit Pin.
Contains everything common between Talon motor controllers that support external motors.
Definition CommonTalonWithExternalMotor.hpp:26
Class to control the state of a simulated hardware::TalonFXS.
Definition TalonFXSSimState.hpp:33
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
static constexpr int OK
No Error.
Definition StatusCodes.h:34
static constexpr int NotSupported
This is not supported.
Definition StatusCodes.h:652
Definition MotionMagicExpoTorqueCurrentFOC.hpp:18
Definition span.hpp:401