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