CTRE Phoenix 6 C++ 25.2.1
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 Hardware fault occurred
4025 *
4026 * - Default Value: False
4027 *
4028 * Default Rates:
4029 * - CAN: 4.0 Hz
4030 *
4031 * This refreshes and returns a cached StatusSignal object.
4032 *
4033 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4034 * \returns Fault_Hardware Status Signal Object
4035 */
4036 StatusSignal<bool> &GetFault_Hardware(bool refresh = true) override;
4037
4038 /**
4039 * \brief Hardware fault occurred
4040 *
4041 * - Default Value: False
4042 *
4043 * Default Rates:
4044 * - CAN: 4.0 Hz
4045 *
4046 * This refreshes and returns a cached StatusSignal object.
4047 *
4048 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4049 * \returns StickyFault_Hardware Status Signal Object
4050 */
4051 StatusSignal<bool> &GetStickyFault_Hardware(bool refresh = true) override;
4052
4053 /**
4054 * \brief Processor temperature exceeded limit
4055 *
4056 * - Default Value: False
4057 *
4058 * Default Rates:
4059 * - CAN: 4.0 Hz
4060 *
4061 * This refreshes and returns a cached StatusSignal object.
4062 *
4063 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4064 * \returns Fault_ProcTemp Status Signal Object
4065 */
4066 StatusSignal<bool> &GetFault_ProcTemp(bool refresh = true) override;
4067
4068 /**
4069 * \brief Processor temperature exceeded limit
4070 *
4071 * - Default Value: False
4072 *
4073 * Default Rates:
4074 * - CAN: 4.0 Hz
4075 *
4076 * This refreshes and returns a cached StatusSignal object.
4077 *
4078 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4079 * \returns StickyFault_ProcTemp Status Signal Object
4080 */
4081 StatusSignal<bool> &GetStickyFault_ProcTemp(bool refresh = true) override;
4082
4083 /**
4084 * \brief Device temperature exceeded limit
4085 *
4086 * - Default Value: False
4087 *
4088 * Default Rates:
4089 * - CAN: 4.0 Hz
4090 *
4091 * This refreshes and returns a cached StatusSignal object.
4092 *
4093 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4094 * \returns Fault_DeviceTemp Status Signal Object
4095 */
4096 StatusSignal<bool> &GetFault_DeviceTemp(bool refresh = true) override;
4097
4098 /**
4099 * \brief Device temperature exceeded limit
4100 *
4101 * - Default Value: False
4102 *
4103 * Default Rates:
4104 * - CAN: 4.0 Hz
4105 *
4106 * This refreshes and returns a cached StatusSignal object.
4107 *
4108 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4109 * \returns StickyFault_DeviceTemp Status Signal Object
4110 */
4111 StatusSignal<bool> &GetStickyFault_DeviceTemp(bool refresh = true) override;
4112
4113 /**
4114 * \brief Device supply voltage dropped to near brownout levels
4115 *
4116 * - Default Value: False
4117 *
4118 * Default Rates:
4119 * - CAN: 4.0 Hz
4120 *
4121 * This refreshes and returns a cached StatusSignal object.
4122 *
4123 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4124 * \returns Fault_Undervoltage Status Signal Object
4125 */
4126 StatusSignal<bool> &GetFault_Undervoltage(bool refresh = true) override;
4127
4128 /**
4129 * \brief Device supply voltage dropped to near brownout levels
4130 *
4131 * - Default Value: False
4132 *
4133 * Default Rates:
4134 * - CAN: 4.0 Hz
4135 *
4136 * This refreshes and returns a cached StatusSignal object.
4137 *
4138 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4139 * \returns StickyFault_Undervoltage Status Signal Object
4140 */
4141 StatusSignal<bool> &GetStickyFault_Undervoltage(bool refresh = true) override;
4142
4143 /**
4144 * \brief Device boot while detecting the enable signal
4145 *
4146 * - Default Value: False
4147 *
4148 * Default Rates:
4149 * - CAN: 4.0 Hz
4150 *
4151 * This refreshes and returns a cached StatusSignal object.
4152 *
4153 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4154 * \returns Fault_BootDuringEnable Status Signal Object
4155 */
4156 StatusSignal<bool> &GetFault_BootDuringEnable(bool refresh = true) override;
4157
4158 /**
4159 * \brief Device boot while detecting the enable signal
4160 *
4161 * - Default Value: False
4162 *
4163 * Default Rates:
4164 * - CAN: 4.0 Hz
4165 *
4166 * This refreshes and returns a cached StatusSignal object.
4167 *
4168 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4169 * \returns StickyFault_BootDuringEnable Status Signal Object
4170 */
4172
4173 /**
4174 * \brief An unlicensed feature is in use, device may not behave as
4175 * expected.
4176 *
4177 * - Default Value: False
4178 *
4179 * Default Rates:
4180 * - CAN: 4.0 Hz
4181 *
4182 * This refreshes and returns a cached StatusSignal object.
4183 *
4184 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4185 * \returns Fault_UnlicensedFeatureInUse Status Signal Object
4186 */
4188
4189 /**
4190 * \brief An unlicensed feature is in use, device may not behave as
4191 * expected.
4192 *
4193 * - Default Value: False
4194 *
4195 * Default Rates:
4196 * - CAN: 4.0 Hz
4197 *
4198 * This refreshes and returns a cached StatusSignal object.
4199 *
4200 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4201 * \returns StickyFault_UnlicensedFeatureInUse Status Signal Object
4202 */
4204
4205 /**
4206 * \brief Bridge was disabled most likely due to supply voltage
4207 * dropping too low.
4208 *
4209 * - Default Value: False
4210 *
4211 * Default Rates:
4212 * - CAN: 4.0 Hz
4213 *
4214 * This refreshes and returns a cached StatusSignal object.
4215 *
4216 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4217 * \returns Fault_BridgeBrownout Status Signal Object
4218 */
4219 StatusSignal<bool> &GetFault_BridgeBrownout(bool refresh = true) override;
4220
4221 /**
4222 * \brief Bridge was disabled most likely due to supply voltage
4223 * dropping too low.
4224 *
4225 * - Default Value: False
4226 *
4227 * Default Rates:
4228 * - CAN: 4.0 Hz
4229 *
4230 * This refreshes and returns a cached StatusSignal object.
4231 *
4232 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4233 * \returns StickyFault_BridgeBrownout Status Signal Object
4234 */
4236
4237 /**
4238 * \brief The remote sensor has reset.
4239 *
4240 * - Default Value: False
4241 *
4242 * Default Rates:
4243 * - CAN: 4.0 Hz
4244 *
4245 * This refreshes and returns a cached StatusSignal object.
4246 *
4247 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4248 * \returns Fault_RemoteSensorReset Status Signal Object
4249 */
4250 StatusSignal<bool> &GetFault_RemoteSensorReset(bool refresh = true) override;
4251
4252 /**
4253 * \brief The remote sensor has reset.
4254 *
4255 * - Default Value: False
4256 *
4257 * Default Rates:
4258 * - CAN: 4.0 Hz
4259 *
4260 * This refreshes and returns a cached StatusSignal object.
4261 *
4262 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4263 * \returns StickyFault_RemoteSensorReset Status Signal Object
4264 */
4266
4267 /**
4268 * \brief The remote Talon used for differential control is not
4269 * present on CAN Bus.
4270 *
4271 * - Default Value: False
4272 *
4273 * Default Rates:
4274 * - CAN: 4.0 Hz
4275 *
4276 * This refreshes and returns a cached StatusSignal object.
4277 *
4278 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4279 * \returns Fault_MissingDifferentialFX Status Signal Object
4280 */
4282
4283 /**
4284 * \brief The remote Talon used for differential control is not
4285 * present on CAN Bus.
4286 *
4287 * - Default Value: False
4288 *
4289 * Default Rates:
4290 * - CAN: 4.0 Hz
4291 *
4292 * This refreshes and returns a cached StatusSignal object.
4293 *
4294 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4295 * \returns StickyFault_MissingDifferentialFX Status Signal Object
4296 */
4298
4299 /**
4300 * \brief The remote sensor position has overflowed. Because of the
4301 * nature of remote sensors, it is possible for the remote sensor
4302 * position to overflow beyond what is supported by the status signal
4303 * frame. However, this is rare and cannot occur over the course of an
4304 * FRC match under normal use.
4305 *
4306 * - Default Value: False
4307 *
4308 * Default Rates:
4309 * - CAN: 4.0 Hz
4310 *
4311 * This refreshes and returns a cached StatusSignal object.
4312 *
4313 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4314 * \returns Fault_RemoteSensorPosOverflow Status Signal Object
4315 */
4317
4318 /**
4319 * \brief The remote sensor position has overflowed. Because of the
4320 * nature of remote sensors, it is possible for the remote sensor
4321 * position to overflow beyond what is supported by the status signal
4322 * frame. However, this is rare and cannot occur over the course of an
4323 * FRC match under normal use.
4324 *
4325 * - Default Value: False
4326 *
4327 * Default Rates:
4328 * - CAN: 4.0 Hz
4329 *
4330 * This refreshes and returns a cached StatusSignal object.
4331 *
4332 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4333 * \returns StickyFault_RemoteSensorPosOverflow Status Signal Object
4334 */
4336
4337 /**
4338 * \brief Supply Voltage has exceeded the maximum voltage rating of
4339 * device.
4340 *
4341 * - Default Value: False
4342 *
4343 * Default Rates:
4344 * - CAN: 4.0 Hz
4345 *
4346 * This refreshes and returns a cached StatusSignal object.
4347 *
4348 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4349 * \returns Fault_OverSupplyV Status Signal Object
4350 */
4351 StatusSignal<bool> &GetFault_OverSupplyV(bool refresh = true) override;
4352
4353 /**
4354 * \brief Supply Voltage has exceeded the maximum voltage rating of
4355 * device.
4356 *
4357 * - Default Value: False
4358 *
4359 * Default Rates:
4360 * - CAN: 4.0 Hz
4361 *
4362 * This refreshes and returns a cached StatusSignal object.
4363 *
4364 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4365 * \returns StickyFault_OverSupplyV Status Signal Object
4366 */
4367 StatusSignal<bool> &GetStickyFault_OverSupplyV(bool refresh = true) override;
4368
4369 /**
4370 * \brief Supply Voltage is unstable. Ensure you are using a battery
4371 * and current limited power supply.
4372 *
4373 * - Default Value: False
4374 *
4375 * Default Rates:
4376 * - CAN: 4.0 Hz
4377 *
4378 * This refreshes and returns a cached StatusSignal object.
4379 *
4380 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4381 * \returns Fault_UnstableSupplyV Status Signal Object
4382 */
4383 StatusSignal<bool> &GetFault_UnstableSupplyV(bool refresh = true) override;
4384
4385 /**
4386 * \brief Supply Voltage is unstable. Ensure you are using a battery
4387 * and current limited power supply.
4388 *
4389 * - Default Value: False
4390 *
4391 * Default Rates:
4392 * - CAN: 4.0 Hz
4393 *
4394 * This refreshes and returns a cached StatusSignal object.
4395 *
4396 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4397 * \returns StickyFault_UnstableSupplyV Status Signal Object
4398 */
4400
4401 /**
4402 * \brief Reverse limit switch has been asserted. Output is set to
4403 * neutral.
4404 *
4405 * - Default Value: False
4406 *
4407 * Default Rates:
4408 * - CAN: 4.0 Hz
4409 *
4410 * This refreshes and returns a cached StatusSignal object.
4411 *
4412 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4413 * \returns Fault_ReverseHardLimit Status Signal Object
4414 */
4415 StatusSignal<bool> &GetFault_ReverseHardLimit(bool refresh = true) override;
4416
4417 /**
4418 * \brief Reverse limit switch has been asserted. Output is set to
4419 * neutral.
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_ReverseHardLimit Status Signal Object
4430 */
4432
4433 /**
4434 * \brief Forward limit switch has been asserted. Output is set to
4435 * neutral.
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_ForwardHardLimit Status Signal Object
4446 */
4447 StatusSignal<bool> &GetFault_ForwardHardLimit(bool refresh = true) override;
4448
4449 /**
4450 * \brief Forward limit switch has been asserted. Output is set to
4451 * neutral.
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_ForwardHardLimit Status Signal Object
4462 */
4464
4465 /**
4466 * \brief Reverse soft limit has been asserted. Output is set to
4467 * neutral.
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_ReverseSoftLimit Status Signal Object
4478 */
4479 StatusSignal<bool> &GetFault_ReverseSoftLimit(bool refresh = true) override;
4480
4481 /**
4482 * \brief Reverse soft limit has been asserted. Output is set to
4483 * neutral.
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_ReverseSoftLimit Status Signal Object
4494 */
4496
4497 /**
4498 * \brief Forward soft limit 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_ForwardSoftLimit Status Signal Object
4510 */
4511 StatusSignal<bool> &GetFault_ForwardSoftLimit(bool refresh = true) override;
4512
4513 /**
4514 * \brief Forward soft limit 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_ForwardSoftLimit Status Signal Object
4526 */
4528
4529 /**
4530 * \brief The remote soft limit device is not present on CAN Bus.
4531 *
4532 * - Default Value: False
4533 *
4534 * Default Rates:
4535 * - CAN: 4.0 Hz
4536 *
4537 * This refreshes and returns a cached StatusSignal object.
4538 *
4539 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4540 * \returns Fault_MissingSoftLimitRemote Status Signal Object
4541 */
4543
4544 /**
4545 * \brief The remote soft limit device is not present on CAN Bus.
4546 *
4547 * - Default Value: False
4548 *
4549 * Default Rates:
4550 * - CAN: 4.0 Hz
4551 *
4552 * This refreshes and returns a cached StatusSignal object.
4553 *
4554 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4555 * \returns StickyFault_MissingSoftLimitRemote Status Signal Object
4556 */
4558
4559 /**
4560 * \brief The remote limit switch device is not present on CAN Bus.
4561 *
4562 * - Default Value: False
4563 *
4564 * Default Rates:
4565 * - CAN: 4.0 Hz
4566 *
4567 * This refreshes and returns a cached StatusSignal object.
4568 *
4569 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4570 * \returns Fault_MissingHardLimitRemote Status Signal Object
4571 */
4573
4574 /**
4575 * \brief The remote limit switch device is not present on CAN Bus.
4576 *
4577 * - Default Value: False
4578 *
4579 * Default Rates:
4580 * - CAN: 4.0 Hz
4581 *
4582 * This refreshes and returns a cached StatusSignal object.
4583 *
4584 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4585 * \returns StickyFault_MissingHardLimitRemote Status Signal Object
4586 */
4588
4589 /**
4590 * \brief The remote sensor's data is no longer trusted. This can
4591 * happen if the remote sensor disappears from the CAN bus or if the
4592 * remote sensor indicates its data is no longer valid, such as when a
4593 * CANcoder's magnet strength falls into the "red" range.
4594 *
4595 * - Default Value: False
4596 *
4597 * Default Rates:
4598 * - CAN: 4.0 Hz
4599 *
4600 * This refreshes and returns a cached StatusSignal object.
4601 *
4602 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4603 * \returns Fault_RemoteSensorDataInvalid Status Signal Object
4604 */
4606
4607 /**
4608 * \brief The remote sensor's data is no longer trusted. This can
4609 * happen if the remote sensor disappears from the CAN bus or if the
4610 * remote sensor indicates its data is no longer valid, such as when a
4611 * CANcoder's magnet strength falls into the "red" range.
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_RemoteSensorDataInvalid Status Signal Object
4622 */
4624
4625 /**
4626 * \brief The remote sensor used for fusion has fallen out of sync to
4627 * the local sensor. A re-synchronization has occurred, which may
4628 * cause a discontinuity. This typically happens if there is
4629 * significant slop in the mechanism, or if the RotorToSensorRatio
4630 * configuration parameter is incorrect.
4631 *
4632 * - Default Value: False
4633 *
4634 * Default Rates:
4635 * - CAN: 4.0 Hz
4636 *
4637 * This refreshes and returns a cached StatusSignal object.
4638 *
4639 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4640 * \returns Fault_FusedSensorOutOfSync Status Signal Object
4641 */
4643
4644 /**
4645 * \brief The remote sensor used for fusion has fallen out of sync to
4646 * the local sensor. A re-synchronization has occurred, which may
4647 * cause a discontinuity. This typically happens if there is
4648 * significant slop in the mechanism, or if the RotorToSensorRatio
4649 * configuration parameter is incorrect.
4650 *
4651 * - Default Value: False
4652 *
4653 * Default Rates:
4654 * - CAN: 4.0 Hz
4655 *
4656 * This refreshes and returns a cached StatusSignal object.
4657 *
4658 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4659 * \returns StickyFault_FusedSensorOutOfSync Status Signal Object
4660 */
4662
4663 /**
4664 * \brief Stator current limit occured.
4665 *
4666 * - Default Value: False
4667 *
4668 * Default Rates:
4669 * - CAN: 4.0 Hz
4670 *
4671 * This refreshes and returns a cached StatusSignal object.
4672 *
4673 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4674 * \returns Fault_StatorCurrLimit Status Signal Object
4675 */
4676 StatusSignal<bool> &GetFault_StatorCurrLimit(bool refresh = true) override;
4677
4678 /**
4679 * \brief Stator current limit occured.
4680 *
4681 * - Default Value: False
4682 *
4683 * Default Rates:
4684 * - CAN: 4.0 Hz
4685 *
4686 * This refreshes and returns a cached StatusSignal object.
4687 *
4688 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4689 * \returns StickyFault_StatorCurrLimit Status Signal Object
4690 */
4692
4693 /**
4694 * \brief Supply current limit occured.
4695 *
4696 * - Default Value: False
4697 *
4698 * Default Rates:
4699 * - CAN: 4.0 Hz
4700 *
4701 * This refreshes and returns a cached StatusSignal object.
4702 *
4703 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4704 * \returns Fault_SupplyCurrLimit Status Signal Object
4705 */
4706 StatusSignal<bool> &GetFault_SupplyCurrLimit(bool refresh = true) override;
4707
4708 /**
4709 * \brief Supply current limit occured.
4710 *
4711 * - Default Value: False
4712 *
4713 * Default Rates:
4714 * - CAN: 4.0 Hz
4715 *
4716 * This refreshes and returns a cached StatusSignal object.
4717 *
4718 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4719 * \returns StickyFault_SupplyCurrLimit Status Signal Object
4720 */
4722
4723 /**
4724 * \brief Using Fused CANcoder feature while unlicensed. Device has
4725 * fallen back to remote CANcoder.
4726 *
4727 * - Default Value: False
4728 *
4729 * Default Rates:
4730 * - CAN: 4.0 Hz
4731 *
4732 * This refreshes and returns a cached StatusSignal object.
4733 *
4734 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4735 * \returns Fault_UsingFusedCANcoderWhileUnlicensed Status Signal Object
4736 */
4738
4739 /**
4740 * \brief Using Fused CANcoder feature while unlicensed. Device has
4741 * fallen back to remote CANcoder.
4742 *
4743 * - Default Value: False
4744 *
4745 * Default Rates:
4746 * - CAN: 4.0 Hz
4747 *
4748 * This refreshes and returns a cached StatusSignal object.
4749 *
4750 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4751 * \returns StickyFault_UsingFusedCANcoderWhileUnlicensed Status Signal Object
4752 */
4754
4755 /**
4756 * \brief Static brake was momentarily disabled due to excessive
4757 * braking current while disabled.
4758 *
4759 * - Default Value: False
4760 *
4761 * Default Rates:
4762 * - CAN: 4.0 Hz
4763 *
4764 * This refreshes and returns a cached StatusSignal object.
4765 *
4766 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4767 * \returns Fault_StaticBrakeDisabled Status Signal Object
4768 */
4769 StatusSignal<bool> &GetFault_StaticBrakeDisabled(bool refresh = true) override;
4770
4771 /**
4772 * \brief Static brake was momentarily disabled due to excessive
4773 * braking current while disabled.
4774 *
4775 * - Default Value: False
4776 *
4777 * Default Rates:
4778 * - CAN: 4.0 Hz
4779 *
4780 * This refreshes and returns a cached StatusSignal object.
4781 *
4782 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4783 * \returns StickyFault_StaticBrakeDisabled Status Signal Object
4784 */
4786
4787 /**
4788 * \brief Bridge was disabled most likely due to a short in the motor
4789 * leads.
4790 *
4791 * - Default Value: False
4792 *
4793 * Default Rates:
4794 * - CAN: 4.0 Hz
4795 *
4796 * This refreshes and returns a cached StatusSignal object.
4797 *
4798 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4799 * \returns Fault_BridgeShort Status Signal Object
4800 */
4801 StatusSignal<bool> &GetFault_BridgeShort(bool refresh = true) override;
4802
4803 /**
4804 * \brief Bridge was disabled most likely due to a short in the motor
4805 * leads.
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_BridgeShort Status Signal Object
4816 */
4817 StatusSignal<bool> &GetStickyFault_BridgeShort(bool refresh = true) override;
4818
4819 /**
4820 * \brief Hall sensor signals are invalid. Check hall sensor and
4821 * cabling. This fault can be used to detect when hall cable is
4822 * unplugged.
4823 *
4824 * - Default Value: False
4825 *
4826 * Default Rates:
4827 * - CAN: 4.0 Hz
4828 *
4829 * This refreshes and returns a cached StatusSignal object.
4830 *
4831 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4832 * \returns Fault_HallSensorMissing Status Signal Object
4833 */
4834 StatusSignal<bool> &GetFault_HallSensorMissing(bool refresh = true) override;
4835
4836 /**
4837 * \brief Hall sensor signals are invalid. Check hall sensor and
4838 * cabling. This fault can be used to detect when hall cable is
4839 * unplugged.
4840 *
4841 * - Default Value: False
4842 *
4843 * Default Rates:
4844 * - CAN: 4.0 Hz
4845 *
4846 * This refreshes and returns a cached StatusSignal object.
4847 *
4848 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4849 * \returns StickyFault_HallSensorMissing Status Signal Object
4850 */
4852
4853 /**
4854 * \brief Hall sensor signals are invalid during motor drive, so motor
4855 * was disabled. Check hall sensor and cabling.
4856 *
4857 * - Default Value: False
4858 *
4859 * Default Rates:
4860 * - CAN: 4.0 Hz
4861 *
4862 * This refreshes and returns a cached StatusSignal object.
4863 *
4864 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4865 * \returns Fault_DriveDisabledHallSensor Status Signal Object
4866 */
4868
4869 /**
4870 * \brief Hall sensor signals are invalid during motor drive, so motor
4871 * was disabled. Check hall sensor and cabling.
4872 *
4873 * - Default Value: False
4874 *
4875 * Default Rates:
4876 * - CAN: 4.0 Hz
4877 *
4878 * This refreshes and returns a cached StatusSignal object.
4879 *
4880 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4881 * \returns StickyFault_DriveDisabledHallSensor Status Signal Object
4882 */
4884
4885 /**
4886 * \brief Motor temperature signal appears to not be connected.
4887 *
4888 * - Default Value: False
4889 *
4890 * Default Rates:
4891 * - CAN: 4.0 Hz
4892 *
4893 * This refreshes and returns a cached StatusSignal object.
4894 *
4895 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4896 * \returns Fault_MotorTempSensorMissing Status Signal Object
4897 */
4899
4900 /**
4901 * \brief Motor temperature signal appears to not be connected.
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_MotorTempSensorMissing Status Signal Object
4912 */
4914
4915 /**
4916 * \brief Motor temperature signal indicates motor is too hot.
4917 *
4918 * - Default Value: False
4919 *
4920 * Default Rates:
4921 * - CAN: 4.0 Hz
4922 *
4923 * This refreshes and returns a cached StatusSignal object.
4924 *
4925 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4926 * \returns Fault_MotorTempSensorTooHot Status Signal Object
4927 */
4929
4930 /**
4931 * \brief Motor temperature signal indicates motor is too hot.
4932 *
4933 * - Default Value: False
4934 *
4935 * Default Rates:
4936 * - CAN: 4.0 Hz
4937 *
4938 * This refreshes and returns a cached StatusSignal object.
4939 *
4940 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4941 * \returns StickyFault_MotorTempSensorTooHot Status Signal Object
4942 */
4944
4945 /**
4946 * \brief Closed loop proportional component
4947 *
4948 * \details The portion of the closed loop output that is the
4949 * proportional to the error. Alternatively, the p-Contribution of the
4950 * closed loop output.
4951 *
4952 * Default Rates:
4953 * - CAN 2.0: 4.0 Hz
4954 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
4955 *
4956 * This refreshes and returns a cached StatusSignal object.
4957 *
4958 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4959 * \returns ClosedLoopProportionalOutput Status Signal object
4960 */
4962
4963 /**
4964 * \brief Closed loop integrated component
4965 *
4966 * \details The portion of the closed loop output that is proportional
4967 * to the integrated error. Alternatively, the i-Contribution of the
4968 * closed loop output.
4969 *
4970 * Default Rates:
4971 * - CAN 2.0: 4.0 Hz
4972 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
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 ClosedLoopIntegratedOutput Status Signal object
4978 */
4980
4981 /**
4982 * \brief Feedforward passed by the user
4983 *
4984 * \details This is the general feedforward that the user provides for
4985 * the closed loop.
4986 *
4987 * Default Rates:
4988 * - CAN 2.0: 4.0 Hz
4989 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
4990 *
4991 * This refreshes and returns a cached StatusSignal object.
4992 *
4993 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
4994 * \returns ClosedLoopFeedForward Status Signal object
4995 */
4996 StatusSignal<double> &GetClosedLoopFeedForward(bool refresh = true) override;
4997
4998 /**
4999 * \brief Closed loop derivative component
5000 *
5001 * \details The portion of the closed loop output that is the
5002 * proportional to the deriviative the error. Alternatively, the
5003 * d-Contribution of the closed loop output.
5004 *
5005 * Default Rates:
5006 * - CAN 2.0: 4.0 Hz
5007 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5008 *
5009 * This refreshes and returns a cached StatusSignal object.
5010 *
5011 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5012 * \returns ClosedLoopDerivativeOutput Status Signal object
5013 */
5015
5016 /**
5017 * \brief Closed loop total output
5018 *
5019 * \details The total output of the closed loop output.
5020 *
5021 * Default Rates:
5022 * - CAN 2.0: 4.0 Hz
5023 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5024 *
5025 * This refreshes and returns a cached StatusSignal object.
5026 *
5027 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5028 * \returns ClosedLoopOutput Status Signal object
5029 */
5030 StatusSignal<double> &GetClosedLoopOutput(bool refresh = true) override;
5031
5032 /**
5033 * \brief Value that the closed loop is targeting
5034 *
5035 * \details This is the value that the closed loop PID controller
5036 * targets.
5037 *
5038 * Default Rates:
5039 * - CAN 2.0: 4.0 Hz
5040 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5041 *
5042 * This refreshes and returns a cached StatusSignal object.
5043 *
5044 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5045 * \returns ClosedLoopReference Status Signal object
5046 */
5047 StatusSignal<double> &GetClosedLoopReference(bool refresh = true) override;
5048
5049 /**
5050 * \brief Derivative of the target that the closed loop is targeting
5051 *
5052 * \details This is the change in the closed loop reference. This may
5053 * be used in the feed-forward calculation, the derivative-error, or
5054 * in application of the signage for kS. Typically, this represents
5055 * the target velocity during Motion Magic®.
5056 *
5057 * Default Rates:
5058 * - CAN 2.0: 4.0 Hz
5059 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5060 *
5061 * This refreshes and returns a cached StatusSignal object.
5062 *
5063 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5064 * \returns ClosedLoopReferenceSlope Status Signal object
5065 */
5067
5068 /**
5069 * \brief The difference between target reference and current
5070 * measurement
5071 *
5072 * \details This is the value that is treated as the error in the PID
5073 * loop.
5074 *
5075 * Default Rates:
5076 * - CAN 2.0: 4.0 Hz
5077 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5078 *
5079 * This refreshes and returns a cached StatusSignal object.
5080 *
5081 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5082 * \returns ClosedLoopError Status Signal object
5083 */
5084 StatusSignal<double> &GetClosedLoopError(bool refresh = true) override;
5085
5086 /**
5087 * \brief The calculated motor output for differential followers.
5088 *
5089 * \details This is a torque request when using the TorqueCurrentFOC
5090 * control output type, and a duty cycle in all other control types.
5091 *
5092 * Default Rates:
5093 * - CAN 2.0: 100.0 Hz
5094 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5095 *
5096 * This refreshes and returns a cached StatusSignal object.
5097 *
5098 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5099 * \returns DifferentialOutput Status Signal object
5100 */
5101 StatusSignal<double> &GetDifferentialOutput(bool refresh = true) override;
5102
5103 /**
5104 * \brief Differential closed loop proportional component
5105 *
5106 * \details The portion of the differential closed loop output that is
5107 * the proportional to the error. Alternatively, the p-Contribution of
5108 * the closed loop output.
5109 *
5110 * Default Rates:
5111 * - CAN 2.0: 4.0 Hz
5112 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5113 *
5114 * This refreshes and returns a cached StatusSignal object.
5115 *
5116 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5117 * \returns DifferentialClosedLoopProportionalOutput Status Signal object
5118 */
5120
5121 /**
5122 * \brief Differential closed loop integrated component
5123 *
5124 * \details The portion of the differential closed loop output that is
5125 * proportional to the integrated error. Alternatively, the
5126 * i-Contribution of the closed loop output.
5127 *
5128 * Default Rates:
5129 * - CAN 2.0: 100.0 Hz
5130 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5131 *
5132 * This refreshes and returns a cached StatusSignal object.
5133 *
5134 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5135 * \returns DifferentialClosedLoopIntegratedOutput Status Signal object
5136 */
5138
5139 /**
5140 * \brief Differential Feedforward passed by the user
5141 *
5142 * \details This is the general feedforward that the user provides for
5143 * the differential closed loop.
5144 *
5145 * Default Rates:
5146 * - CAN 2.0: 100.0 Hz
5147 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5148 *
5149 * This refreshes and returns a cached StatusSignal object.
5150 *
5151 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5152 * \returns DifferentialClosedLoopFeedForward Status Signal object
5153 */
5155
5156 /**
5157 * \brief Differential closed loop derivative component
5158 *
5159 * \details The portion of the differential closed loop output that is
5160 * the proportional to the deriviative the error. Alternatively, the
5161 * d-Contribution of the closed loop output.
5162 *
5163 * Default Rates:
5164 * - CAN 2.0: 4.0 Hz
5165 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5166 *
5167 * This refreshes and returns a cached StatusSignal object.
5168 *
5169 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5170 * \returns DifferentialClosedLoopDerivativeOutput Status Signal object
5171 */
5173
5174 /**
5175 * \brief Differential closed loop total output
5176 *
5177 * \details The total output of the differential closed loop output.
5178 *
5179 * Default Rates:
5180 * - CAN 2.0: 4.0 Hz
5181 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5182 *
5183 * This refreshes and returns a cached StatusSignal object.
5184 *
5185 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5186 * \returns DifferentialClosedLoopOutput Status Signal object
5187 */
5189
5190 /**
5191 * \brief Value that the differential closed loop is targeting
5192 *
5193 * \details This is the value that the differential closed loop PID
5194 * controller targets.
5195 *
5196 * Default Rates:
5197 * - CAN 2.0: 4.0 Hz
5198 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5199 *
5200 * This refreshes and returns a cached StatusSignal object.
5201 *
5202 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5203 * \returns DifferentialClosedLoopReference Status Signal object
5204 */
5206
5207 /**
5208 * \brief Derivative of the target that the differential closed loop
5209 * is targeting
5210 *
5211 * \details This is the change in the closed loop reference. This may
5212 * be used in the feed-forward calculation, the derivative-error, or
5213 * in application of the signage for kS. Typically, this represents
5214 * the target velocity during Motion Magic®.
5215 *
5216 * Default Rates:
5217 * - CAN 2.0: 4.0 Hz
5218 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5219 *
5220 * This refreshes and returns a cached StatusSignal object.
5221 *
5222 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5223 * \returns DifferentialClosedLoopReferenceSlope Status Signal object
5224 */
5226
5227 /**
5228 * \brief The difference between target differential reference and
5229 * current measurement
5230 *
5231 * \details This is the value that is treated as the error in the
5232 * differential PID loop.
5233 *
5234 * Default Rates:
5235 * - CAN 2.0: 4.0 Hz
5236 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5237 *
5238 * This refreshes and returns a cached StatusSignal object.
5239 *
5240 * \param refresh Whether to refresh the StatusSignal before returning it; defaults to true
5241 * \returns DifferentialClosedLoopError Status Signal object
5242 */
5244
5245
5246 /**
5247 * \brief Request a specified motor duty cycle.
5248 *
5249 * \details This control mode will output a proportion of the supplied
5250 * voltage which is supplied by the user.
5251 *
5252 * - DutyCycleOut Parameters:
5253 * - Output: Proportion of supply voltage to apply in fractional units between -1
5254 * and +1
5255 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5256 * increases peak power by ~15%. Set to false to use trapezoidal
5257 * commutation.
5258 *
5259 * FOC improves motor performance by leveraging torque (current)
5260 * control. However, this may be inconvenient for applications that
5261 * require specifying duty cycle or voltage. CTR-Electronics has
5262 * developed a hybrid method that combines the performances gains of
5263 * FOC while still allowing applications to provide duty cycle or
5264 * voltage demand. This not to be confused with simple sinusoidal
5265 * control or phase voltage control which lacks the performance
5266 * gains.
5267 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5268 * is zero (or within deadband). Set to false to use
5269 * the NeutralMode configuration setting (default).
5270 * This flag exists to provide the fundamental
5271 * behavior of this control when output is zero, which
5272 * is to provide 0V to the motor.
5273 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5274 * users to use other limit switch sensors connected to
5275 * robot controller. This also allows use of active
5276 * sensors that require external power.
5277 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5278 * users to use other limit switch sensors connected to
5279 * robot controller. This also allows use of active
5280 * sensors that require external power.
5281 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5282 * LimitForwardMotion and LimitReverseMotion parameters,
5283 * instead allowing motion.
5284 *
5285 * This can be useful on mechanisms such as an
5286 * intake/feeder, where a limit switch stops motion while
5287 * intaking but should be ignored when feeding to a
5288 * shooter.
5289 *
5290 * The hardware limit faults and Forward/ReverseLimit
5291 * signals will still report the values of the limit
5292 * switches regardless of this parameter.
5293 * - UseTimesync: Set to true to delay applying this control request until a
5294 * timesync boundary (requires Phoenix Pro and CANivore). This
5295 * eliminates the impact of nondeterministic network delays in
5296 * exchange for a larger but deterministic control latency.
5297 *
5298 * This requires setting the ControlTimesyncFreqHz config in
5299 * MotorOutputConfigs. Additionally, when this is enabled, the
5300 * UpdateFreqHz of this request should be set to 0 Hz.
5301 *
5302 * \param request Control object to request of the device
5303 * \returns Status Code of the request, 0 is OK
5304 */
5306
5307 /**
5308 * \brief Request a specified voltage.
5309 *
5310 * \details This control mode will attempt to apply the specified
5311 * voltage to the motor. If the supply voltage is below the requested
5312 * voltage, the motor controller will output the supply voltage.
5313 *
5314 * - VoltageOut Parameters:
5315 * - Output: Voltage to attempt to drive at
5316 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5317 * increases peak power by ~15%. Set to false to use trapezoidal
5318 * commutation.
5319 *
5320 * FOC improves motor performance by leveraging torque (current)
5321 * control. However, this may be inconvenient for applications that
5322 * require specifying duty cycle or voltage. CTR-Electronics has
5323 * developed a hybrid method that combines the performances gains of
5324 * FOC while still allowing applications to provide duty cycle or
5325 * voltage demand. This not to be confused with simple sinusoidal
5326 * control or phase voltage control which lacks the performance
5327 * gains.
5328 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5329 * is zero (or within deadband). Set to false to use
5330 * the NeutralMode configuration setting (default).
5331 * This flag exists to provide the fundamental
5332 * behavior of this control when output is zero, which
5333 * is to provide 0V to the motor.
5334 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5335 * users to use other limit switch sensors connected to
5336 * robot controller. This also allows use of active
5337 * sensors that require external power.
5338 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5339 * users to use other limit switch sensors connected to
5340 * robot controller. This also allows use of active
5341 * sensors that require external power.
5342 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5343 * LimitForwardMotion and LimitReverseMotion parameters,
5344 * instead allowing motion.
5345 *
5346 * This can be useful on mechanisms such as an
5347 * intake/feeder, where a limit switch stops motion while
5348 * intaking but should be ignored when feeding to a
5349 * shooter.
5350 *
5351 * The hardware limit faults and Forward/ReverseLimit
5352 * signals will still report the values of the limit
5353 * switches regardless of this parameter.
5354 * - UseTimesync: Set to true to delay applying this control request until a
5355 * timesync boundary (requires Phoenix Pro and CANivore). This
5356 * eliminates the impact of nondeterministic network delays in
5357 * exchange for a larger but deterministic control latency.
5358 *
5359 * This requires setting the ControlTimesyncFreqHz config in
5360 * MotorOutputConfigs. Additionally, when this is enabled, the
5361 * UpdateFreqHz of this request should be set to 0 Hz.
5362 *
5363 * \param request Control object to request of the device
5364 * \returns Status Code of the request, 0 is OK
5365 */
5367
5368 /**
5369 * \brief Request PID to target position with duty cycle feedforward.
5370 *
5371 * \details This control mode will set the motor's position setpoint
5372 * to the position specified by the user. In addition, it will apply
5373 * an additional duty cycle as an arbitrary feedforward value.
5374 *
5375 * - PositionDutyCycle Parameters:
5376 * - Position: Position to drive toward in rotations.
5377 * - Velocity: Velocity to drive toward in rotations per second. This is
5378 * typically used for motion profiles generated by the robot program.
5379 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5380 * increases peak power by ~15%. Set to false to use trapezoidal
5381 * commutation.
5382 *
5383 * FOC improves motor performance by leveraging torque (current)
5384 * control. However, this may be inconvenient for applications that
5385 * require specifying duty cycle or voltage. CTR-Electronics has
5386 * developed a hybrid method that combines the performances gains of
5387 * FOC while still allowing applications to provide duty cycle or
5388 * voltage demand. This not to be confused with simple sinusoidal
5389 * control or phase voltage control which lacks the performance
5390 * gains.
5391 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
5392 * - Slot: Select which gains are applied by selecting the slot. Use the
5393 * configuration api to set the gain values for the selected slot before
5394 * enabling this feature. Slot must be within [0,2].
5395 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5396 * is zero (or within deadband). Set to false to use
5397 * the NeutralMode configuration setting (default).
5398 * This flag exists to provide the fundamental
5399 * behavior of this control when output is zero, which
5400 * is to provide 0V to the motor.
5401 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5402 * users to use other limit switch sensors connected to
5403 * robot controller. This also allows use of active
5404 * sensors that require external power.
5405 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5406 * users to use other limit switch sensors connected to
5407 * robot controller. This also allows use of active
5408 * sensors that require external power.
5409 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5410 * LimitForwardMotion and LimitReverseMotion parameters,
5411 * instead allowing motion.
5412 *
5413 * This can be useful on mechanisms such as an
5414 * intake/feeder, where a limit switch stops motion while
5415 * intaking but should be ignored when feeding to a
5416 * shooter.
5417 *
5418 * The hardware limit faults and Forward/ReverseLimit
5419 * signals will still report the values of the limit
5420 * switches regardless of this parameter.
5421 * - UseTimesync: Set to true to delay applying this control request until a
5422 * timesync boundary (requires Phoenix Pro and CANivore). This
5423 * eliminates the impact of nondeterministic network delays in
5424 * exchange for a larger but deterministic control latency.
5425 *
5426 * This requires setting the ControlTimesyncFreqHz config in
5427 * MotorOutputConfigs. Additionally, when this is enabled, the
5428 * UpdateFreqHz of this request should be set to 0 Hz.
5429 *
5430 * \param request Control object to request of the device
5431 * \returns Status Code of the request, 0 is OK
5432 */
5434
5435 /**
5436 * \brief Request PID to target position with voltage feedforward
5437 *
5438 * \details This control mode will set the motor's position setpoint
5439 * to the position specified by the user. In addition, it will apply
5440 * an additional voltage as an arbitrary feedforward value.
5441 *
5442 * - PositionVoltage Parameters:
5443 * - Position: Position to drive toward in rotations.
5444 * - Velocity: Velocity to drive toward in rotations per second. This is
5445 * typically used for motion profiles generated by the robot program.
5446 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5447 * increases peak power by ~15%. Set to false to use trapezoidal
5448 * commutation.
5449 *
5450 * FOC improves motor performance by leveraging torque (current)
5451 * control. However, this may be inconvenient for applications that
5452 * require specifying duty cycle or voltage. CTR-Electronics has
5453 * developed a hybrid method that combines the performances gains of
5454 * FOC while still allowing applications to provide duty cycle or
5455 * voltage demand. This not to be confused with simple sinusoidal
5456 * control or phase voltage control which lacks the performance
5457 * gains.
5458 * - FeedForward: Feedforward to apply in volts
5459 * - Slot: Select which gains are applied by selecting the slot. Use the
5460 * configuration api to set the gain values for the selected slot before
5461 * enabling this feature. Slot must be within [0,2].
5462 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5463 * is zero (or within deadband). Set to false to use
5464 * the NeutralMode configuration setting (default).
5465 * This flag exists to provide the fundamental
5466 * behavior of this control when output is zero, which
5467 * is to provide 0V to the motor.
5468 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5469 * users to use other limit switch sensors connected to
5470 * robot controller. This also allows use of active
5471 * sensors that require external power.
5472 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5473 * users to use other limit switch sensors connected to
5474 * robot controller. This also allows use of active
5475 * sensors that require external power.
5476 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5477 * LimitForwardMotion and LimitReverseMotion parameters,
5478 * instead allowing motion.
5479 *
5480 * This can be useful on mechanisms such as an
5481 * intake/feeder, where a limit switch stops motion while
5482 * intaking but should be ignored when feeding to a
5483 * shooter.
5484 *
5485 * The hardware limit faults and Forward/ReverseLimit
5486 * signals will still report the values of the limit
5487 * switches regardless of this parameter.
5488 * - UseTimesync: Set to true to delay applying this control request until a
5489 * timesync boundary (requires Phoenix Pro and CANivore). This
5490 * eliminates the impact of nondeterministic network delays in
5491 * exchange for a larger but deterministic control latency.
5492 *
5493 * This requires setting the ControlTimesyncFreqHz config in
5494 * MotorOutputConfigs. Additionally, when this is enabled, the
5495 * UpdateFreqHz of this request should be set to 0 Hz.
5496 *
5497 * \param request Control object to request of the device
5498 * \returns Status Code of the request, 0 is OK
5499 */
5501
5502 /**
5503 * \brief Request PID to target velocity with duty cycle feedforward.
5504 *
5505 * \details This control mode will set the motor's velocity setpoint
5506 * to the velocity specified by the user. In addition, it will apply
5507 * an additional voltage as an arbitrary feedforward value.
5508 *
5509 * - VelocityDutyCycle Parameters:
5510 * - Velocity: Velocity to drive toward in rotations per second.
5511 * - Acceleration: Acceleration to drive toward in rotations per second squared.
5512 * This is typically used for motion profiles generated by the
5513 * robot program.
5514 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5515 * increases peak power by ~15%. Set to false to use trapezoidal
5516 * commutation.
5517 *
5518 * FOC improves motor performance by leveraging torque (current)
5519 * control. However, this may be inconvenient for applications that
5520 * require specifying duty cycle or voltage. CTR-Electronics has
5521 * developed a hybrid method that combines the performances gains of
5522 * FOC while still allowing applications to provide duty cycle or
5523 * voltage demand. This not to be confused with simple sinusoidal
5524 * control or phase voltage control which lacks the performance
5525 * gains.
5526 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
5527 * - Slot: Select which gains are applied by selecting the slot. Use the
5528 * configuration api to set the gain values for the selected slot before
5529 * enabling this feature. Slot must be within [0,2].
5530 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5531 * is zero (or within deadband). Set to false to use
5532 * the NeutralMode configuration setting (default).
5533 * This flag exists to provide the fundamental
5534 * behavior of this control when output is zero, which
5535 * is to provide 0V to the motor.
5536 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5537 * users to use other limit switch sensors connected to
5538 * robot controller. This also allows use of active
5539 * sensors that require external power.
5540 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5541 * users to use other limit switch sensors connected to
5542 * robot controller. This also allows use of active
5543 * sensors that require external power.
5544 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5545 * LimitForwardMotion and LimitReverseMotion parameters,
5546 * instead allowing motion.
5547 *
5548 * This can be useful on mechanisms such as an
5549 * intake/feeder, where a limit switch stops motion while
5550 * intaking but should be ignored when feeding to a
5551 * shooter.
5552 *
5553 * The hardware limit faults and Forward/ReverseLimit
5554 * signals will still report the values of the limit
5555 * switches regardless of this parameter.
5556 * - UseTimesync: Set to true to delay applying this control request until a
5557 * timesync boundary (requires Phoenix Pro and CANivore). This
5558 * eliminates the impact of nondeterministic network delays in
5559 * exchange for a larger but deterministic control latency.
5560 *
5561 * This requires setting the ControlTimesyncFreqHz config in
5562 * MotorOutputConfigs. Additionally, when this is enabled, the
5563 * UpdateFreqHz of this request should be set to 0 Hz.
5564 *
5565 * \param request Control object to request of the device
5566 * \returns Status Code of the request, 0 is OK
5567 */
5569
5570 /**
5571 * \brief Request PID to target velocity with voltage feedforward.
5572 *
5573 * \details This control mode will set the motor's velocity setpoint
5574 * to the velocity specified by the user. In addition, it will apply
5575 * an additional voltage as an arbitrary feedforward value.
5576 *
5577 * - VelocityVoltage Parameters:
5578 * - Velocity: Velocity to drive toward in rotations per second.
5579 * - Acceleration: Acceleration to drive toward in rotations per second squared.
5580 * This is typically used for motion profiles generated by the
5581 * robot program.
5582 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5583 * increases peak power by ~15%. Set to false to use trapezoidal
5584 * commutation.
5585 *
5586 * FOC improves motor performance by leveraging torque (current)
5587 * control. However, this may be inconvenient for applications that
5588 * require specifying duty cycle or voltage. CTR-Electronics has
5589 * developed a hybrid method that combines the performances gains of
5590 * FOC while still allowing applications to provide duty cycle or
5591 * voltage demand. This not to be confused with simple sinusoidal
5592 * control or phase voltage control which lacks the performance
5593 * gains.
5594 * - FeedForward: Feedforward to apply in volts
5595 * - Slot: Select which gains are applied by selecting the slot. Use the
5596 * configuration api to set the gain values for the selected slot before
5597 * enabling this feature. Slot must be within [0,2].
5598 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5599 * is zero (or within deadband). Set to false to use
5600 * the NeutralMode configuration setting (default).
5601 * This flag exists to provide the fundamental
5602 * behavior of this control when output is zero, which
5603 * is to provide 0V to the motor.
5604 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5605 * users to use other limit switch sensors connected to
5606 * robot controller. This also allows use of active
5607 * sensors that require external power.
5608 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5609 * users to use other limit switch sensors connected to
5610 * robot controller. This also allows use of active
5611 * sensors that require external power.
5612 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5613 * LimitForwardMotion and LimitReverseMotion parameters,
5614 * instead allowing motion.
5615 *
5616 * This can be useful on mechanisms such as an
5617 * intake/feeder, where a limit switch stops motion while
5618 * intaking but should be ignored when feeding to a
5619 * shooter.
5620 *
5621 * The hardware limit faults and Forward/ReverseLimit
5622 * signals will still report the values of the limit
5623 * switches regardless of this parameter.
5624 * - UseTimesync: Set to true to delay applying this control request until a
5625 * timesync boundary (requires Phoenix Pro and CANivore). This
5626 * eliminates the impact of nondeterministic network delays in
5627 * exchange for a larger but deterministic control latency.
5628 *
5629 * This requires setting the ControlTimesyncFreqHz config in
5630 * MotorOutputConfigs. Additionally, when this is enabled, the
5631 * UpdateFreqHz of this request should be set to 0 Hz.
5632 *
5633 * \param request Control object to request of the device
5634 * \returns Status Code of the request, 0 is OK
5635 */
5637
5638 /**
5639 * \brief Requests Motion Magic® to target a final position using a
5640 * motion profile. Users can optionally provide a duty cycle
5641 * feedforward.
5642 *
5643 * \details Motion Magic® produces a motion profile in real-time while
5644 * attempting to honor the Cruise Velocity, Acceleration, and
5645 * (optional) Jerk specified via the Motion Magic® configuration
5646 * values. This control mode does not use the Expo_kV or Expo_kA
5647 * configs.
5648 *
5649 * Target position can be changed on-the-fly and Motion Magic® will do
5650 * its best to adjust the profile. This control mode is duty cycle
5651 * based, so relevant closed-loop gains will use fractional duty cycle
5652 * for the numerator: +1.0 represents full forward output.
5653 *
5654 * - MotionMagicDutyCycle Parameters:
5655 * - Position: Position to drive toward in rotations.
5656 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5657 * increases peak power by ~15%. Set to false to use trapezoidal
5658 * commutation.
5659 *
5660 * FOC improves motor performance by leveraging torque (current)
5661 * control. However, this may be inconvenient for applications that
5662 * require specifying duty cycle or voltage. CTR-Electronics has
5663 * developed a hybrid method that combines the performances gains of
5664 * FOC while still allowing applications to provide duty cycle or
5665 * voltage demand. This not to be confused with simple sinusoidal
5666 * control or phase voltage control which lacks the performance
5667 * gains.
5668 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
5669 * - Slot: Select which gains are applied by selecting the slot. Use the
5670 * configuration api to set the gain values for the selected slot before
5671 * enabling this feature. Slot must be within [0,2].
5672 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5673 * is zero (or within deadband). Set to false to use
5674 * the NeutralMode configuration setting (default).
5675 * This flag exists to provide the fundamental
5676 * behavior of this control when output is zero, which
5677 * is to provide 0V to the motor.
5678 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5679 * users to use other limit switch sensors connected to
5680 * robot controller. This also allows use of active
5681 * sensors that require external power.
5682 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5683 * users to use other limit switch sensors connected to
5684 * robot controller. This also allows use of active
5685 * sensors that require external power.
5686 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5687 * LimitForwardMotion and LimitReverseMotion parameters,
5688 * instead allowing motion.
5689 *
5690 * This can be useful on mechanisms such as an
5691 * intake/feeder, where a limit switch stops motion while
5692 * intaking but should be ignored when feeding to a
5693 * shooter.
5694 *
5695 * The hardware limit faults and Forward/ReverseLimit
5696 * signals will still report the values of the limit
5697 * switches regardless of this parameter.
5698 * - UseTimesync: Set to true to delay applying this control request until a
5699 * timesync boundary (requires Phoenix Pro and CANivore). This
5700 * eliminates the impact of nondeterministic network delays in
5701 * exchange for a larger but deterministic control latency.
5702 *
5703 * This requires setting the ControlTimesyncFreqHz config in
5704 * MotorOutputConfigs. Additionally, when this is enabled, the
5705 * UpdateFreqHz of this request should be set to 0 Hz.
5706 *
5707 * \param request Control object to request of the device
5708 * \returns Status Code of the request, 0 is OK
5709 */
5711
5712 /**
5713 * \brief Requests Motion Magic® to target a final position using a
5714 * motion profile. Users can optionally provide a voltage
5715 * feedforward.
5716 *
5717 * \details Motion Magic® produces a motion profile in real-time while
5718 * attempting to honor the Cruise Velocity, Acceleration, and
5719 * (optional) Jerk specified via the Motion Magic® configuration
5720 * values. This control mode does not use the Expo_kV or Expo_kA
5721 * configs.
5722 *
5723 * Target position can be changed on-the-fly and Motion Magic® will do
5724 * its best to adjust the profile. This control mode is
5725 * voltage-based, so relevant closed-loop gains will use Volts for the
5726 * numerator.
5727 *
5728 * - MotionMagicVoltage Parameters:
5729 * - Position: Position to drive toward in rotations.
5730 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5731 * increases peak power by ~15%. Set to false to use trapezoidal
5732 * commutation.
5733 *
5734 * FOC improves motor performance by leveraging torque (current)
5735 * control. However, this may be inconvenient for applications that
5736 * require specifying duty cycle or voltage. CTR-Electronics has
5737 * developed a hybrid method that combines the performances gains of
5738 * FOC while still allowing applications to provide duty cycle or
5739 * voltage demand. This not to be confused with simple sinusoidal
5740 * control or phase voltage control which lacks the performance
5741 * gains.
5742 * - FeedForward: Feedforward to apply in volts
5743 * - Slot: Select which gains are applied by selecting the slot. Use the
5744 * configuration api to set the gain values for the selected slot before
5745 * enabling this feature. Slot must be within [0,2].
5746 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5747 * is zero (or within deadband). Set to false to use
5748 * the NeutralMode configuration setting (default).
5749 * This flag exists to provide the fundamental
5750 * behavior of this control when output is zero, which
5751 * is to provide 0V to the motor.
5752 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5753 * users to use other limit switch sensors connected to
5754 * robot controller. This also allows use of active
5755 * sensors that require external power.
5756 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5757 * users to use other limit switch sensors connected to
5758 * robot controller. This also allows use of active
5759 * sensors that require external power.
5760 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5761 * LimitForwardMotion and LimitReverseMotion parameters,
5762 * instead allowing motion.
5763 *
5764 * This can be useful on mechanisms such as an
5765 * intake/feeder, where a limit switch stops motion while
5766 * intaking but should be ignored when feeding to a
5767 * shooter.
5768 *
5769 * The hardware limit faults and Forward/ReverseLimit
5770 * signals will still report the values of the limit
5771 * switches regardless of this parameter.
5772 * - UseTimesync: Set to true to delay applying this control request until a
5773 * timesync boundary (requires Phoenix Pro and CANivore). This
5774 * eliminates the impact of nondeterministic network delays in
5775 * exchange for a larger but deterministic control latency.
5776 *
5777 * This requires setting the ControlTimesyncFreqHz config in
5778 * MotorOutputConfigs. Additionally, when this is enabled, the
5779 * UpdateFreqHz of this request should be set to 0 Hz.
5780 *
5781 * \param request Control object to request of the device
5782 * \returns Status Code of the request, 0 is OK
5783 */
5785
5786 /**
5787 * \brief Request a specified motor duty cycle with a differential
5788 * position closed-loop.
5789 *
5790 * \details This control mode will output a proportion of the supplied
5791 * voltage which is supplied by the user. It will also set the motor's
5792 * differential position setpoint to the specified position.
5793 *
5794 * - DifferentialDutyCycle Parameters:
5795 * - TargetOutput: Proportion of supply voltage to apply in fractional units
5796 * between -1 and +1
5797 * - DifferentialPosition: Differential position to drive towards in rotations
5798 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5799 * increases peak power by ~15%. Set to false to use trapezoidal
5800 * commutation.
5801 *
5802 * FOC improves motor performance by leveraging torque (current)
5803 * control. However, this may be inconvenient for applications that
5804 * require specifying duty cycle or voltage. CTR-Electronics has
5805 * developed a hybrid method that combines the performances gains of
5806 * FOC while still allowing applications to provide duty cycle or
5807 * voltage demand. This not to be confused with simple sinusoidal
5808 * control or phase voltage control which lacks the performance
5809 * gains.
5810 * - DifferentialSlot: Select which gains are applied to the differential
5811 * controller by selecting the slot. Use the configuration
5812 * api to set the gain values for the selected slot before
5813 * enabling this feature. Slot must be within [0,2].
5814 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5815 * is zero (or within deadband). Set to false to use
5816 * the NeutralMode configuration setting (default).
5817 * This flag exists to provide the fundamental
5818 * behavior of this control when output is zero, which
5819 * is to provide 0V to the motor.
5820 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5821 * users to use other limit switch sensors connected to
5822 * robot controller. This also allows use of active
5823 * sensors that require external power.
5824 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5825 * users to use other limit switch sensors connected to
5826 * robot controller. This also allows use of active
5827 * sensors that require external power.
5828 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5829 * LimitForwardMotion and LimitReverseMotion parameters,
5830 * instead allowing motion.
5831 *
5832 * This can be useful on mechanisms such as an
5833 * intake/feeder, where a limit switch stops motion while
5834 * intaking but should be ignored when feeding to a
5835 * shooter.
5836 *
5837 * The hardware limit faults and Forward/ReverseLimit
5838 * signals will still report the values of the limit
5839 * switches regardless of this parameter.
5840 * - UseTimesync: Set to true to delay applying this control request until a
5841 * timesync boundary (requires Phoenix Pro and CANivore). This
5842 * eliminates the impact of nondeterministic network delays in
5843 * exchange for a larger but deterministic control latency.
5844 *
5845 * This requires setting the ControlTimesyncFreqHz config in
5846 * MotorOutputConfigs. Additionally, when this is enabled, the
5847 * UpdateFreqHz of this request should be set to 0 Hz.
5848 *
5849 * \param request Control object to request of the device
5850 * \returns Status Code of the request, 0 is OK
5851 */
5853
5854 /**
5855 * \brief Request a specified voltage with a differential position
5856 * closed-loop.
5857 *
5858 * \details This control mode will attempt to apply the specified
5859 * voltage to the motor. If the supply voltage is below the requested
5860 * voltage, the motor controller will output the supply voltage. It
5861 * will also set the motor's differential position setpoint to the
5862 * specified position.
5863 *
5864 * - DifferentialVoltage Parameters:
5865 * - TargetOutput: Voltage to attempt to drive at
5866 * - DifferentialPosition: Differential position to drive towards in rotations
5867 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5868 * increases peak power by ~15%. Set to false to use trapezoidal
5869 * commutation.
5870 *
5871 * FOC improves motor performance by leveraging torque (current)
5872 * control. However, this may be inconvenient for applications that
5873 * require specifying duty cycle or voltage. CTR-Electronics has
5874 * developed a hybrid method that combines the performances gains of
5875 * FOC while still allowing applications to provide duty cycle or
5876 * voltage demand. This not to be confused with simple sinusoidal
5877 * control or phase voltage control which lacks the performance
5878 * gains.
5879 * - DifferentialSlot: Select which gains are applied to the differential
5880 * controller by selecting the slot. Use the configuration
5881 * api to set the gain values for the selected slot before
5882 * enabling this feature. Slot must be within [0,2].
5883 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5884 * is zero (or within deadband). Set to false to use
5885 * the NeutralMode configuration setting (default).
5886 * This flag exists to provide the fundamental
5887 * behavior of this control when output is zero, which
5888 * is to provide 0V to the motor.
5889 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5890 * users to use other limit switch sensors connected to
5891 * robot controller. This also allows use of active
5892 * sensors that require external power.
5893 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5894 * users to use other limit switch sensors connected to
5895 * robot controller. This also allows use of active
5896 * sensors that require external power.
5897 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5898 * LimitForwardMotion and LimitReverseMotion parameters,
5899 * instead allowing motion.
5900 *
5901 * This can be useful on mechanisms such as an
5902 * intake/feeder, where a limit switch stops motion while
5903 * intaking but should be ignored when feeding to a
5904 * shooter.
5905 *
5906 * The hardware limit faults and Forward/ReverseLimit
5907 * signals will still report the values of the limit
5908 * switches regardless of this parameter.
5909 * - UseTimesync: Set to true to delay applying this control request until a
5910 * timesync boundary (requires Phoenix Pro and CANivore). This
5911 * eliminates the impact of nondeterministic network delays in
5912 * exchange for a larger but deterministic control latency.
5913 *
5914 * This requires setting the ControlTimesyncFreqHz config in
5915 * MotorOutputConfigs. Additionally, when this is enabled, the
5916 * UpdateFreqHz of this request should be set to 0 Hz.
5917 *
5918 * \param request Control object to request of the device
5919 * \returns Status Code of the request, 0 is OK
5920 */
5922
5923 /**
5924 * \brief Request PID to target position with a differential position
5925 * setpoint.
5926 *
5927 * \details This control mode will set the motor's position setpoint
5928 * to the position specified by the user. It will also set the motor's
5929 * differential position setpoint to the specified position.
5930 *
5931 * - DifferentialPositionDutyCycle Parameters:
5932 * - TargetPosition: Average position to drive toward in rotations.
5933 * - DifferentialPosition: Differential position to drive toward in rotations.
5934 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
5935 * increases peak power by ~15%. Set to false to use trapezoidal
5936 * commutation.
5937 *
5938 * FOC improves motor performance by leveraging torque (current)
5939 * control. However, this may be inconvenient for applications that
5940 * require specifying duty cycle or voltage. CTR-Electronics has
5941 * developed a hybrid method that combines the performances gains of
5942 * FOC while still allowing applications to provide duty cycle or
5943 * voltage demand. This not to be confused with simple sinusoidal
5944 * control or phase voltage control which lacks the performance
5945 * gains.
5946 * - TargetSlot: Select which gains are applied to the primary controller by
5947 * selecting the slot. Use the configuration api to set the gain
5948 * values for the selected slot before enabling this feature. Slot
5949 * must be within [0,2].
5950 * - DifferentialSlot: Select which gains are applied to the differential
5951 * controller by selecting the slot. Use the configuration
5952 * api to set the gain values for the selected slot before
5953 * enabling this feature. Slot must be within [0,2].
5954 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
5955 * is zero (or within deadband). Set to false to use
5956 * the NeutralMode configuration setting (default).
5957 * This flag exists to provide the fundamental
5958 * behavior of this control when output is zero, which
5959 * is to provide 0V to the motor.
5960 * - LimitForwardMotion: Set to true to force forward limiting. This allows
5961 * users to use other limit switch sensors connected to
5962 * robot controller. This also allows use of active
5963 * sensors that require external power.
5964 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
5965 * users to use other limit switch sensors connected to
5966 * robot controller. This also allows use of active
5967 * sensors that require external power.
5968 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
5969 * LimitForwardMotion and LimitReverseMotion parameters,
5970 * instead allowing motion.
5971 *
5972 * This can be useful on mechanisms such as an
5973 * intake/feeder, where a limit switch stops motion while
5974 * intaking but should be ignored when feeding to a
5975 * shooter.
5976 *
5977 * The hardware limit faults and Forward/ReverseLimit
5978 * signals will still report the values of the limit
5979 * switches regardless of this parameter.
5980 * - UseTimesync: Set to true to delay applying this control request until a
5981 * timesync boundary (requires Phoenix Pro and CANivore). This
5982 * eliminates the impact of nondeterministic network delays in
5983 * exchange for a larger but deterministic control latency.
5984 *
5985 * This requires setting the ControlTimesyncFreqHz config in
5986 * MotorOutputConfigs. Additionally, when this is enabled, the
5987 * UpdateFreqHz of this request should be set to 0 Hz.
5988 *
5989 * \param request Control object to request of the device
5990 * \returns Status Code of the request, 0 is OK
5991 */
5993
5994 /**
5995 * \brief Request PID to target position with a differential position
5996 * setpoint
5997 *
5998 * \details This control mode will set the motor's position setpoint
5999 * to the position specified by the user. It will also set the motor's
6000 * differential position setpoint to the specified position.
6001 *
6002 * - DifferentialPositionVoltage Parameters:
6003 * - TargetPosition: Average position to drive toward in rotations.
6004 * - DifferentialPosition: Differential position to drive toward in rotations.
6005 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6006 * increases peak power by ~15%. Set to false to use trapezoidal
6007 * commutation.
6008 *
6009 * FOC improves motor performance by leveraging torque (current)
6010 * control. However, this may be inconvenient for applications that
6011 * require specifying duty cycle or voltage. CTR-Electronics has
6012 * developed a hybrid method that combines the performances gains of
6013 * FOC while still allowing applications to provide duty cycle or
6014 * voltage demand. This not to be confused with simple sinusoidal
6015 * control or phase voltage control which lacks the performance
6016 * gains.
6017 * - TargetSlot: Select which gains are applied to the primary controller by
6018 * selecting the slot. Use the configuration api to set the gain
6019 * values for the selected slot before enabling this feature. Slot
6020 * must be within [0,2].
6021 * - DifferentialSlot: Select which gains are applied to the differential
6022 * controller by selecting the slot. Use the configuration
6023 * api to set the gain values for the selected slot before
6024 * enabling this feature. Slot must be within [0,2].
6025 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6026 * is zero (or within deadband). Set to false to use
6027 * the NeutralMode configuration setting (default).
6028 * This flag exists to provide the fundamental
6029 * behavior of this control when output is zero, which
6030 * is to provide 0V to the motor.
6031 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6032 * users to use other limit switch sensors connected to
6033 * robot controller. This also allows use of active
6034 * sensors that require external power.
6035 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6036 * users to use other limit switch sensors connected to
6037 * robot controller. This also allows use of active
6038 * sensors that require external power.
6039 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6040 * LimitForwardMotion and LimitReverseMotion parameters,
6041 * instead allowing motion.
6042 *
6043 * This can be useful on mechanisms such as an
6044 * intake/feeder, where a limit switch stops motion while
6045 * intaking but should be ignored when feeding to a
6046 * shooter.
6047 *
6048 * The hardware limit faults and Forward/ReverseLimit
6049 * signals will still report the values of the limit
6050 * switches regardless of this parameter.
6051 * - UseTimesync: Set to true to delay applying this control request until a
6052 * timesync boundary (requires Phoenix Pro and CANivore). This
6053 * eliminates the impact of nondeterministic network delays in
6054 * exchange for a larger but deterministic control latency.
6055 *
6056 * This requires setting the ControlTimesyncFreqHz config in
6057 * MotorOutputConfigs. Additionally, when this is enabled, the
6058 * UpdateFreqHz of this request should be set to 0 Hz.
6059 *
6060 * \param request Control object to request of the device
6061 * \returns Status Code of the request, 0 is OK
6062 */
6064
6065 /**
6066 * \brief Request PID to target velocity with a differential position
6067 * setpoint.
6068 *
6069 * \details This control mode will set the motor's velocity setpoint
6070 * to the velocity specified by the user. It will also set the motor's
6071 * differential position setpoint to the specified position.
6072 *
6073 * - DifferentialVelocityDutyCycle Parameters:
6074 * - TargetVelocity: Average velocity to drive toward in rotations per second.
6075 * - DifferentialPosition: Differential position to drive toward in rotations.
6076 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6077 * increases peak power by ~15%. Set to false to use trapezoidal
6078 * commutation.
6079 *
6080 * FOC improves motor performance by leveraging torque (current)
6081 * control. However, this may be inconvenient for applications that
6082 * require specifying duty cycle or voltage. CTR-Electronics has
6083 * developed a hybrid method that combines the performances gains of
6084 * FOC while still allowing applications to provide duty cycle or
6085 * voltage demand. This not to be confused with simple sinusoidal
6086 * control or phase voltage control which lacks the performance
6087 * gains.
6088 * - TargetSlot: Select which gains are applied to the primary controller by
6089 * selecting the slot. Use the configuration api to set the gain
6090 * values for the selected slot before enabling this feature. Slot
6091 * must be within [0,2].
6092 * - DifferentialSlot: Select which gains are applied to the differential
6093 * controller by selecting the slot. Use the configuration
6094 * api to set the gain values for the selected slot before
6095 * enabling this feature. Slot must be within [0,2].
6096 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6097 * is zero (or within deadband). Set to false to use
6098 * the NeutralMode configuration setting (default).
6099 * This flag exists to provide the fundamental
6100 * behavior of this control when output is zero, which
6101 * is to provide 0V to the motor.
6102 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6103 * users to use other limit switch sensors connected to
6104 * robot controller. This also allows use of active
6105 * sensors that require external power.
6106 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6107 * users to use other limit switch sensors connected to
6108 * robot controller. This also allows use of active
6109 * sensors that require external power.
6110 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6111 * LimitForwardMotion and LimitReverseMotion parameters,
6112 * instead allowing motion.
6113 *
6114 * This can be useful on mechanisms such as an
6115 * intake/feeder, where a limit switch stops motion while
6116 * intaking but should be ignored when feeding to a
6117 * shooter.
6118 *
6119 * The hardware limit faults and Forward/ReverseLimit
6120 * signals will still report the values of the limit
6121 * switches regardless of this parameter.
6122 * - UseTimesync: Set to true to delay applying this control request until a
6123 * timesync boundary (requires Phoenix Pro and CANivore). This
6124 * eliminates the impact of nondeterministic network delays in
6125 * exchange for a larger but deterministic control latency.
6126 *
6127 * This requires setting the ControlTimesyncFreqHz config in
6128 * MotorOutputConfigs. Additionally, when this is enabled, the
6129 * UpdateFreqHz of this request should be set to 0 Hz.
6130 *
6131 * \param request Control object to request of the device
6132 * \returns Status Code of the request, 0 is OK
6133 */
6135
6136 /**
6137 * \brief Request PID to target velocity with a differential position
6138 * setpoint.
6139 *
6140 * \details This control mode will set the motor's velocity setpoint
6141 * to the velocity specified by the user. It will also set the motor's
6142 * differential position setpoint to the specified position.
6143 *
6144 * - DifferentialVelocityVoltage Parameters:
6145 * - TargetVelocity: Average velocity to drive toward in rotations per second.
6146 * - DifferentialPosition: Differential position to drive toward in rotations.
6147 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6148 * increases peak power by ~15%. Set to false to use trapezoidal
6149 * commutation.
6150 *
6151 * FOC improves motor performance by leveraging torque (current)
6152 * control. However, this may be inconvenient for applications that
6153 * require specifying duty cycle or voltage. CTR-Electronics has
6154 * developed a hybrid method that combines the performances gains of
6155 * FOC while still allowing applications to provide duty cycle or
6156 * voltage demand. This not to be confused with simple sinusoidal
6157 * control or phase voltage control which lacks the performance
6158 * gains.
6159 * - TargetSlot: Select which gains are applied to the primary controller by
6160 * selecting the slot. Use the configuration api to set the gain
6161 * values for the selected slot before enabling this feature. Slot
6162 * must be within [0,2].
6163 * - DifferentialSlot: Select which gains are applied to the differential
6164 * controller by selecting the slot. Use the configuration
6165 * api to set the gain values for the selected slot before
6166 * enabling this feature. Slot must be within [0,2].
6167 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6168 * is zero (or within deadband). Set to false to use
6169 * the NeutralMode configuration setting (default).
6170 * This flag exists to provide the fundamental
6171 * behavior of this control when output is zero, which
6172 * is to provide 0V to the motor.
6173 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6174 * users to use other limit switch sensors connected to
6175 * robot controller. This also allows use of active
6176 * sensors that require external power.
6177 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6178 * users to use other limit switch sensors connected to
6179 * robot controller. This also allows use of active
6180 * sensors that require external power.
6181 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6182 * LimitForwardMotion and LimitReverseMotion parameters,
6183 * instead allowing motion.
6184 *
6185 * This can be useful on mechanisms such as an
6186 * intake/feeder, where a limit switch stops motion while
6187 * intaking but should be ignored when feeding to a
6188 * shooter.
6189 *
6190 * The hardware limit faults and Forward/ReverseLimit
6191 * signals will still report the values of the limit
6192 * switches regardless of this parameter.
6193 * - UseTimesync: Set to true to delay applying this control request until a
6194 * timesync boundary (requires Phoenix Pro and CANivore). This
6195 * eliminates the impact of nondeterministic network delays in
6196 * exchange for a larger but deterministic control latency.
6197 *
6198 * This requires setting the ControlTimesyncFreqHz config in
6199 * MotorOutputConfigs. Additionally, when this is enabled, the
6200 * UpdateFreqHz of this request should be set to 0 Hz.
6201 *
6202 * \param request Control object to request of the device
6203 * \returns Status Code of the request, 0 is OK
6204 */
6206
6207 /**
6208 * \brief Requests Motion Magic® to target a final position using a
6209 * motion profile, and PID to a differential position setpoint.
6210 *
6211 * \details Motion Magic® produces a motion profile in real-time while
6212 * attempting to honor the Cruise Velocity, Acceleration, and
6213 * (optional) Jerk specified via the Motion Magic® configuration
6214 * values. This control mode does not use the Expo_kV or Expo_kA
6215 * configs.
6216 *
6217 * Target position can be changed on-the-fly and Motion Magic® will do
6218 * its best to adjust the profile. This control mode is duty cycle
6219 * based, so relevant closed-loop gains will use fractional duty cycle
6220 * for the numerator: +1.0 represents full forward output.
6221 *
6222 * - DifferentialMotionMagicDutyCycle Parameters:
6223 * - TargetPosition: Average position to drive toward in rotations.
6224 * - DifferentialPosition: Differential position to drive toward in rotations.
6225 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6226 * increases peak power by ~15%. Set to false to use trapezoidal
6227 * commutation.
6228 *
6229 * FOC improves motor performance by leveraging torque (current)
6230 * control. However, this may be inconvenient for applications that
6231 * require specifying duty cycle or voltage. CTR-Electronics has
6232 * developed a hybrid method that combines the performances gains of
6233 * FOC while still allowing applications to provide duty cycle or
6234 * voltage demand. This not to be confused with simple sinusoidal
6235 * control or phase voltage control which lacks the performance
6236 * gains.
6237 * - TargetSlot: Select which gains are applied to the primary controller by
6238 * selecting the slot. Use the configuration api to set the gain
6239 * values for the selected slot before enabling this feature. Slot
6240 * must be within [0,2].
6241 * - DifferentialSlot: Select which gains are applied to the differential
6242 * controller by selecting the slot. Use the configuration
6243 * api to set the gain values for the selected slot before
6244 * enabling this feature. Slot must be within [0,2].
6245 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6246 * is zero (or within deadband). Set to false to use
6247 * the NeutralMode configuration setting (default).
6248 * This flag exists to provide the fundamental
6249 * behavior of this control when output is zero, which
6250 * is to provide 0V to the motor.
6251 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6252 * users to use other limit switch sensors connected to
6253 * robot controller. This also allows use of active
6254 * sensors that require external power.
6255 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6256 * users to use other limit switch sensors connected to
6257 * robot controller. This also allows use of active
6258 * sensors that require external power.
6259 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6260 * LimitForwardMotion and LimitReverseMotion parameters,
6261 * instead allowing motion.
6262 *
6263 * This can be useful on mechanisms such as an
6264 * intake/feeder, where a limit switch stops motion while
6265 * intaking but should be ignored when feeding to a
6266 * shooter.
6267 *
6268 * The hardware limit faults and Forward/ReverseLimit
6269 * signals will still report the values of the limit
6270 * switches regardless of this parameter.
6271 * - UseTimesync: Set to true to delay applying this control request until a
6272 * timesync boundary (requires Phoenix Pro and CANivore). This
6273 * eliminates the impact of nondeterministic network delays in
6274 * exchange for a larger but deterministic control latency.
6275 *
6276 * This requires setting the ControlTimesyncFreqHz config in
6277 * MotorOutputConfigs. Additionally, when this is enabled, the
6278 * UpdateFreqHz of this request should be set to 0 Hz.
6279 *
6280 * \param request Control object to request of the device
6281 * \returns Status Code of the request, 0 is OK
6282 */
6284
6285 /**
6286 * \brief Requests Motion Magic® to target a final position using a
6287 * motion profile, and PID to a differential position setpoint.
6288 *
6289 * \details Motion Magic® produces a motion profile in real-time while
6290 * attempting to honor the Cruise Velocity, Acceleration, and
6291 * (optional) Jerk specified via the Motion Magic® configuration
6292 * values. This control mode does not use the Expo_kV or Expo_kA
6293 * configs.
6294 *
6295 * Target position can be changed on-the-fly and Motion Magic® will do
6296 * its best to adjust the profile. This control mode is
6297 * voltage-based, so relevant closed-loop gains will use Volts for the
6298 * numerator.
6299 *
6300 * - DifferentialMotionMagicVoltage Parameters:
6301 * - TargetPosition: Average position to drive toward in rotations.
6302 * - DifferentialPosition: Differential position to drive toward in rotations.
6303 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6304 * increases peak power by ~15%. Set to false to use trapezoidal
6305 * commutation.
6306 *
6307 * FOC improves motor performance by leveraging torque (current)
6308 * control. However, this may be inconvenient for applications that
6309 * require specifying duty cycle or voltage. CTR-Electronics has
6310 * developed a hybrid method that combines the performances gains of
6311 * FOC while still allowing applications to provide duty cycle or
6312 * voltage demand. This not to be confused with simple sinusoidal
6313 * control or phase voltage control which lacks the performance
6314 * gains.
6315 * - TargetSlot: Select which gains are applied to the primary controller by
6316 * selecting the slot. Use the configuration api to set the gain
6317 * values for the selected slot before enabling this feature. Slot
6318 * must be within [0,2].
6319 * - DifferentialSlot: Select which gains are applied to the differential
6320 * controller by selecting the slot. Use the configuration
6321 * api to set the gain values for the selected slot before
6322 * enabling this feature. Slot must be within [0,2].
6323 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6324 * is zero (or within deadband). Set to false to use
6325 * the NeutralMode configuration setting (default).
6326 * This flag exists to provide the fundamental
6327 * behavior of this control when output is zero, which
6328 * is to provide 0V to the motor.
6329 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6330 * users to use other limit switch sensors connected to
6331 * robot controller. This also allows use of active
6332 * sensors that require external power.
6333 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6334 * users to use other limit switch sensors connected to
6335 * robot controller. This also allows use of active
6336 * sensors that require external power.
6337 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6338 * LimitForwardMotion and LimitReverseMotion parameters,
6339 * instead allowing motion.
6340 *
6341 * This can be useful on mechanisms such as an
6342 * intake/feeder, where a limit switch stops motion while
6343 * intaking but should be ignored when feeding to a
6344 * shooter.
6345 *
6346 * The hardware limit faults and Forward/ReverseLimit
6347 * signals will still report the values of the limit
6348 * switches regardless of this parameter.
6349 * - UseTimesync: Set to true to delay applying this control request until a
6350 * timesync boundary (requires Phoenix Pro and CANivore). This
6351 * eliminates the impact of nondeterministic network delays in
6352 * exchange for a larger but deterministic control latency.
6353 *
6354 * This requires setting the ControlTimesyncFreqHz config in
6355 * MotorOutputConfigs. Additionally, when this is enabled, the
6356 * UpdateFreqHz of this request should be set to 0 Hz.
6357 *
6358 * \param request Control object to request of the device
6359 * \returns Status Code of the request, 0 is OK
6360 */
6362
6363 /**
6364 * \brief Follow the motor output of another Talon.
6365 *
6366 * \details If Talon is in torque control, the torque is copied -
6367 * which will increase the total torque applied. If Talon is in
6368 * percent supply output control, the duty cycle is matched. Motor
6369 * direction either matches master's configured direction or opposes
6370 * it based on OpposeMasterDirection.
6371 *
6372 * - Follower Parameters:
6373 * - MasterID: Device ID of the master to follow.
6374 * - OpposeMasterDirection: Set to false for motor invert to match the master's
6375 * configured Invert - which is typical when master and
6376 * follower are mechanically linked and spin in the same
6377 * direction. Set to true for motor invert to oppose
6378 * the master's configured Invert - this is typical
6379 * where the the master and follower mechanically spin
6380 * in opposite directions.
6381 *
6382 * \param request Control object to request of the device
6383 * \returns Status Code of the request, 0 is OK
6384 */
6386
6387 /**
6388 * \brief Follow the motor output of another Talon while ignoring the
6389 * master's invert setting.
6390 *
6391 * \details If Talon is in torque control, the torque is copied -
6392 * which will increase the total torque applied. If Talon is in
6393 * percent supply output control, the duty cycle is matched. Motor
6394 * direction is strictly determined by the configured invert and not
6395 * the master. If you want motor direction to match or oppose the
6396 * master, use FollowerRequest instead.
6397 *
6398 * - StrictFollower Parameters:
6399 * - MasterID: Device ID of the master to follow.
6400 *
6401 * \param request Control object to request of the device
6402 * \returns Status Code of the request, 0 is OK
6403 */
6405
6406 /**
6407 * \brief Follow the differential motor output of another Talon.
6408 *
6409 * \details If Talon is in torque control, the torque is copied -
6410 * which will increase the total torque applied. If Talon is in
6411 * percent supply output control, the duty cycle is matched. Motor
6412 * direction either matches master's configured direction or opposes
6413 * it based on OpposeMasterDirection.
6414 *
6415 * - DifferentialFollower Parameters:
6416 * - MasterID: Device ID of the differential master to follow.
6417 * - OpposeMasterDirection: Set to false for motor invert to match the master's
6418 * configured Invert - which is typical when master and
6419 * follower are mechanically linked and spin in the same
6420 * direction. Set to true for motor invert to oppose
6421 * the master's configured Invert - this is typical
6422 * where the the master and follower mechanically spin
6423 * in opposite directions.
6424 *
6425 * \param request Control object to request of the device
6426 * \returns Status Code of the request, 0 is OK
6427 */
6429
6430 /**
6431 * \brief Follow the differential motor output of another Talon while
6432 * ignoring the master's invert setting.
6433 *
6434 * \details If Talon is in torque control, the torque is copied -
6435 * which will increase the total torque applied. If Talon is in
6436 * percent supply output control, the duty cycle is matched. Motor
6437 * direction is strictly determined by the configured invert and not
6438 * the master. If you want motor direction to match or oppose the
6439 * master, use FollowerRequest instead.
6440 *
6441 * - DifferentialStrictFollower Parameters:
6442 * - MasterID: Device ID of the differential master to follow.
6443 *
6444 * \param request Control object to request of the device
6445 * \returns Status Code of the request, 0 is OK
6446 */
6448
6449 /**
6450 * \brief Request neutral output of actuator. The applied brake type
6451 * is determined by the NeutralMode configuration.
6452 *
6453 * - NeutralOut Parameters:
6454 * - UseTimesync: Set to true to delay applying this control request until a
6455 * timesync boundary (requires Phoenix Pro and CANivore). This
6456 * eliminates the impact of nondeterministic network delays in
6457 * exchange for a larger but deterministic control latency.
6458 *
6459 * This requires setting the ControlTimesyncFreqHz config in
6460 * MotorOutputConfigs. Additionally, when this is enabled, the
6461 * UpdateFreqHz of this request should be set to 0 Hz.
6462 *
6463 * \param request Control object to request of the device
6464 * \returns Status Code of the request, 0 is OK
6465 */
6467
6468 /**
6469 * \brief Request coast neutral output of actuator. The bridge is
6470 * disabled and the rotor is allowed to coast.
6471 *
6472 * - CoastOut Parameters:
6473 * - UseTimesync: Set to true to delay applying this control request until a
6474 * timesync boundary (requires Phoenix Pro and CANivore). This
6475 * eliminates the impact of nondeterministic network delays in
6476 * exchange for a larger but deterministic control latency.
6477 *
6478 * This requires setting the ControlTimesyncFreqHz config in
6479 * MotorOutputConfigs. Additionally, when this is enabled, the
6480 * UpdateFreqHz of this request should be set to 0 Hz.
6481 *
6482 * \param request Control object to request of the device
6483 * \returns Status Code of the request, 0 is OK
6484 */
6486
6487 /**
6488 * \brief Applies full neutral-brake by shorting motor leads together.
6489 *
6490 * - StaticBrake Parameters:
6491 * - UseTimesync: Set to true to delay applying this control request until a
6492 * timesync boundary (requires Phoenix Pro and CANivore). This
6493 * eliminates the impact of nondeterministic network delays in
6494 * exchange for a larger but deterministic control latency.
6495 *
6496 * This requires setting the ControlTimesyncFreqHz config in
6497 * MotorOutputConfigs. Additionally, when this is enabled, the
6498 * UpdateFreqHz of this request should be set to 0 Hz.
6499 *
6500 * \param request Control object to request of the device
6501 * \returns Status Code of the request, 0 is OK
6502 */
6504
6505 /**
6506 * \brief Requests Motion Magic® to target a final velocity using a
6507 * motion profile. This allows smooth transitions between velocity
6508 * set points. Users can optionally provide a duty cycle feedforward.
6509 *
6510 * \details Motion Magic® Velocity produces a motion profile in
6511 * real-time while attempting to honor the specified Acceleration and
6512 * (optional) Jerk. This control mode does not use the
6513 * CruiseVelocity, Expo_kV, or Expo_kA configs.
6514 *
6515 * If the specified acceleration is zero, the Acceleration under
6516 * Motion Magic® configuration parameter is used instead. This allows
6517 * for runtime adjustment of acceleration for advanced users. Jerk is
6518 * also specified in the Motion Magic® persistent configuration
6519 * values. If Jerk is set to zero, Motion Magic® will produce a
6520 * trapezoidal acceleration profile.
6521 *
6522 * Target velocity can also be changed on-the-fly and Motion Magic®
6523 * will do its best to adjust the profile. This control mode is duty
6524 * cycle based, so relevant closed-loop gains will use fractional duty
6525 * cycle for the numerator: +1.0 represents full forward output.
6526 *
6527 * - MotionMagicVelocityDutyCycle Parameters:
6528 * - Velocity: Target velocity to drive toward in rotations per second. This can
6529 * be changed on-the fly.
6530 * - Acceleration: This is the absolute Acceleration to use generating the
6531 * profile. If this parameter is zero, the Acceleration
6532 * persistent configuration parameter is used instead.
6533 * Acceleration is in rotations per second squared. If nonzero,
6534 * the signage does not matter as the absolute value is used.
6535 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6536 * increases peak power by ~15%. Set to false to use trapezoidal
6537 * commutation.
6538 *
6539 * FOC improves motor performance by leveraging torque (current)
6540 * control. However, this may be inconvenient for applications that
6541 * require specifying duty cycle or voltage. CTR-Electronics has
6542 * developed a hybrid method that combines the performances gains of
6543 * FOC while still allowing applications to provide duty cycle or
6544 * voltage demand. This not to be confused with simple sinusoidal
6545 * control or phase voltage control which lacks the performance
6546 * gains.
6547 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
6548 * - Slot: Select which gains are applied by selecting the slot. Use the
6549 * configuration api to set the gain values for the selected slot before
6550 * enabling this feature. Slot must be within [0,2].
6551 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6552 * is zero (or within deadband). Set to false to use
6553 * the NeutralMode configuration setting (default).
6554 * This flag exists to provide the fundamental
6555 * behavior of this control when output is zero, which
6556 * is to provide 0V to the motor.
6557 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6558 * users to use other limit switch sensors connected to
6559 * robot controller. This also allows use of active
6560 * sensors that require external power.
6561 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6562 * users to use other limit switch sensors connected to
6563 * robot controller. This also allows use of active
6564 * sensors that require external power.
6565 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6566 * LimitForwardMotion and LimitReverseMotion parameters,
6567 * instead allowing motion.
6568 *
6569 * This can be useful on mechanisms such as an
6570 * intake/feeder, where a limit switch stops motion while
6571 * intaking but should be ignored when feeding to a
6572 * shooter.
6573 *
6574 * The hardware limit faults and Forward/ReverseLimit
6575 * signals will still report the values of the limit
6576 * switches regardless of this parameter.
6577 * - UseTimesync: Set to true to delay applying this control request until a
6578 * timesync boundary (requires Phoenix Pro and CANivore). This
6579 * eliminates the impact of nondeterministic network delays in
6580 * exchange for a larger but deterministic control latency.
6581 *
6582 * This requires setting the ControlTimesyncFreqHz config in
6583 * MotorOutputConfigs. Additionally, when this is enabled, the
6584 * UpdateFreqHz of this request should be set to 0 Hz.
6585 *
6586 * \param request Control object to request of the device
6587 * \returns Status Code of the request, 0 is OK
6588 */
6590
6591 /**
6592 * \brief Requests Motion Magic® to target a final velocity using a
6593 * motion profile. This allows smooth transitions between velocity
6594 * set points. Users can optionally provide a voltage feedforward.
6595 *
6596 * \details Motion Magic® Velocity produces a motion profile in
6597 * real-time while attempting to honor the specified Acceleration and
6598 * (optional) Jerk. This control mode does not use the
6599 * CruiseVelocity, Expo_kV, or Expo_kA configs.
6600 *
6601 * If the specified acceleration is zero, the Acceleration under
6602 * Motion Magic® configuration parameter is used instead. This allows
6603 * for runtime adjustment of acceleration for advanced users. Jerk is
6604 * also specified in the Motion Magic® persistent configuration
6605 * values. If Jerk is set to zero, Motion Magic® will produce a
6606 * trapezoidal acceleration profile.
6607 *
6608 * Target velocity can also be changed on-the-fly and Motion Magic®
6609 * will do its best to adjust the profile. This control mode is
6610 * voltage-based, so relevant closed-loop gains will use Volts for the
6611 * numerator.
6612 *
6613 * - MotionMagicVelocityVoltage Parameters:
6614 * - Velocity: Target velocity to drive toward in rotations per second. This can
6615 * be changed on-the fly.
6616 * - Acceleration: This is the absolute Acceleration to use generating the
6617 * profile. If this parameter is zero, the Acceleration
6618 * persistent configuration parameter is used instead.
6619 * Acceleration is in rotations per second squared. If nonzero,
6620 * the signage does not matter as the absolute value is used.
6621 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6622 * increases peak power by ~15%. Set to false to use trapezoidal
6623 * commutation.
6624 *
6625 * FOC improves motor performance by leveraging torque (current)
6626 * control. However, this may be inconvenient for applications that
6627 * require specifying duty cycle or voltage. CTR-Electronics has
6628 * developed a hybrid method that combines the performances gains of
6629 * FOC while still allowing applications to provide duty cycle or
6630 * voltage demand. This not to be confused with simple sinusoidal
6631 * control or phase voltage control which lacks the performance
6632 * gains.
6633 * - FeedForward: Feedforward to apply in volts
6634 * - Slot: Select which gains are applied by selecting the slot. Use the
6635 * configuration api to set the gain values for the selected slot before
6636 * enabling this feature. Slot must be within [0,2].
6637 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6638 * is zero (or within deadband). Set to false to use
6639 * the NeutralMode configuration setting (default).
6640 * This flag exists to provide the fundamental
6641 * behavior of this control when output is zero, which
6642 * is to provide 0V to the motor.
6643 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6644 * users to use other limit switch sensors connected to
6645 * robot controller. This also allows use of active
6646 * sensors that require external power.
6647 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6648 * users to use other limit switch sensors connected to
6649 * robot controller. This also allows use of active
6650 * sensors that require external power.
6651 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6652 * LimitForwardMotion and LimitReverseMotion parameters,
6653 * instead allowing motion.
6654 *
6655 * This can be useful on mechanisms such as an
6656 * intake/feeder, where a limit switch stops motion while
6657 * intaking but should be ignored when feeding to a
6658 * shooter.
6659 *
6660 * The hardware limit faults and Forward/ReverseLimit
6661 * signals will still report the values of the limit
6662 * switches regardless of this parameter.
6663 * - UseTimesync: Set to true to delay applying this control request until a
6664 * timesync boundary (requires Phoenix Pro and CANivore). This
6665 * eliminates the impact of nondeterministic network delays in
6666 * exchange for a larger but deterministic control latency.
6667 *
6668 * This requires setting the ControlTimesyncFreqHz config in
6669 * MotorOutputConfigs. Additionally, when this is enabled, the
6670 * UpdateFreqHz of this request should be set to 0 Hz.
6671 *
6672 * \param request Control object to request of the device
6673 * \returns Status Code of the request, 0 is OK
6674 */
6676
6677 /**
6678 * \brief Requests Motion Magic® to target a final position using an
6679 * exponential motion profile. Users can optionally provide a duty
6680 * cycle feedforward.
6681 *
6682 * \details Motion Magic® Expo produces a motion profile in real-time
6683 * while attempting to honor the Cruise Velocity (optional) and the
6684 * mechanism kV and kA, specified via the Motion Magic® configuration
6685 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA
6686 * configs are always in output units of Volts.
6687 *
6688 * Setting Cruise Velocity to 0 will allow the profile to run to the
6689 * max possible velocity based on Expo_kV. This control mode does not
6690 * use the Acceleration or Jerk configs.
6691 *
6692 * Target position can be changed on-the-fly and Motion Magic® will do
6693 * its best to adjust the profile. This control mode is duty cycle
6694 * based, so relevant closed-loop gains will use fractional duty cycle
6695 * for the numerator: +1.0 represents full forward output.
6696 *
6697 * - MotionMagicExpoDutyCycle Parameters:
6698 * - Position: Position to drive toward in rotations.
6699 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6700 * increases peak power by ~15%. Set to false to use trapezoidal
6701 * commutation.
6702 *
6703 * FOC improves motor performance by leveraging torque (current)
6704 * control. However, this may be inconvenient for applications that
6705 * require specifying duty cycle or voltage. CTR-Electronics has
6706 * developed a hybrid method that combines the performances gains of
6707 * FOC while still allowing applications to provide duty cycle or
6708 * voltage demand. This not to be confused with simple sinusoidal
6709 * control or phase voltage control which lacks the performance
6710 * gains.
6711 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
6712 * - Slot: Select which gains are applied by selecting the slot. Use the
6713 * configuration api to set the gain values for the selected slot before
6714 * enabling this feature. Slot must be within [0,2].
6715 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6716 * is zero (or within deadband). Set to false to use
6717 * the NeutralMode configuration setting (default).
6718 * This flag exists to provide the fundamental
6719 * behavior of this control when output is zero, which
6720 * is to provide 0V to the motor.
6721 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6722 * users to use other limit switch sensors connected to
6723 * robot controller. This also allows use of active
6724 * sensors that require external power.
6725 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6726 * users to use other limit switch sensors connected to
6727 * robot controller. This also allows use of active
6728 * sensors that require external power.
6729 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6730 * LimitForwardMotion and LimitReverseMotion parameters,
6731 * instead allowing motion.
6732 *
6733 * This can be useful on mechanisms such as an
6734 * intake/feeder, where a limit switch stops motion while
6735 * intaking but should be ignored when feeding to a
6736 * shooter.
6737 *
6738 * The hardware limit faults and Forward/ReverseLimit
6739 * signals will still report the values of the limit
6740 * switches regardless of this parameter.
6741 * - UseTimesync: Set to true to delay applying this control request until a
6742 * timesync boundary (requires Phoenix Pro and CANivore). This
6743 * eliminates the impact of nondeterministic network delays in
6744 * exchange for a larger but deterministic control latency.
6745 *
6746 * This requires setting the ControlTimesyncFreqHz config in
6747 * MotorOutputConfigs. Additionally, when this is enabled, the
6748 * UpdateFreqHz of this request should be set to 0 Hz.
6749 *
6750 * \param request Control object to request of the device
6751 * \returns Status Code of the request, 0 is OK
6752 */
6754
6755 /**
6756 * \brief Requests Motion Magic® to target a final position using an
6757 * exponential motion profile. Users can optionally provide a voltage
6758 * feedforward.
6759 *
6760 * \details Motion Magic® Expo produces a motion profile in real-time
6761 * while attempting to honor the Cruise Velocity (optional) and the
6762 * mechanism kV and kA, specified via the Motion Magic® configuration
6763 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA
6764 * configs are always in output units of Volts.
6765 *
6766 * Setting Cruise Velocity to 0 will allow the profile to run to the
6767 * max possible velocity based on Expo_kV. This control mode does not
6768 * use the Acceleration or Jerk configs.
6769 *
6770 * Target position can be changed on-the-fly and Motion Magic® will do
6771 * its best to adjust the profile. This control mode is
6772 * voltage-based, so relevant closed-loop gains will use Volts for the
6773 * numerator.
6774 *
6775 * - MotionMagicExpoVoltage Parameters:
6776 * - Position: Position to drive toward in rotations.
6777 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6778 * increases peak power by ~15%. Set to false to use trapezoidal
6779 * commutation.
6780 *
6781 * FOC improves motor performance by leveraging torque (current)
6782 * control. However, this may be inconvenient for applications that
6783 * require specifying duty cycle or voltage. CTR-Electronics has
6784 * developed a hybrid method that combines the performances gains of
6785 * FOC while still allowing applications to provide duty cycle or
6786 * voltage demand. This not to be confused with simple sinusoidal
6787 * control or phase voltage control which lacks the performance
6788 * gains.
6789 * - FeedForward: Feedforward to apply in volts
6790 * - Slot: Select which gains are applied by selecting the slot. Use the
6791 * configuration api to set the gain values for the selected slot before
6792 * enabling this feature. Slot must be within [0,2].
6793 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6794 * is zero (or within deadband). Set to false to use
6795 * the NeutralMode configuration setting (default).
6796 * This flag exists to provide the fundamental
6797 * behavior of this control when output is zero, which
6798 * is to provide 0V to the motor.
6799 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6800 * users to use other limit switch sensors connected to
6801 * robot controller. This also allows use of active
6802 * sensors that require external power.
6803 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6804 * users to use other limit switch sensors connected to
6805 * robot controller. This also allows use of active
6806 * sensors that require external power.
6807 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6808 * LimitForwardMotion and LimitReverseMotion parameters,
6809 * instead allowing motion.
6810 *
6811 * This can be useful on mechanisms such as an
6812 * intake/feeder, where a limit switch stops motion while
6813 * intaking but should be ignored when feeding to a
6814 * shooter.
6815 *
6816 * The hardware limit faults and Forward/ReverseLimit
6817 * signals will still report the values of the limit
6818 * switches regardless of this parameter.
6819 * - UseTimesync: Set to true to delay applying this control request until a
6820 * timesync boundary (requires Phoenix Pro and CANivore). This
6821 * eliminates the impact of nondeterministic network delays in
6822 * exchange for a larger but deterministic control latency.
6823 *
6824 * This requires setting the ControlTimesyncFreqHz config in
6825 * MotorOutputConfigs. Additionally, when this is enabled, the
6826 * UpdateFreqHz of this request should be set to 0 Hz.
6827 *
6828 * \param request Control object to request of the device
6829 * \returns Status Code of the request, 0 is OK
6830 */
6832
6833 /**
6834 * \brief Requests Motion Magic® to target a final position using a
6835 * motion profile. This dynamic request allows runtime changes to
6836 * Cruise Velocity, Acceleration, and Jerk. Users can optionally
6837 * provide a duty cycle feedforward. This control requires use of a
6838 * CANivore.
6839 *
6840 * \details Motion Magic® produces a motion profile in real-time while
6841 * attempting to honor the specified Cruise Velocity, Acceleration,
6842 * and (optional) Jerk. This control mode does not use the Expo_kV or
6843 * Expo_kA configs.
6844 *
6845 * Target position can be changed on-the-fly and Motion Magic® will do
6846 * its best to adjust the profile. This control mode is duty cycle
6847 * based, so relevant closed-loop gains will use fractional duty cycle
6848 * for the numerator: +1.0 represents full forward output.
6849 *
6850 * - DynamicMotionMagicDutyCycle Parameters:
6851 * - Position: Position to drive toward in rotations.
6852 * - Velocity: Cruise velocity for profiling. The signage does not matter as the
6853 * device will use the absolute value for profile generation.
6854 * - Acceleration: Acceleration for profiling. The signage does not matter as
6855 * the device will use the absolute value for profile generation
6856 * - Jerk: Jerk for profiling. The signage does not matter as the device will
6857 * use the absolute value for profile generation.
6858 *
6859 * Jerk is optional; if this is set to zero, then Motion Magic® will not
6860 * apply a Jerk limit.
6861 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6862 * increases peak power by ~15%. Set to false to use trapezoidal
6863 * commutation.
6864 *
6865 * FOC improves motor performance by leveraging torque (current)
6866 * control. However, this may be inconvenient for applications that
6867 * require specifying duty cycle or voltage. CTR-Electronics has
6868 * developed a hybrid method that combines the performances gains of
6869 * FOC while still allowing applications to provide duty cycle or
6870 * voltage demand. This not to be confused with simple sinusoidal
6871 * control or phase voltage control which lacks the performance
6872 * gains.
6873 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
6874 * - Slot: Select which gains are applied by selecting the slot. Use the
6875 * configuration api to set the gain values for the selected slot before
6876 * enabling this feature. Slot must be within [0,2].
6877 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6878 * is zero (or within deadband). Set to false to use
6879 * the NeutralMode configuration setting (default).
6880 * This flag exists to provide the fundamental
6881 * behavior of this control when output is zero, which
6882 * is to provide 0V to the motor.
6883 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6884 * users to use other limit switch sensors connected to
6885 * robot controller. This also allows use of active
6886 * sensors that require external power.
6887 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6888 * users to use other limit switch sensors connected to
6889 * robot controller. This also allows use of active
6890 * sensors that require external power.
6891 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6892 * LimitForwardMotion and LimitReverseMotion parameters,
6893 * instead allowing motion.
6894 *
6895 * This can be useful on mechanisms such as an
6896 * intake/feeder, where a limit switch stops motion while
6897 * intaking but should be ignored when feeding to a
6898 * shooter.
6899 *
6900 * The hardware limit faults and Forward/ReverseLimit
6901 * signals will still report the values of the limit
6902 * switches regardless of this parameter.
6903 * - UseTimesync: Set to true to delay applying this control request until a
6904 * timesync boundary (requires Phoenix Pro and CANivore). This
6905 * eliminates the impact of nondeterministic network delays in
6906 * exchange for a larger but deterministic control latency.
6907 *
6908 * This requires setting the ControlTimesyncFreqHz config in
6909 * MotorOutputConfigs. Additionally, when this is enabled, the
6910 * UpdateFreqHz of this request should be set to 0 Hz.
6911 *
6912 * \param request Control object to request of the device
6913 * \returns Status Code of the request, 0 is OK
6914 */
6916
6917 /**
6918 * \brief Requests Motion Magic® to target a final position using a
6919 * motion profile. This dynamic request allows runtime changes to
6920 * Cruise Velocity, Acceleration, and Jerk. Users can optionally
6921 * provide a voltage feedforward. This control requires use of a
6922 * CANivore.
6923 *
6924 * \details Motion Magic® produces a motion profile in real-time while
6925 * attempting to honor the specified Cruise Velocity, Acceleration,
6926 * and (optional) Jerk. This control mode does not use the Expo_kV or
6927 * Expo_kA configs.
6928 *
6929 * Target position can be changed on-the-fly and Motion Magic® will do
6930 * its best to adjust the profile. This control mode is
6931 * voltage-based, so relevant closed-loop gains will use Volts for the
6932 * numerator.
6933 *
6934 * - DynamicMotionMagicVoltage Parameters:
6935 * - Position: Position to drive toward in rotations.
6936 * - Velocity: Cruise velocity for profiling. The signage does not matter as the
6937 * device will use the absolute value for profile generation.
6938 * - Acceleration: Acceleration for profiling. The signage does not matter as
6939 * the device will use the absolute value for profile generation.
6940 * - Jerk: Jerk for profiling. The signage does not matter as the device will
6941 * use the absolute value for profile generation.
6942 *
6943 * Jerk is optional; if this is set to zero, then Motion Magic® will not
6944 * apply a Jerk limit.
6945 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which
6946 * increases peak power by ~15%. Set to false to use trapezoidal
6947 * commutation.
6948 *
6949 * FOC improves motor performance by leveraging torque (current)
6950 * control. However, this may be inconvenient for applications that
6951 * require specifying duty cycle or voltage. CTR-Electronics has
6952 * developed a hybrid method that combines the performances gains of
6953 * FOC while still allowing applications to provide duty cycle or
6954 * voltage demand. This not to be confused with simple sinusoidal
6955 * control or phase voltage control which lacks the performance
6956 * gains.
6957 * - FeedForward: Feedforward to apply in volts
6958 * - Slot: Select which gains are applied by selecting the slot. Use the
6959 * configuration api to set the gain values for the selected slot before
6960 * enabling this feature. Slot must be within [0,2].
6961 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output
6962 * is zero (or within deadband). Set to false to use
6963 * the NeutralMode configuration setting (default).
6964 * This flag exists to provide the fundamental
6965 * behavior of this control when output is zero, which
6966 * is to provide 0V to the motor.
6967 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6968 * users to use other limit switch sensors connected to
6969 * robot controller. This also allows use of active
6970 * sensors that require external power.
6971 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6972 * users to use other limit switch sensors connected to
6973 * robot controller. This also allows use of active
6974 * sensors that require external power.
6975 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the
6976 * LimitForwardMotion and LimitReverseMotion parameters,
6977 * instead allowing motion.
6978 *
6979 * This can be useful on mechanisms such as an
6980 * intake/feeder, where a limit switch stops motion while
6981 * intaking but should be ignored when feeding to a
6982 * shooter.
6983 *
6984 * The hardware limit faults and Forward/ReverseLimit
6985 * signals will still report the values of the limit
6986 * switches regardless of this parameter.
6987 * - UseTimesync: Set to true to delay applying this control request until a
6988 * timesync boundary (requires Phoenix Pro and CANivore). This
6989 * eliminates the impact of nondeterministic network delays in
6990 * exchange for a larger but deterministic control latency.
6991 *
6992 * This requires setting the ControlTimesyncFreqHz config in
6993 * MotorOutputConfigs. Additionally, when this is enabled, the
6994 * UpdateFreqHz of this request should be set to 0 Hz.
6995 *
6996 * \param request Control object to request of the device
6997 * \returns Status Code of the request, 0 is OK
6998 */
7000
7001 /**
7002 * \brief Differential control with duty cycle average target and
7003 * position difference target.
7004 *
7005 * - Diff_DutyCycleOut_Position Parameters:
7006 * - AverageRequest: Average DutyCycleOut request of the mechanism.
7007 * - DifferentialRequest: Differential PositionDutyCycle request of the
7008 * mechanism.
7009 *
7010 * \param request Control object to request of the device
7011 * \returns Status Code of the request, 0 is OK
7012 */
7013 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_DutyCycleOut_Position &request) override;
7014
7015 /**
7016 * \brief Differential control with position average target and
7017 * position difference target using dutycycle control.
7018 *
7019 * - Diff_PositionDutyCycle_Position Parameters:
7020 * - AverageRequest: Average PositionDutyCycle request of the mechanism.
7021 * - DifferentialRequest: Differential PositionDutyCycle request of the
7022 * mechanism.
7023 *
7024 * \param request Control object to request of the device
7025 * \returns Status Code of the request, 0 is OK
7026 */
7027 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionDutyCycle_Position &request) override;
7028
7029 /**
7030 * \brief Differential control with velocity average target and
7031 * position difference target using dutycycle control.
7032 *
7033 * - Diff_VelocityDutyCycle_Position Parameters:
7034 * - AverageRequest: Average VelocityDutyCYcle request of the mechanism.
7035 * - DifferentialRequest: Differential PositionDutyCycle request of the
7036 * mechanism.
7037 *
7038 * \param request Control object to request of the device
7039 * \returns Status Code of the request, 0 is OK
7040 */
7041 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityDutyCycle_Position &request) override;
7042
7043 /**
7044 * \brief Differential control with Motion Magic® average target and
7045 * position difference target using dutycycle control.
7046 *
7047 * - Diff_MotionMagicDutyCycle_Position Parameters:
7048 * - AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
7049 * - DifferentialRequest: Differential PositionDutyCycle request of the
7050 * mechanism.
7051 *
7052 * \param request Control object to request of the device
7053 * \returns Status Code of the request, 0 is OK
7054 */
7055 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicDutyCycle_Position &request) override;
7056
7057 /**
7058 * \brief Differential control with duty cycle average target and
7059 * velocity difference target.
7060 *
7061 * - Diff_DutyCycleOut_Velocity Parameters:
7062 * - AverageRequest: Average DutyCycleOut request of the mechanism.
7063 * - DifferentialRequest: Differential VelocityDutyCycle request of the
7064 * mechanism.
7065 *
7066 * \param request Control object to request of the device
7067 * \returns Status Code of the request, 0 is OK
7068 */
7069 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_DutyCycleOut_Velocity &request) override;
7070
7071 /**
7072 * \brief Differential control with position average target and
7073 * velocity difference target using dutycycle control.
7074 *
7075 * - Diff_PositionDutyCycle_Velocity Parameters:
7076 * - AverageRequest: Average PositionDutyCycle request of the mechanism.
7077 * - DifferentialRequest: Differential VelocityDutyCycle request of the
7078 * mechanism.
7079 *
7080 * \param request Control object to request of the device
7081 * \returns Status Code of the request, 0 is OK
7082 */
7083 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionDutyCycle_Velocity &request) override;
7084
7085 /**
7086 * \brief Differential control with velocity average target and
7087 * velocity difference target using dutycycle control.
7088 *
7089 * - Diff_VelocityDutyCycle_Velocity Parameters:
7090 * - AverageRequest: Average VelocityDutyCycle request of the mechanism.
7091 * - DifferentialRequest: Differential VelocityDutyCycle request of the
7092 * mechanism.
7093 *
7094 * \param request Control object to request of the device
7095 * \returns Status Code of the request, 0 is OK
7096 */
7097 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityDutyCycle_Velocity &request) override;
7098
7099 /**
7100 * \brief Differential control with Motion Magic® average target and
7101 * velocity difference target using dutycycle control.
7102 *
7103 * - Diff_MotionMagicDutyCycle_Velocity Parameters:
7104 * - AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
7105 * - DifferentialRequest: Differential VelocityDutyCycle request of the
7106 * mechanism.
7107 *
7108 * \param request Control object to request of the device
7109 * \returns Status Code of the request, 0 is OK
7110 */
7111 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicDutyCycle_Velocity &request) override;
7112
7113 /**
7114 * \brief Differential control with voltage average target and
7115 * position difference target.
7116 *
7117 * - Diff_VoltageOut_Position Parameters:
7118 * - AverageRequest: Average VoltageOut request of the mechanism.
7119 * - DifferentialRequest: Differential PositionVoltage request of the mechanism.
7120 *
7121 * \param request Control object to request of the device
7122 * \returns Status Code of the request, 0 is OK
7123 */
7124 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VoltageOut_Position &request) override;
7125
7126 /**
7127 * \brief Differential control with position average target and
7128 * position difference target using voltage control.
7129 *
7130 * - Diff_PositionVoltage_Position Parameters:
7131 * - AverageRequest: Average PositionVoltage request of the mechanism.
7132 * - DifferentialRequest: Differential PositionVoltage request of the 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_PositionVoltage_Position &request) override;
7138
7139 /**
7140 * \brief Differential control with velocity average target and
7141 * position difference target using voltage control.
7142 *
7143 * - Diff_VelocityVoltage_Position Parameters:
7144 * - AverageRequest: Average VelocityVoltage request of the mechanism.
7145 * - DifferentialRequest: Differential PositionVoltage request of the mechanism.
7146 *
7147 * \param request Control object to request of the device
7148 * \returns Status Code of the request, 0 is OK
7149 */
7150 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityVoltage_Position &request) override;
7151
7152 /**
7153 * \brief Differential control with Motion Magic® average target and
7154 * position difference target using voltage control.
7155 *
7156 * - Diff_MotionMagicVoltage_Position Parameters:
7157 * - AverageRequest: Average MotionMagicVoltage request of the mechanism.
7158 * - DifferentialRequest: Differential PositionVoltage request of the mechanism.
7159 *
7160 * \param request Control object to request of the device
7161 * \returns Status Code of the request, 0 is OK
7162 */
7163 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVoltage_Position &request) override;
7164
7165 /**
7166 * \brief Differential control with voltage average target and
7167 * velocity difference target.
7168 *
7169 * - Diff_VoltageOut_Velocity Parameters:
7170 * - AverageRequest: Average VoltageOut request of the mechanism.
7171 * - DifferentialRequest: Differential VelocityVoltage request of the mechanism.
7172 *
7173 * \param request Control object to request of the device
7174 * \returns Status Code of the request, 0 is OK
7175 */
7176 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VoltageOut_Velocity &request) override;
7177
7178 /**
7179 * \brief Differential control with position average target and
7180 * velocity difference target using voltage control.
7181 *
7182 * - Diff_PositionVoltage_Velocity Parameters:
7183 * - AverageRequest: Average PositionVoltage request of the mechanism.
7184 * - DifferentialRequest: Differential VelocityVoltage request of the mechanism.
7185 *
7186 * \param request Control object to request of the device
7187 * \returns Status Code of the request, 0 is OK
7188 */
7189 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionVoltage_Velocity &request) override;
7190
7191 /**
7192 * \brief Differential control with velocity average target and
7193 * velocity difference target using voltage control.
7194 *
7195 * - Diff_VelocityVoltage_Velocity Parameters:
7196 * - AverageRequest: Average VelocityVoltage request of the mechanism.
7197 * - DifferentialRequest: Differential VelocityVoltage request of the mechanism.
7198 *
7199 * \param request Control object to request of the device
7200 * \returns Status Code of the request, 0 is OK
7201 */
7202 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityVoltage_Velocity &request) override;
7203
7204 /**
7205 * \brief Differential control with Motion Magic® average target and
7206 * velocity difference target using voltage control.
7207 *
7208 * - Diff_MotionMagicVoltage_Velocity Parameters:
7209 * - AverageRequest: Average MotionMagicVoltage request of the mechanism.
7210 * - DifferentialRequest: Differential VelocityVoltage request of the mechanism.
7211 *
7212 * \param request Control object to request of the device
7213 * \returns Status Code of the request, 0 is OK
7214 */
7215 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVoltage_Velocity &request) override;
7216
7217 /**
7218 * \brief Control device with generic control request object. User must make
7219 * sure the specified object is castable to a valid control request,
7220 * otherwise this function will fail at run-time and return the NotSupported
7221 * StatusCode
7222 *
7223 * \param request Control object to request of the device
7224 * \returns Status Code of the request, 0 is OK
7225 */
7227 {
7228 controls::ControlRequest const *ptr = &request;
7229 (void)ptr;
7230 auto const *DutyCycleOutValue = dynamic_cast<controls::DutyCycleOut const *>(ptr);
7231 if (DutyCycleOutValue != nullptr)
7232 return SetControl(*DutyCycleOutValue);
7233 auto const *VoltageOutValue = dynamic_cast<controls::VoltageOut const *>(ptr);
7234 if (VoltageOutValue != nullptr)
7235 return SetControl(*VoltageOutValue);
7236 auto const *PositionDutyCycleValue = dynamic_cast<controls::PositionDutyCycle const *>(ptr);
7237 if (PositionDutyCycleValue != nullptr)
7238 return SetControl(*PositionDutyCycleValue);
7239 auto const *PositionVoltageValue = dynamic_cast<controls::PositionVoltage const *>(ptr);
7240 if (PositionVoltageValue != nullptr)
7241 return SetControl(*PositionVoltageValue);
7242 auto const *VelocityDutyCycleValue = dynamic_cast<controls::VelocityDutyCycle const *>(ptr);
7243 if (VelocityDutyCycleValue != nullptr)
7244 return SetControl(*VelocityDutyCycleValue);
7245 auto const *VelocityVoltageValue = dynamic_cast<controls::VelocityVoltage const *>(ptr);
7246 if (VelocityVoltageValue != nullptr)
7247 return SetControl(*VelocityVoltageValue);
7248 auto const *MotionMagicDutyCycleValue = dynamic_cast<controls::MotionMagicDutyCycle const *>(ptr);
7249 if (MotionMagicDutyCycleValue != nullptr)
7250 return SetControl(*MotionMagicDutyCycleValue);
7251 auto const *MotionMagicVoltageValue = dynamic_cast<controls::MotionMagicVoltage const *>(ptr);
7252 if (MotionMagicVoltageValue != nullptr)
7253 return SetControl(*MotionMagicVoltageValue);
7254 auto const *DifferentialDutyCycleValue = dynamic_cast<controls::DifferentialDutyCycle const *>(ptr);
7255 if (DifferentialDutyCycleValue != nullptr)
7256 return SetControl(*DifferentialDutyCycleValue);
7257 auto const *DifferentialVoltageValue = dynamic_cast<controls::DifferentialVoltage const *>(ptr);
7258 if (DifferentialVoltageValue != nullptr)
7259 return SetControl(*DifferentialVoltageValue);
7260 auto const *DifferentialPositionDutyCycleValue = dynamic_cast<controls::DifferentialPositionDutyCycle const *>(ptr);
7261 if (DifferentialPositionDutyCycleValue != nullptr)
7262 return SetControl(*DifferentialPositionDutyCycleValue);
7263 auto const *DifferentialPositionVoltageValue = dynamic_cast<controls::DifferentialPositionVoltage const *>(ptr);
7264 if (DifferentialPositionVoltageValue != nullptr)
7265 return SetControl(*DifferentialPositionVoltageValue);
7266 auto const *DifferentialVelocityDutyCycleValue = dynamic_cast<controls::DifferentialVelocityDutyCycle const *>(ptr);
7267 if (DifferentialVelocityDutyCycleValue != nullptr)
7268 return SetControl(*DifferentialVelocityDutyCycleValue);
7269 auto const *DifferentialVelocityVoltageValue = dynamic_cast<controls::DifferentialVelocityVoltage const *>(ptr);
7270 if (DifferentialVelocityVoltageValue != nullptr)
7271 return SetControl(*DifferentialVelocityVoltageValue);
7272 auto const *DifferentialMotionMagicDutyCycleValue = dynamic_cast<controls::DifferentialMotionMagicDutyCycle const *>(ptr);
7273 if (DifferentialMotionMagicDutyCycleValue != nullptr)
7274 return SetControl(*DifferentialMotionMagicDutyCycleValue);
7275 auto const *DifferentialMotionMagicVoltageValue = dynamic_cast<controls::DifferentialMotionMagicVoltage const *>(ptr);
7276 if (DifferentialMotionMagicVoltageValue != nullptr)
7277 return SetControl(*DifferentialMotionMagicVoltageValue);
7278 auto const *FollowerValue = dynamic_cast<controls::Follower const *>(ptr);
7279 if (FollowerValue != nullptr)
7280 return SetControl(*FollowerValue);
7281 auto const *StrictFollowerValue = dynamic_cast<controls::StrictFollower const *>(ptr);
7282 if (StrictFollowerValue != nullptr)
7283 return SetControl(*StrictFollowerValue);
7284 auto const *DifferentialFollowerValue = dynamic_cast<controls::DifferentialFollower const *>(ptr);
7285 if (DifferentialFollowerValue != nullptr)
7286 return SetControl(*DifferentialFollowerValue);
7287 auto const *DifferentialStrictFollowerValue = dynamic_cast<controls::DifferentialStrictFollower const *>(ptr);
7288 if (DifferentialStrictFollowerValue != nullptr)
7289 return SetControl(*DifferentialStrictFollowerValue);
7290 auto const *NeutralOutValue = dynamic_cast<controls::NeutralOut const *>(ptr);
7291 if (NeutralOutValue != nullptr)
7292 return SetControl(*NeutralOutValue);
7293 auto const *CoastOutValue = dynamic_cast<controls::CoastOut const *>(ptr);
7294 if (CoastOutValue != nullptr)
7295 return SetControl(*CoastOutValue);
7296 auto const *StaticBrakeValue = dynamic_cast<controls::StaticBrake const *>(ptr);
7297 if (StaticBrakeValue != nullptr)
7298 return SetControl(*StaticBrakeValue);
7299 auto const *MotionMagicVelocityDutyCycleValue = dynamic_cast<controls::MotionMagicVelocityDutyCycle const *>(ptr);
7300 if (MotionMagicVelocityDutyCycleValue != nullptr)
7301 return SetControl(*MotionMagicVelocityDutyCycleValue);
7302 auto const *MotionMagicVelocityVoltageValue = dynamic_cast<controls::MotionMagicVelocityVoltage const *>(ptr);
7303 if (MotionMagicVelocityVoltageValue != nullptr)
7304 return SetControl(*MotionMagicVelocityVoltageValue);
7305 auto const *MotionMagicExpoDutyCycleValue = dynamic_cast<controls::MotionMagicExpoDutyCycle const *>(ptr);
7306 if (MotionMagicExpoDutyCycleValue != nullptr)
7307 return SetControl(*MotionMagicExpoDutyCycleValue);
7308 auto const *MotionMagicExpoVoltageValue = dynamic_cast<controls::MotionMagicExpoVoltage const *>(ptr);
7309 if (MotionMagicExpoVoltageValue != nullptr)
7310 return SetControl(*MotionMagicExpoVoltageValue);
7311 auto const *DynamicMotionMagicDutyCycleValue = dynamic_cast<controls::DynamicMotionMagicDutyCycle const *>(ptr);
7312 if (DynamicMotionMagicDutyCycleValue != nullptr)
7313 return SetControl(*DynamicMotionMagicDutyCycleValue);
7314 auto const *DynamicMotionMagicVoltageValue = dynamic_cast<controls::DynamicMotionMagicVoltage const *>(ptr);
7315 if (DynamicMotionMagicVoltageValue != nullptr)
7316 return SetControl(*DynamicMotionMagicVoltageValue);
7317 auto const *Diff_DutyCycleOut_PositionValue = dynamic_cast<controls::compound::Diff_DutyCycleOut_Position const *>(ptr);
7318 if (Diff_DutyCycleOut_PositionValue != nullptr)
7319 return SetControl(*Diff_DutyCycleOut_PositionValue);
7320 auto const *Diff_PositionDutyCycle_PositionValue = dynamic_cast<controls::compound::Diff_PositionDutyCycle_Position const *>(ptr);
7321 if (Diff_PositionDutyCycle_PositionValue != nullptr)
7322 return SetControl(*Diff_PositionDutyCycle_PositionValue);
7323 auto const *Diff_VelocityDutyCycle_PositionValue = dynamic_cast<controls::compound::Diff_VelocityDutyCycle_Position const *>(ptr);
7324 if (Diff_VelocityDutyCycle_PositionValue != nullptr)
7325 return SetControl(*Diff_VelocityDutyCycle_PositionValue);
7326 auto const *Diff_MotionMagicDutyCycle_PositionValue = dynamic_cast<controls::compound::Diff_MotionMagicDutyCycle_Position const *>(ptr);
7327 if (Diff_MotionMagicDutyCycle_PositionValue != nullptr)
7328 return SetControl(*Diff_MotionMagicDutyCycle_PositionValue);
7329 auto const *Diff_DutyCycleOut_VelocityValue = dynamic_cast<controls::compound::Diff_DutyCycleOut_Velocity const *>(ptr);
7330 if (Diff_DutyCycleOut_VelocityValue != nullptr)
7331 return SetControl(*Diff_DutyCycleOut_VelocityValue);
7332 auto const *Diff_PositionDutyCycle_VelocityValue = dynamic_cast<controls::compound::Diff_PositionDutyCycle_Velocity const *>(ptr);
7333 if (Diff_PositionDutyCycle_VelocityValue != nullptr)
7334 return SetControl(*Diff_PositionDutyCycle_VelocityValue);
7335 auto const *Diff_VelocityDutyCycle_VelocityValue = dynamic_cast<controls::compound::Diff_VelocityDutyCycle_Velocity const *>(ptr);
7336 if (Diff_VelocityDutyCycle_VelocityValue != nullptr)
7337 return SetControl(*Diff_VelocityDutyCycle_VelocityValue);
7338 auto const *Diff_MotionMagicDutyCycle_VelocityValue = dynamic_cast<controls::compound::Diff_MotionMagicDutyCycle_Velocity const *>(ptr);
7339 if (Diff_MotionMagicDutyCycle_VelocityValue != nullptr)
7340 return SetControl(*Diff_MotionMagicDutyCycle_VelocityValue);
7341 auto const *Diff_VoltageOut_PositionValue = dynamic_cast<controls::compound::Diff_VoltageOut_Position const *>(ptr);
7342 if (Diff_VoltageOut_PositionValue != nullptr)
7343 return SetControl(*Diff_VoltageOut_PositionValue);
7344 auto const *Diff_PositionVoltage_PositionValue = dynamic_cast<controls::compound::Diff_PositionVoltage_Position const *>(ptr);
7345 if (Diff_PositionVoltage_PositionValue != nullptr)
7346 return SetControl(*Diff_PositionVoltage_PositionValue);
7347 auto const *Diff_VelocityVoltage_PositionValue = dynamic_cast<controls::compound::Diff_VelocityVoltage_Position const *>(ptr);
7348 if (Diff_VelocityVoltage_PositionValue != nullptr)
7349 return SetControl(*Diff_VelocityVoltage_PositionValue);
7350 auto const *Diff_MotionMagicVoltage_PositionValue = dynamic_cast<controls::compound::Diff_MotionMagicVoltage_Position const *>(ptr);
7351 if (Diff_MotionMagicVoltage_PositionValue != nullptr)
7352 return SetControl(*Diff_MotionMagicVoltage_PositionValue);
7353 auto const *Diff_VoltageOut_VelocityValue = dynamic_cast<controls::compound::Diff_VoltageOut_Velocity const *>(ptr);
7354 if (Diff_VoltageOut_VelocityValue != nullptr)
7355 return SetControl(*Diff_VoltageOut_VelocityValue);
7356 auto const *Diff_PositionVoltage_VelocityValue = dynamic_cast<controls::compound::Diff_PositionVoltage_Velocity const *>(ptr);
7357 if (Diff_PositionVoltage_VelocityValue != nullptr)
7358 return SetControl(*Diff_PositionVoltage_VelocityValue);
7359 auto const *Diff_VelocityVoltage_VelocityValue = dynamic_cast<controls::compound::Diff_VelocityVoltage_Velocity const *>(ptr);
7360 if (Diff_VelocityVoltage_VelocityValue != nullptr)
7361 return SetControl(*Diff_VelocityVoltage_VelocityValue);
7362 auto const *Diff_MotionMagicVoltage_VelocityValue = dynamic_cast<controls::compound::Diff_MotionMagicVoltage_Velocity const *>(ptr);
7363 if (Diff_MotionMagicVoltage_VelocityValue != nullptr)
7364 return SetControl(*Diff_MotionMagicVoltage_VelocityValue);
7366 }
7367
7368
7369 /**
7370 * \brief Sets the mechanism position of the device in mechanism
7371 * rotations.
7372 *
7373 * \param newValue Value to set to. Units are in rotations.
7374 * \param timeoutSeconds Maximum time to wait up to in seconds.
7375 * \returns StatusCode of the set command
7376 */
7377 ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds) override
7378 {
7379 return GetConfigurator().SetPosition(newValue, timeoutSeconds);
7380 }
7381 /**
7382 * \brief Sets the mechanism position of the device in mechanism
7383 * rotations.
7384 *
7385 * This will wait up to 0.100 seconds (100ms) by default.
7386 *
7387 * \param newValue Value to set to. Units are in rotations.
7388 * \returns StatusCode of the set command
7389 */
7390 ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue) override
7391 {
7392 return SetPosition(newValue, 0.100_s);
7393 }
7394
7395 /**
7396 * \brief Clear the sticky faults in the device.
7397 *
7398 * \details This typically has no impact on the device functionality.
7399 * Instead, it just clears telemetry faults that are accessible via
7400 * API and Tuner Self-Test.
7401 *
7402 * \param timeoutSeconds Maximum time to wait up to in seconds.
7403 * \returns StatusCode of the set command
7404 */
7405 ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds) override
7406 {
7407 return GetConfigurator().ClearStickyFaults(timeoutSeconds);
7408 }
7409 /**
7410 * \brief Clear the sticky faults in the device.
7411 *
7412 * \details This typically has no impact on the device functionality.
7413 * Instead, it just clears telemetry faults that are accessible via
7414 * API and Tuner Self-Test.
7415 *
7416 * This will wait up to 0.100 seconds (100ms) by default.
7417 *
7418 * \returns StatusCode of the set command
7419 */
7421 {
7422 return ClearStickyFaults(0.100_s);
7423 }
7424
7425 /**
7426 * \brief Clear sticky fault: Hardware fault occurred
7427 *
7428 * \param timeoutSeconds Maximum time to wait up to in seconds.
7429 * \returns StatusCode of the set command
7430 */
7431 ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds) override
7432 {
7433 return GetConfigurator().ClearStickyFault_Hardware(timeoutSeconds);
7434 }
7435 /**
7436 * \brief Clear sticky fault: Hardware fault occurred
7437 *
7438 * This will wait up to 0.100 seconds (100ms) by default.
7439 *
7440 * \returns StatusCode of the set command
7441 */
7446
7447 /**
7448 * \brief Clear sticky fault: Processor temperature exceeded limit
7449 *
7450 * \param timeoutSeconds Maximum time to wait up to in seconds.
7451 * \returns StatusCode of the set command
7452 */
7453 ctre::phoenix::StatusCode ClearStickyFault_ProcTemp(units::time::second_t timeoutSeconds) override
7454 {
7455 return GetConfigurator().ClearStickyFault_ProcTemp(timeoutSeconds);
7456 }
7457 /**
7458 * \brief Clear sticky fault: Processor temperature exceeded limit
7459 *
7460 * This will wait up to 0.100 seconds (100ms) by default.
7461 *
7462 * \returns StatusCode of the set command
7463 */
7468
7469 /**
7470 * \brief Clear sticky fault: Device temperature exceeded limit
7471 *
7472 * \param timeoutSeconds Maximum time to wait up to in seconds.
7473 * \returns StatusCode of the set command
7474 */
7475 ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp(units::time::second_t timeoutSeconds) override
7476 {
7477 return GetConfigurator().ClearStickyFault_DeviceTemp(timeoutSeconds);
7478 }
7479 /**
7480 * \brief Clear sticky fault: Device temperature exceeded limit
7481 *
7482 * This will wait up to 0.100 seconds (100ms) by default.
7483 *
7484 * \returns StatusCode of the set command
7485 */
7490
7491 /**
7492 * \brief Clear sticky fault: Device supply voltage dropped to near
7493 * brownout levels
7494 *
7495 * \param timeoutSeconds Maximum time to wait up to in seconds.
7496 * \returns StatusCode of the set command
7497 */
7498 ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds) override
7499 {
7500 return GetConfigurator().ClearStickyFault_Undervoltage(timeoutSeconds);
7501 }
7502 /**
7503 * \brief Clear sticky fault: Device supply voltage dropped to near
7504 * brownout levels
7505 *
7506 * This will wait up to 0.100 seconds (100ms) by default.
7507 *
7508 * \returns StatusCode of the set command
7509 */
7514
7515 /**
7516 * \brief Clear sticky fault: Device boot while detecting the enable
7517 * signal
7518 *
7519 * \param timeoutSeconds Maximum time to wait up to in seconds.
7520 * \returns StatusCode of the set command
7521 */
7522 ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable(units::time::second_t timeoutSeconds) override
7523 {
7524 return GetConfigurator().ClearStickyFault_BootDuringEnable(timeoutSeconds);
7525 }
7526 /**
7527 * \brief Clear sticky fault: Device boot while detecting the enable
7528 * signal
7529 *
7530 * This will wait up to 0.100 seconds (100ms) by default.
7531 *
7532 * \returns StatusCode of the set command
7533 */
7538
7539 /**
7540 * \brief Clear sticky fault: An unlicensed feature is in use, device
7541 * may not behave as expected.
7542 *
7543 * \param timeoutSeconds Maximum time to wait up to in seconds.
7544 * \returns StatusCode of the set command
7545 */
7546 ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse(units::time::second_t timeoutSeconds) override
7547 {
7549 }
7550 /**
7551 * \brief Clear sticky fault: An unlicensed feature is in use, device
7552 * may not behave as expected.
7553 *
7554 * This will wait up to 0.100 seconds (100ms) by default.
7555 *
7556 * \returns StatusCode of the set command
7557 */
7562
7563 /**
7564 * \brief Clear sticky fault: Bridge was disabled most likely due to
7565 * supply voltage dropping too low.
7566 *
7567 * \param timeoutSeconds Maximum time to wait up to in seconds.
7568 * \returns StatusCode of the set command
7569 */
7570 ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout(units::time::second_t timeoutSeconds) override
7571 {
7572 return GetConfigurator().ClearStickyFault_BridgeBrownout(timeoutSeconds);
7573 }
7574 /**
7575 * \brief Clear sticky fault: Bridge was disabled most likely due to
7576 * supply voltage dropping too low.
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: The remote sensor has reset.
7589 *
7590 * \param timeoutSeconds Maximum time to wait up to in seconds.
7591 * \returns StatusCode of the set command
7592 */
7593 ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset(units::time::second_t timeoutSeconds) override
7594 {
7595 return GetConfigurator().ClearStickyFault_RemoteSensorReset(timeoutSeconds);
7596 }
7597 /**
7598 * \brief Clear sticky fault: The remote sensor has reset.
7599 *
7600 * This will wait up to 0.100 seconds (100ms) by default.
7601 *
7602 * \returns StatusCode of the set command
7603 */
7608
7609 /**
7610 * \brief Clear sticky fault: The remote Talon used for differential
7611 * control is not present on CAN Bus.
7612 *
7613 * \param timeoutSeconds Maximum time to wait up to in seconds.
7614 * \returns StatusCode of the set command
7615 */
7616 ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX(units::time::second_t timeoutSeconds) override
7617 {
7619 }
7620 /**
7621 * \brief Clear sticky fault: The remote Talon used for differential
7622 * control is not present on CAN Bus.
7623 *
7624 * This will wait up to 0.100 seconds (100ms) by default.
7625 *
7626 * \returns StatusCode of the set command
7627 */
7632
7633 /**
7634 * \brief Clear sticky fault: The remote sensor position has
7635 * overflowed. Because of the nature of remote sensors, it is possible
7636 * for the remote sensor position to overflow beyond what is supported
7637 * by the status signal frame. However, this is rare and cannot occur
7638 * over the course of an FRC match under normal use.
7639 *
7640 * \param timeoutSeconds Maximum time to wait up to in seconds.
7641 * \returns StatusCode of the set command
7642 */
7643 ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow(units::time::second_t timeoutSeconds) override
7644 {
7646 }
7647 /**
7648 * \brief Clear sticky fault: The remote sensor position has
7649 * overflowed. Because of the nature of remote sensors, it is possible
7650 * for the remote sensor position to overflow beyond what is supported
7651 * by the status signal frame. However, this is rare and cannot occur
7652 * over the course of an FRC match under normal use.
7653 *
7654 * This will wait up to 0.100 seconds (100ms) by default.
7655 *
7656 * \returns StatusCode of the set command
7657 */
7662
7663 /**
7664 * \brief Clear sticky fault: Supply Voltage has exceeded the maximum
7665 * voltage rating of device.
7666 *
7667 * \param timeoutSeconds Maximum time to wait up to in seconds.
7668 * \returns StatusCode of the set command
7669 */
7670 ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV(units::time::second_t timeoutSeconds) override
7671 {
7672 return GetConfigurator().ClearStickyFault_OverSupplyV(timeoutSeconds);
7673 }
7674 /**
7675 * \brief Clear sticky fault: Supply Voltage has exceeded the maximum
7676 * voltage rating of device.
7677 *
7678 * This will wait up to 0.100 seconds (100ms) by default.
7679 *
7680 * \returns StatusCode of the set command
7681 */
7686
7687 /**
7688 * \brief Clear sticky fault: Supply Voltage is unstable. Ensure you
7689 * are using a battery and current limited power supply.
7690 *
7691 * \param timeoutSeconds Maximum time to wait up to in seconds.
7692 * \returns StatusCode of the set command
7693 */
7694 ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV(units::time::second_t timeoutSeconds) override
7695 {
7696 return GetConfigurator().ClearStickyFault_UnstableSupplyV(timeoutSeconds);
7697 }
7698 /**
7699 * \brief Clear sticky fault: Supply Voltage is unstable. Ensure you
7700 * are using a battery and current limited power supply.
7701 *
7702 * This will wait up to 0.100 seconds (100ms) by default.
7703 *
7704 * \returns StatusCode of the set command
7705 */
7710
7711 /**
7712 * \brief Clear sticky fault: Reverse limit switch has been asserted.
7713 * Output is set to neutral.
7714 *
7715 * \param timeoutSeconds Maximum time to wait up to in seconds.
7716 * \returns StatusCode of the set command
7717 */
7718 ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit(units::time::second_t timeoutSeconds) override
7719 {
7720 return GetConfigurator().ClearStickyFault_ReverseHardLimit(timeoutSeconds);
7721 }
7722 /**
7723 * \brief Clear sticky fault: Reverse limit switch has been asserted.
7724 * Output is set to neutral.
7725 *
7726 * This will wait up to 0.100 seconds (100ms) by default.
7727 *
7728 * \returns StatusCode of the set command
7729 */
7734
7735 /**
7736 * \brief Clear sticky fault: Forward limit switch has been asserted.
7737 * Output is set to neutral.
7738 *
7739 * \param timeoutSeconds Maximum time to wait up to in seconds.
7740 * \returns StatusCode of the set command
7741 */
7742 ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit(units::time::second_t timeoutSeconds) override
7743 {
7744 return GetConfigurator().ClearStickyFault_ForwardHardLimit(timeoutSeconds);
7745 }
7746 /**
7747 * \brief Clear sticky fault: Forward limit switch has been asserted.
7748 * Output is set to neutral.
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: Reverse soft limit has been asserted.
7761 * Output is set to neutral.
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_ReverseSoftLimit(units::time::second_t timeoutSeconds) override
7767 {
7768 return GetConfigurator().ClearStickyFault_ReverseSoftLimit(timeoutSeconds);
7769 }
7770 /**
7771 * \brief Clear sticky fault: Reverse soft limit has been asserted.
7772 * Output is set to neutral.
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: Forward soft limit has been asserted.
7785 * Output is set to neutral.
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_ForwardSoftLimit(units::time::second_t timeoutSeconds) override
7791 {
7792 return GetConfigurator().ClearStickyFault_ForwardSoftLimit(timeoutSeconds);
7793 }
7794 /**
7795 * \brief Clear sticky fault: Forward soft limit has been asserted.
7796 * Output is set to neutral.
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: The remote soft limit device is not
7809 * present on CAN Bus.
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_MissingSoftLimitRemote(units::time::second_t timeoutSeconds) override
7815 {
7817 }
7818 /**
7819 * \brief Clear sticky fault: The remote soft limit device is not
7820 * present on CAN Bus.
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: The remote limit switch device is not
7833 * present on CAN Bus.
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_MissingHardLimitRemote(units::time::second_t timeoutSeconds) override
7839 {
7841 }
7842 /**
7843 * \brief Clear sticky fault: The remote limit switch device is not
7844 * present on CAN Bus.
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: The remote sensor's data is no longer
7857 * trusted. This can happen if the remote sensor disappears from the
7858 * CAN bus or if the remote sensor indicates its data is no longer
7859 * valid, such as when a CANcoder's magnet strength falls into the
7860 * "red" range.
7861 *
7862 * \param timeoutSeconds Maximum time to wait up to in seconds.
7863 * \returns StatusCode of the set command
7864 */
7865 ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid(units::time::second_t timeoutSeconds) override
7866 {
7868 }
7869 /**
7870 * \brief Clear sticky fault: The remote sensor's data is no longer
7871 * trusted. This can happen if the remote sensor disappears from the
7872 * CAN bus or if the remote sensor indicates its data is no longer
7873 * valid, such as when a CANcoder's magnet strength falls into the
7874 * "red" range.
7875 *
7876 * This will wait up to 0.100 seconds (100ms) by default.
7877 *
7878 * \returns StatusCode of the set command
7879 */
7884
7885 /**
7886 * \brief Clear sticky fault: The remote sensor used for fusion has
7887 * fallen out of sync to the local sensor. A re-synchronization has
7888 * occurred, which may cause a discontinuity. This typically happens
7889 * if there is significant slop in the mechanism, or if the
7890 * RotorToSensorRatio configuration parameter is incorrect.
7891 *
7892 * \param timeoutSeconds Maximum time to wait up to in seconds.
7893 * \returns StatusCode of the set command
7894 */
7895 ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync(units::time::second_t timeoutSeconds) override
7896 {
7898 }
7899 /**
7900 * \brief Clear sticky fault: The remote sensor used for fusion has
7901 * fallen out of sync to the local sensor. A re-synchronization has
7902 * occurred, which may cause a discontinuity. This typically happens
7903 * if there is significant slop in the mechanism, or if the
7904 * RotorToSensorRatio configuration parameter is incorrect.
7905 *
7906 * This will wait up to 0.100 seconds (100ms) by default.
7907 *
7908 * \returns StatusCode of the set command
7909 */
7914
7915 /**
7916 * \brief Clear sticky fault: Stator current limit occured.
7917 *
7918 * \param timeoutSeconds Maximum time to wait up to in seconds.
7919 * \returns StatusCode of the set command
7920 */
7921 ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit(units::time::second_t timeoutSeconds) override
7922 {
7923 return GetConfigurator().ClearStickyFault_StatorCurrLimit(timeoutSeconds);
7924 }
7925 /**
7926 * \brief Clear sticky fault: Stator current limit occured.
7927 *
7928 * This will wait up to 0.100 seconds (100ms) by default.
7929 *
7930 * \returns StatusCode of the set command
7931 */
7936
7937 /**
7938 * \brief Clear sticky fault: Supply current limit occured.
7939 *
7940 * \param timeoutSeconds Maximum time to wait up to in seconds.
7941 * \returns StatusCode of the set command
7942 */
7943 ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit(units::time::second_t timeoutSeconds) override
7944 {
7945 return GetConfigurator().ClearStickyFault_SupplyCurrLimit(timeoutSeconds);
7946 }
7947 /**
7948 * \brief Clear sticky fault: Supply current limit occured.
7949 *
7950 * This will wait up to 0.100 seconds (100ms) by default.
7951 *
7952 * \returns StatusCode of the set command
7953 */
7958
7959 /**
7960 * \brief Clear sticky fault: Using Fused CANcoder feature while
7961 * unlicensed. Device has fallen back to remote CANcoder.
7962 *
7963 * \param timeoutSeconds Maximum time to wait up to in seconds.
7964 * \returns StatusCode of the set command
7965 */
7967 {
7969 }
7970 /**
7971 * \brief Clear sticky fault: Using Fused CANcoder feature while
7972 * unlicensed. Device has fallen back to remote CANcoder.
7973 *
7974 * This will wait up to 0.100 seconds (100ms) by default.
7975 *
7976 * \returns StatusCode of the set command
7977 */
7982
7983 /**
7984 * \brief Clear sticky fault: Static brake was momentarily disabled
7985 * due to excessive braking current while disabled.
7986 *
7987 * \param timeoutSeconds Maximum time to wait up to in seconds.
7988 * \returns StatusCode of the set command
7989 */
7990 ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled(units::time::second_t timeoutSeconds) override
7991 {
7993 }
7994 /**
7995 * \brief Clear sticky fault: Static brake was momentarily disabled
7996 * due to excessive braking current while disabled.
7997 *
7998 * This will wait up to 0.100 seconds (100ms) by default.
7999 *
8000 * \returns StatusCode of the set command
8001 */
8006
8007 /**
8008 * \brief Clear sticky fault: Bridge was disabled most likely due to a
8009 * short in the motor leads.
8010 *
8011 * \param timeoutSeconds Maximum time to wait up to in seconds.
8012 * \returns StatusCode of the set command
8013 */
8014 ctre::phoenix::StatusCode ClearStickyFault_BridgeShort(units::time::second_t timeoutSeconds) override
8015 {
8016 return GetConfigurator().ClearStickyFault_BridgeShort(timeoutSeconds);
8017 }
8018 /**
8019 * \brief Clear sticky fault: Bridge was disabled most likely due to a
8020 * short in the motor leads.
8021 *
8022 * This will wait up to 0.100 seconds (100ms) by default.
8023 *
8024 * \returns StatusCode of the set command
8025 */
8030
8031 /**
8032 * \brief Clear sticky fault: Hall sensor signals are invalid. Check
8033 * hall sensor and cabling. This fault can be used to detect when
8034 * hall cable is unplugged.
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_HallSensorMissing(units::time::second_t timeoutSeconds) override
8040 {
8041 return GetConfigurator().ClearStickyFault_HallSensorMissing(timeoutSeconds);
8042 }
8043 /**
8044 * \brief Clear sticky fault: Hall sensor signals are invalid. Check
8045 * hall sensor and cabling. This fault can be used to detect when
8046 * hall cable is unplugged.
8047 *
8048 * This will wait up to 0.100 seconds (100ms) by default.
8049 *
8050 * \returns StatusCode of the set command
8051 */
8056
8057 /**
8058 * \brief Clear sticky fault: Hall sensor signals are invalid during
8059 * motor drive, so motor was disabled. Check hall sensor and cabling.
8060 *
8061 * \param timeoutSeconds Maximum time to wait up to in seconds.
8062 * \returns StatusCode of the set command
8063 */
8064 ctre::phoenix::StatusCode ClearStickyFault_DriveDisabledHallSensor(units::time::second_t timeoutSeconds) override
8065 {
8067 }
8068 /**
8069 * \brief Clear sticky fault: Hall sensor signals are invalid during
8070 * motor drive, so motor was disabled. Check hall sensor and cabling.
8071 *
8072 * This will wait up to 0.100 seconds (100ms) by default.
8073 *
8074 * \returns StatusCode of the set command
8075 */
8080
8081 /**
8082 * \brief Clear sticky fault: Motor temperature signal appears to not
8083 * be connected.
8084 *
8085 * \param timeoutSeconds Maximum time to wait up to in seconds.
8086 * \returns StatusCode of the set command
8087 */
8088 ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorMissing(units::time::second_t timeoutSeconds) override
8089 {
8091 }
8092 /**
8093 * \brief Clear sticky fault: Motor temperature signal appears to not
8094 * be connected.
8095 *
8096 * This will wait up to 0.100 seconds (100ms) by default.
8097 *
8098 * \returns StatusCode of the set command
8099 */
8104
8105 /**
8106 * \brief Clear sticky fault: Motor temperature signal indicates motor
8107 * is too hot.
8108 *
8109 * \param timeoutSeconds Maximum time to wait up to in seconds.
8110 * \returns StatusCode of the set command
8111 */
8112 ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorTooHot(units::time::second_t timeoutSeconds) override
8113 {
8115 }
8116 /**
8117 * \brief Clear sticky fault: Motor temperature signal indicates motor
8118 * is too hot.
8119 *
8120 * This will wait up to 0.100 seconds (100ms) by default.
8121 *
8122 * \returns StatusCode of the set command
8123 */
8128};
8129
8130}
8131}
8132
8133}
8134}
8135
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:3703
std::string Serialize() const override
Definition Configs.hpp:3808
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:3818
std::string ToString() const override
Definition Configs.hpp:3798
Configs that affect general behavior during closed-looping.
Definition Configs.hpp:4362
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:4422
std::string ToString() const override
Definition Configs.hpp:4406
std::string Serialize() const override
Definition Configs.hpp:4414
Configs that affect the closed-loop control of this motor controller.
Definition Configs.hpp:3004
std::string Serialize() const override
Definition Configs.hpp:3162
std::string ToString() const override
Definition Configs.hpp:3152
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:3172
Configs that determine motor selection and commutation.
Definition Configs.hpp:4920
std::string ToString() const override
Definition Configs.hpp:5014
std::string Serialize() const override
Definition Configs.hpp:5024
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:5034
Configs that directly affect current limiting features.
Definition Configs.hpp:886
std::string Serialize() const override
Definition Configs.hpp:1147
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:1160
std::string ToString() const override
Definition Configs.hpp:1134
Custom Params.
Definition Configs.hpp:4258
std::string ToString() const override
Definition Configs.hpp:4327
std::string Serialize() const override
Definition Configs.hpp:4336
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:4345
Configs related to constants used for differential control of a mechanism.
Definition Configs.hpp:2692
std::string Serialize() const override
Definition Configs.hpp:2802
std::string ToString() const override
Definition Configs.hpp:2792
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:2812
Configs related to sensors used for differential control of a mechanism.
Definition Configs.hpp:2513
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:2673
std::string Serialize() const override
Definition Configs.hpp:2663
std::string ToString() const override
Definition Configs.hpp:2653
Configs that affect the external feedback sensor of this motor controller.
Definition Configs.hpp:1896
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:2478
std::string ToString() const override
Definition Configs.hpp:2446
std::string Serialize() const override
Definition Configs.hpp:2462
Configs that change how the motor controller behaves under different limit switch states.
Definition Configs.hpp:3199
std::string ToString() const override
Definition Configs.hpp:3634
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:3672
std::string Serialize() const override
Definition Configs.hpp:3653
Configs for Motion Magic®.
Definition Configs.hpp:4002
std::string Serialize() const override
Definition Configs.hpp:4216
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:4228
std::string ToString() const override
Definition Configs.hpp:4204
Configs that directly affect motor output.
Definition Configs.hpp:645
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:856
std::string ToString() const override
Definition Configs.hpp:830
std::string Serialize() const override
Definition Configs.hpp:843
Configs that affect the open-loop control of this motor controller.
Definition Configs.hpp:2837
std::string Serialize() const override
Definition Configs.hpp:2969
std::string ToString() const override
Definition Configs.hpp:2959
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:2979
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:5711
std::string ToString() const override
Definition Configs.hpp:6135
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:6167
std::string Serialize() const override
Definition Configs.hpp:6151
Gains for the specified slot.
Definition Configs.hpp:6206
std::string Serialize() const override
Definition Configs.hpp:6646
std::string ToString() const override
Definition Configs.hpp:6630
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:6662
Gains for the specified slot.
Definition Configs.hpp:6701
std::string Serialize() const override
Definition Configs.hpp:7141
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:7157
std::string ToString() const override
Definition Configs.hpp:7125
Gains for the specified slot.
Definition Configs.hpp:7195
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize)
Definition Configs.hpp:7712
std::string Serialize() const
Definition Configs.hpp:7695
Configs that affect how software-limit switches behave.
Definition Configs.hpp:3837
std::string ToString() const override
Definition Configs.hpp:3956
std::string Serialize() const override
Definition Configs.hpp:3967
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:3978
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:1190
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition Configs.hpp:1314
std::string Serialize() const override
Definition Configs.hpp:1304
std::string ToString() const override
Definition Configs.hpp:1294
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:7838
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse() override
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
Definition CoreTalonFXS.hpp:7558
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:7754
ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds) override
Clear the sticky faults in the device.
Definition CoreTalonFXS.hpp:7405
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:8076
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:7486
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorMissing() override
Clear sticky fault: Motor temperature signal appears to not be connected.
Definition CoreTalonFXS.hpp:8100
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:8014
ctre::phoenix::StatusCode SetControl(const controls::ControlRequest &request) override
Control device with generic control request object.
Definition CoreTalonFXS.hpp:7226
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:7814
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:7943
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:7694
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:7628
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:7593
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:8124
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:7742
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:7778
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:8002
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:7718
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:8052
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:7895
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:8026
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:7420
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:7570
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:7546
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp(units::time::second_t timeoutSeconds) override
Clear sticky fault: Device temperature exceeded limit.
Definition CoreTalonFXS.hpp:7475
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset() override
Clear sticky fault: The remote sensor has reset.
Definition CoreTalonFXS.hpp:7604
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:7766
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:7802
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:7582
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid() override
Clear sticky fault: The remote sensor's data is no longer trusted.
Definition CoreTalonFXS.hpp:7880
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable() override
Clear sticky fault: Device boot while detecting the enable signal.
Definition CoreTalonFXS.hpp:7534
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:7377
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:7932
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:7730
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:7658
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:7643
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.
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:8039
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:8088
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:7431
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:7978
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:8112
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:7910
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:7790
ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote() override
Clear sticky fault: The remote soft limit device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:7826
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:7990
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage() override
Clear sticky fault: Device supply voltage dropped to near brownout levels.
Definition CoreTalonFXS.hpp:7510
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:7522
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:7390
ctre::phoenix::StatusCode ClearStickyFault_Hardware() override
Clear sticky fault: Hardware fault occurred.
Definition CoreTalonFXS.hpp:7442
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:7850
ctre::phoenix::StatusCode ClearStickyFault_ProcTemp(units::time::second_t timeoutSeconds) override
Clear sticky fault: Processor temperature exceeded limit.
Definition CoreTalonFXS.hpp:7453
ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit() override
Clear sticky fault: Supply current limit occured.
Definition CoreTalonFXS.hpp:7954
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.
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:7706
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:7865
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:7966
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:8064
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:7682
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:7670
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:7921
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:7464
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:7616
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:7498
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