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