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