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