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