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