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