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