CTRE Phoenix 6 C++ 26.1.1
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 The follower will atomically change its output type when
7730 * it receives the leader's latest output status signal (DutyCycle,
7731 * MotorVoltage, TorqueCurrent). If Talon is in torque control, the
7732 * torque is copied - which will increase the total torque applied. If
7733 * Talon is in duty cycle output control, the duty cycle is matched.
7734 * If Talon is in voltage output control, the motor voltage is
7735 * matched. Motor direction either matches the leader's configured
7736 * direction or opposes it based on the MotorAlignment.
7737 *
7738 * The leader must ensure the status signal corresponding to its
7739 * control output type (DutyCycle, MotorVoltage, TorqueCurrent) is
7740 * enabled. The update rate of the status signal determines the update
7741 * rate of the follower's output and should be no slower than 20 Hz.
7742 *
7743 * - Follower Parameters:
7744 * - LeaderID: Device ID of the leader to follow.
7745 * - MotorAlignment: Set to Aligned for motor invert to match the leader's
7746 * configured Invert - which is typical when leader and
7747 * follower are mechanically linked and spin in the same
7748 * direction. Set to Opposed for motor invert to oppose the
7749 * leader's configured Invert - this is typical where the
7750 * leader and follower mechanically spin in opposite
7751 * directions.
7752 *
7753 * \param request Control object to request of the device
7754 * \returns Status Code of the request, 0 is OK
7755 */
7756 ctre::phoenix::StatusCode SetControl(const controls::Follower &request) final;
7757
7758 /**
7759 * \brief Follow the motor output of another Talon while ignoring the
7760 * leader's invert setting.
7761 *
7762 * \details The follower will atomically change its output type when
7763 * it receives the leader's latest output status signal (DutyCycle,
7764 * MotorVoltage, TorqueCurrent). If Talon is in torque control, the
7765 * torque is copied - which will increase the total torque applied. If
7766 * Talon is in duty cycle output control, the duty cycle is matched.
7767 * If Talon is in voltage output control, the motor voltage is
7768 * matched. Motor direction is strictly determined by the configured
7769 * invert and not the leader. If you want motor direction to match or
7770 * oppose the leader, use Follower instead.
7771 *
7772 * The leader must ensure the status signal corresponding to its
7773 * control output type (DutyCycle, MotorVoltage, TorqueCurrent) is
7774 * enabled. The update rate of the status signal determines the update
7775 * rate of the follower's output and should be no slower than 20 Hz.
7776 *
7777 * - StrictFollower Parameters:
7778 * - LeaderID: Device ID of the leader to follow.
7779 *
7780 * \param request Control object to request of the device
7781 * \returns Status Code of the request, 0 is OK
7782 */
7783 ctre::phoenix::StatusCode SetControl(const controls::StrictFollower &request) final;
7784
7785 /**
7786 * \brief Follow the differential motor output of another Talon.
7787 *
7788 * \details If Talon is in torque control, the differential torque is
7789 * copied - which will increase the total torque applied. If Talon is
7790 * in duty cycle output control, the differential duty cycle is
7791 * matched. If Talon is in voltage output control, the differential
7792 * motor voltage is matched. Motor direction either matches leader's
7793 * configured direction or opposes it based on the MotorAlignment.
7794 *
7795 * The leader must enable its DifferentialOutput status signal. The
7796 * update rate of the status signal determines the update rate of the
7797 * follower's output and should be no slower than 20 Hz.
7798 *
7799 * - DifferentialFollower Parameters:
7800 * - LeaderID: Device ID of the differential leader to follow.
7801 * - MotorAlignment: Set to Aligned for motor invert to match the leader's
7802 * configured Invert - which is typical when leader and
7803 * follower are mechanically linked and spin in the same
7804 * direction. Set to Opposed for motor invert to oppose the
7805 * leader's configured Invert - this is typical where the
7806 * leader and follower mechanically spin in opposite
7807 * directions.
7808 *
7809 * \param request Control object to request of the device
7810 * \returns Status Code of the request, 0 is OK
7811 */
7812 ctre::phoenix::StatusCode SetControl(const controls::DifferentialFollower &request) final;
7813
7814 /**
7815 * \brief Follow the differential motor output of another Talon while
7816 * ignoring the leader's invert setting.
7817 *
7818 * \details If Talon is in torque control, the differential torque is
7819 * copied - which will increase the total torque applied. If Talon is
7820 * in duty cycle output control, the differential duty cycle is
7821 * matched. If Talon is in voltage output control, the differential
7822 * motor voltage is matched. Motor direction is strictly determined by
7823 * the configured invert and not the leader. If you want motor
7824 * direction to match or oppose the leader, use DifferentialFollower
7825 * instead.
7826 *
7827 * The leader must enable its DifferentialOutput status signal. The
7828 * update rate of the status signal determines the update rate of the
7829 * follower's output and should be no slower than 20 Hz.
7830 *
7831 * - DifferentialStrictFollower Parameters:
7832 * - LeaderID: Device ID of the differential leader to follow.
7833 *
7834 * \param request Control object to request of the device
7835 * \returns Status Code of the request, 0 is OK
7836 */
7837 ctre::phoenix::StatusCode SetControl(const controls::DifferentialStrictFollower &request) final;
7838
7839 /**
7840 * \brief Request neutral output of actuator. The applied brake type
7841 * is determined by the NeutralMode configuration.
7842 *
7843 * - NeutralOut Parameters:
7844 * - UseTimesync: Set to true to delay applying this control request until a
7845 * timesync boundary (requires Phoenix Pro and CANivore). This
7846 * eliminates the impact of nondeterministic network delays in
7847 * exchange for a larger but deterministic control latency.
7848 *
7849 * This requires setting the ControlTimesyncFreqHz config in
7850 * MotorOutputConfigs. Additionally, when this is enabled, the
7851 * UpdateFreqHz of this request should be set to 0 Hz.
7852 *
7853 * \param request Control object to request of the device
7854 * \returns Status Code of the request, 0 is OK
7855 */
7856 ctre::phoenix::StatusCode SetControl(const controls::NeutralOut &request) final;
7857
7858 /**
7859 * \brief Request coast neutral output of actuator. The bridge is
7860 * disabled and the rotor is allowed to coast.
7861 *
7862 * - CoastOut Parameters:
7863 * - UseTimesync: Set to true to delay applying this control request until a
7864 * timesync boundary (requires Phoenix Pro and CANivore). This
7865 * eliminates the impact of nondeterministic network delays in
7866 * exchange for a larger but deterministic control latency.
7867 *
7868 * This requires setting the ControlTimesyncFreqHz config in
7869 * MotorOutputConfigs. Additionally, when this is enabled, the
7870 * UpdateFreqHz of this request should be set to 0 Hz.
7871 *
7872 * \param request Control object to request of the device
7873 * \returns Status Code of the request, 0 is OK
7874 */
7875 ctre::phoenix::StatusCode SetControl(const controls::CoastOut &request) final;
7876
7877 /**
7878 * \brief Applies full neutral-brake by shorting motor leads together.
7879 *
7880 * - StaticBrake Parameters:
7881 * - UseTimesync: Set to true to delay applying this control request until a
7882 * timesync boundary (requires Phoenix Pro and CANivore). This
7883 * eliminates the impact of nondeterministic network delays in
7884 * exchange for a larger but deterministic control latency.
7885 *
7886 * This requires setting the ControlTimesyncFreqHz config in
7887 * MotorOutputConfigs. Additionally, when this is enabled, the
7888 * UpdateFreqHz of this request should be set to 0 Hz.
7889 *
7890 * \param request Control object to request of the device
7891 * \returns Status Code of the request, 0 is OK
7892 */
7893 ctre::phoenix::StatusCode SetControl(const controls::StaticBrake &request) final;
7894
7895 /**
7896 * \brief Requests Motion Magic® to target a final velocity using a
7897 * motion profile. This allows smooth transitions between velocity
7898 * set points. Users can optionally provide a duty cycle feedforward.
7899 *
7900 * \details Motion Magic® Velocity produces a motion profile in
7901 * real-time while attempting to honor the specified Acceleration and
7902 * (optional) Jerk. This control mode does not use the
7903 * CruiseVelocity, Expo_kV, or Expo_kA configs.
7904 *
7905 * If the specified acceleration is zero, the Acceleration under
7906 * Motion Magic® configuration parameter is used instead. This allows
7907 * for runtime adjustment of acceleration for advanced users. Jerk is
7908 * also specified in the Motion Magic® persistent configuration
7909 * values. If Jerk is set to zero, Motion Magic® will produce a
7910 * trapezoidal acceleration profile.
7911 *
7912 * Target velocity can also be changed on-the-fly and Motion Magic®
7913 * will do its best to adjust the profile. This control mode is duty
7914 * cycle based, so relevant closed-loop gains will use fractional duty
7915 * cycle for the numerator: +1.0 represents full forward output.
7916 *
7917 * - MotionMagicVelocityDutyCycle Parameters:
7918 * - Velocity: Target velocity to drive toward in rotations per second. This
7919 * can be changed on-the fly.
7920 * - Acceleration: This is the absolute Acceleration to use generating the
7921 * profile. If this parameter is zero, the Acceleration
7922 * persistent configuration parameter is used instead.
7923 * Acceleration is in rotations per second squared. If
7924 * nonzero, the signage does not matter as the absolute value
7925 * is used.
7926 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
7927 * which increases peak power by ~15% on supported devices (see
7928 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
7929 * commutation.
7930 *
7931 * FOC improves motor performance by leveraging torque (current)
7932 * control. However, this may be inconvenient for applications
7933 * that require specifying duty cycle or voltage.
7934 * CTR-Electronics has developed a hybrid method that combines
7935 * the performances gains of FOC while still allowing
7936 * applications to provide duty cycle or voltage demand. This
7937 * not to be confused with simple sinusoidal control or phase
7938 * voltage control which lacks the performance gains.
7939 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
7940 * This is added to the output of the onboard feedforward
7941 * terms.
7942 * - Slot: Select which gains are applied by selecting the slot. Use the
7943 * configuration api to set the gain values for the selected slot
7944 * before enabling this feature. Slot must be within [0,2].
7945 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
7946 * output is zero (or within deadband). Set to
7947 * false to use the NeutralMode configuration
7948 * setting (default). This flag exists to provide
7949 * the fundamental behavior of this control when
7950 * output is zero, which is to provide 0V to the
7951 * motor.
7952 * - LimitForwardMotion: Set to true to force forward 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 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
7957 * users to use other limit switch sensors connected to
7958 * robot controller. This also allows use of active
7959 * sensors that require external power.
7960 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
7961 * the LimitForwardMotion and LimitReverseMotion
7962 * parameters, instead allowing motion.
7963 *
7964 * This can be useful on mechanisms such as an
7965 * intake/feeder, where a limit switch stops motion
7966 * while intaking but should be ignored when feeding
7967 * to a shooter.
7968 *
7969 * The hardware limit faults and Forward/ReverseLimit
7970 * signals will still report the values of the limit
7971 * switches regardless of this parameter.
7972 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
7973 * allowing motion.
7974 *
7975 * This can be useful when calibrating the zero point
7976 * of a mechanism such as an elevator.
7977 *
7978 * The software limit faults will still report the
7979 * values of the software limits regardless of this
7980 * parameter.
7981 * - UseTimesync: Set to true to delay applying this control request until a
7982 * timesync boundary (requires Phoenix Pro and CANivore). This
7983 * eliminates the impact of nondeterministic network delays in
7984 * exchange for a larger but deterministic control latency.
7985 *
7986 * This requires setting the ControlTimesyncFreqHz config in
7987 * MotorOutputConfigs. Additionally, when this is enabled, the
7988 * UpdateFreqHz of this request should be set to 0 Hz.
7989 *
7990 * \param request Control object to request of the device
7991 * \returns Status Code of the request, 0 is OK
7992 */
7993 ctre::phoenix::StatusCode SetControl(const controls::MotionMagicVelocityDutyCycle &request) final;
7994
7995 /**
7996 * \brief Requests Motion Magic® to target a final velocity using a
7997 * motion profile. This allows smooth transitions between velocity
7998 * set points. Users can optionally provide a voltage feedforward.
7999 *
8000 * \details Motion Magic® Velocity produces a motion profile in
8001 * real-time while attempting to honor the specified Acceleration and
8002 * (optional) Jerk. This control mode does not use the
8003 * CruiseVelocity, Expo_kV, or Expo_kA configs.
8004 *
8005 * If the specified acceleration is zero, the Acceleration under
8006 * Motion Magic® configuration parameter is used instead. This allows
8007 * for runtime adjustment of acceleration for advanced users. Jerk is
8008 * also specified in the Motion Magic® persistent configuration
8009 * values. If Jerk is set to zero, Motion Magic® will produce a
8010 * trapezoidal acceleration profile.
8011 *
8012 * Target velocity can also be changed on-the-fly and Motion Magic®
8013 * will do its best to adjust the profile. This control mode is
8014 * voltage-based, so relevant closed-loop gains will use Volts for the
8015 * numerator.
8016 *
8017 * - MotionMagicVelocityVoltage Parameters:
8018 * - Velocity: Target velocity to drive toward in rotations per second. This
8019 * can be changed on-the fly.
8020 * - Acceleration: This is the absolute Acceleration to use generating the
8021 * profile. If this parameter is zero, the Acceleration
8022 * persistent configuration parameter is used instead.
8023 * Acceleration is in rotations per second squared. If
8024 * nonzero, the signage does not matter as the absolute value
8025 * is used.
8026 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8027 * which increases peak power by ~15% on supported devices (see
8028 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8029 * commutation.
8030 *
8031 * FOC improves motor performance by leveraging torque (current)
8032 * control. However, this may be inconvenient for applications
8033 * that require specifying duty cycle or voltage.
8034 * CTR-Electronics has developed a hybrid method that combines
8035 * the performances gains of FOC while still allowing
8036 * applications to provide duty cycle or voltage demand. This
8037 * not to be confused with simple sinusoidal control or phase
8038 * voltage control which lacks the performance gains.
8039 * - FeedForward: Feedforward to apply in volts. This is added to the output
8040 * of the onboard feedforward terms.
8041 * - Slot: Select which gains are applied by selecting the slot. Use the
8042 * configuration api to set the gain values for the selected slot
8043 * before enabling this feature. Slot must be within [0,2].
8044 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8045 * output is zero (or within deadband). Set to
8046 * false to use the NeutralMode configuration
8047 * setting (default). This flag exists to provide
8048 * the fundamental behavior of this control when
8049 * output is zero, which is to provide 0V to the
8050 * motor.
8051 * - LimitForwardMotion: Set to true to force forward 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 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8056 * users to use other limit switch sensors connected to
8057 * robot controller. This also allows use of active
8058 * sensors that require external power.
8059 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8060 * the LimitForwardMotion and LimitReverseMotion
8061 * parameters, instead allowing motion.
8062 *
8063 * This can be useful on mechanisms such as an
8064 * intake/feeder, where a limit switch stops motion
8065 * while intaking but should be ignored when feeding
8066 * to a shooter.
8067 *
8068 * The hardware limit faults and Forward/ReverseLimit
8069 * signals will still report the values of the limit
8070 * switches regardless of this parameter.
8071 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8072 * allowing motion.
8073 *
8074 * This can be useful when calibrating the zero point
8075 * of a mechanism such as an elevator.
8076 *
8077 * The software limit faults will still report the
8078 * values of the software limits regardless of this
8079 * parameter.
8080 * - UseTimesync: Set to true to delay applying this control request until a
8081 * timesync boundary (requires Phoenix Pro and CANivore). This
8082 * eliminates the impact of nondeterministic network delays in
8083 * exchange for a larger but deterministic control latency.
8084 *
8085 * This requires setting the ControlTimesyncFreqHz config in
8086 * MotorOutputConfigs. Additionally, when this is enabled, the
8087 * UpdateFreqHz of this request should be set to 0 Hz.
8088 *
8089 * \param request Control object to request of the device
8090 * \returns Status Code of the request, 0 is OK
8091 */
8092 ctre::phoenix::StatusCode SetControl(const controls::MotionMagicVelocityVoltage &request) final;
8093
8094 /**
8095 * \brief Requests Motion Magic® to target a final position using an
8096 * exponential motion profile. Users can optionally provide a duty
8097 * cycle feedforward.
8098 *
8099 * \details Motion Magic® Expo produces a motion profile in real-time
8100 * while attempting to honor the Cruise Velocity (optional) and the
8101 * mechanism kV and kA, specified via the Motion Magic® configuration
8102 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA
8103 * configs are always in output units of Volts.
8104 *
8105 * Setting Cruise Velocity to 0 will allow the profile to run to the
8106 * max possible velocity based on Expo_kV. This control mode does not
8107 * use the Acceleration or Jerk configs.
8108 *
8109 * Target position can be changed on-the-fly and Motion Magic® will do
8110 * its best to adjust the profile. This control mode is duty cycle
8111 * based, so relevant closed-loop gains will use fractional duty cycle
8112 * for the numerator: +1.0 represents full forward output.
8113 *
8114 * - MotionMagicExpoDutyCycle Parameters:
8115 * - Position: Position to drive toward in rotations.
8116 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8117 * which increases peak power by ~15% on supported devices (see
8118 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8119 * commutation.
8120 *
8121 * FOC improves motor performance by leveraging torque (current)
8122 * control. However, this may be inconvenient for applications
8123 * that require specifying duty cycle or voltage.
8124 * CTR-Electronics has developed a hybrid method that combines
8125 * the performances gains of FOC while still allowing
8126 * applications to provide duty cycle or voltage demand. This
8127 * not to be confused with simple sinusoidal control or phase
8128 * voltage control which lacks the performance gains.
8129 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
8130 * This is added to the output of the onboard feedforward
8131 * terms.
8132 * - Slot: Select which gains are applied by selecting the slot. Use the
8133 * configuration api to set the gain values for the selected slot
8134 * before enabling this feature. Slot must be within [0,2].
8135 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8136 * output is zero (or within deadband). Set to
8137 * false to use the NeutralMode configuration
8138 * setting (default). This flag exists to provide
8139 * the fundamental behavior of this control when
8140 * output is zero, which is to provide 0V to the
8141 * motor.
8142 * - LimitForwardMotion: Set to true to force forward 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 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8147 * users to use other limit switch sensors connected to
8148 * robot controller. This also allows use of active
8149 * sensors that require external power.
8150 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8151 * the LimitForwardMotion and LimitReverseMotion
8152 * parameters, instead allowing motion.
8153 *
8154 * This can be useful on mechanisms such as an
8155 * intake/feeder, where a limit switch stops motion
8156 * while intaking but should be ignored when feeding
8157 * to a shooter.
8158 *
8159 * The hardware limit faults and Forward/ReverseLimit
8160 * signals will still report the values of the limit
8161 * switches regardless of this parameter.
8162 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8163 * allowing motion.
8164 *
8165 * This can be useful when calibrating the zero point
8166 * of a mechanism such as an elevator.
8167 *
8168 * The software limit faults will still report the
8169 * values of the software limits regardless of this
8170 * parameter.
8171 * - UseTimesync: Set to true to delay applying this control request until a
8172 * timesync boundary (requires Phoenix Pro and CANivore). This
8173 * eliminates the impact of nondeterministic network delays in
8174 * exchange for a larger but deterministic control latency.
8175 *
8176 * This requires setting the ControlTimesyncFreqHz config in
8177 * MotorOutputConfigs. Additionally, when this is enabled, the
8178 * UpdateFreqHz of this request should be set to 0 Hz.
8179 *
8180 * \param request Control object to request of the device
8181 * \returns Status Code of the request, 0 is OK
8182 */
8183 ctre::phoenix::StatusCode SetControl(const controls::MotionMagicExpoDutyCycle &request) final;
8184
8185 /**
8186 * \brief Requests Motion Magic® to target a final position using an
8187 * exponential motion profile. Users can optionally provide a voltage
8188 * feedforward.
8189 *
8190 * \details Motion Magic® Expo produces a motion profile in real-time
8191 * while attempting to honor the Cruise Velocity (optional) and the
8192 * mechanism kV and kA, specified via the Motion Magic® configuration
8193 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA
8194 * configs are always in output units of Volts.
8195 *
8196 * Setting Cruise Velocity to 0 will allow the profile to run to the
8197 * max possible velocity based on Expo_kV. This control mode does not
8198 * use the Acceleration or Jerk configs.
8199 *
8200 * Target position can be changed on-the-fly and Motion Magic® will do
8201 * its best to adjust the profile. This control mode is
8202 * voltage-based, so relevant closed-loop gains will use Volts for the
8203 * numerator.
8204 *
8205 * - MotionMagicExpoVoltage Parameters:
8206 * - Position: Position to drive toward in rotations.
8207 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8208 * which increases peak power by ~15% on supported devices (see
8209 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8210 * commutation.
8211 *
8212 * FOC improves motor performance by leveraging torque (current)
8213 * control. However, this may be inconvenient for applications
8214 * that require specifying duty cycle or voltage.
8215 * CTR-Electronics has developed a hybrid method that combines
8216 * the performances gains of FOC while still allowing
8217 * applications to provide duty cycle or voltage demand. This
8218 * not to be confused with simple sinusoidal control or phase
8219 * voltage control which lacks the performance gains.
8220 * - FeedForward: Feedforward to apply in volts. This is added to the output
8221 * of the onboard feedforward terms.
8222 * - Slot: Select which gains are applied by selecting the slot. Use the
8223 * configuration api to set the gain values for the selected slot
8224 * before enabling this feature. Slot must be within [0,2].
8225 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8226 * output is zero (or within deadband). Set to
8227 * false to use the NeutralMode configuration
8228 * setting (default). This flag exists to provide
8229 * the fundamental behavior of this control when
8230 * output is zero, which is to provide 0V to the
8231 * motor.
8232 * - LimitForwardMotion: Set to true to force forward 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 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8237 * users to use other limit switch sensors connected to
8238 * robot controller. This also allows use of active
8239 * sensors that require external power.
8240 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8241 * the LimitForwardMotion and LimitReverseMotion
8242 * parameters, instead allowing motion.
8243 *
8244 * This can be useful on mechanisms such as an
8245 * intake/feeder, where a limit switch stops motion
8246 * while intaking but should be ignored when feeding
8247 * to a shooter.
8248 *
8249 * The hardware limit faults and Forward/ReverseLimit
8250 * signals will still report the values of the limit
8251 * switches regardless of this parameter.
8252 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8253 * allowing motion.
8254 *
8255 * This can be useful when calibrating the zero point
8256 * of a mechanism such as an elevator.
8257 *
8258 * The software limit faults will still report the
8259 * values of the software limits regardless of this
8260 * parameter.
8261 * - UseTimesync: Set to true to delay applying this control request until a
8262 * timesync boundary (requires Phoenix Pro and CANivore). This
8263 * eliminates the impact of nondeterministic network delays in
8264 * exchange for a larger but deterministic control latency.
8265 *
8266 * This requires setting the ControlTimesyncFreqHz config in
8267 * MotorOutputConfigs. Additionally, when this is enabled, the
8268 * UpdateFreqHz of this request should be set to 0 Hz.
8269 *
8270 * \param request Control object to request of the device
8271 * \returns Status Code of the request, 0 is OK
8272 */
8273 ctre::phoenix::StatusCode SetControl(const controls::MotionMagicExpoVoltage &request) final;
8274
8275 /**
8276 * \brief Requests Motion Magic® to target a final position using a
8277 * motion profile. This dynamic request allows runtime changes to
8278 * Cruise Velocity, Acceleration, and (optional) Jerk. Users can
8279 * optionally provide a duty cycle feedforward.
8280 *
8281 * \details Motion Magic® produces a motion profile in real-time while
8282 * attempting to honor the specified Cruise Velocity, Acceleration,
8283 * and (optional) Jerk. This control mode does not use the Expo_kV or
8284 * Expo_kA configs.
8285 *
8286 * Target position can be changed on-the-fly and Motion Magic® will do
8287 * its best to adjust the profile. This control mode is duty cycle
8288 * based, so relevant closed-loop gains will use fractional duty cycle
8289 * for the numerator: +1.0 represents full forward output.
8290 *
8291 * - DynamicMotionMagicDutyCycle Parameters:
8292 * - Position: Position to drive toward in rotations.
8293 * - Velocity: Cruise velocity for profiling. The signage does not matter as
8294 * the device will use the absolute value for profile generation.
8295 * - Acceleration: Acceleration for profiling. The signage does not matter as
8296 * the device will use the absolute value for profile
8297 * generation
8298 * - Jerk: Jerk for profiling. The signage does not matter as the device will
8299 * use the absolute value for profile generation.
8300 *
8301 * Jerk is optional; if this is set to zero, then Motion Magic® will
8302 * not apply a Jerk limit.
8303 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8304 * which increases peak power by ~15% on supported devices (see
8305 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8306 * commutation.
8307 *
8308 * FOC improves motor performance by leveraging torque (current)
8309 * control. However, this may be inconvenient for applications
8310 * that require specifying duty cycle or voltage.
8311 * CTR-Electronics has developed a hybrid method that combines
8312 * the performances gains of FOC while still allowing
8313 * applications to provide duty cycle or voltage demand. This
8314 * not to be confused with simple sinusoidal control or phase
8315 * voltage control which lacks the performance gains.
8316 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
8317 * This is added to the output of the onboard feedforward
8318 * terms.
8319 * - Slot: Select which gains are applied by selecting the slot. Use the
8320 * configuration api to set the gain values for the selected slot
8321 * before enabling this feature. Slot must be within [0,2].
8322 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8323 * output is zero (or within deadband). Set to
8324 * false to use the NeutralMode configuration
8325 * setting (default). This flag exists to provide
8326 * the fundamental behavior of this control when
8327 * output is zero, which is to provide 0V to the
8328 * motor.
8329 * - LimitForwardMotion: Set to true to force forward 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 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8334 * users to use other limit switch sensors connected to
8335 * robot controller. This also allows use of active
8336 * sensors that require external power.
8337 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8338 * the LimitForwardMotion and LimitReverseMotion
8339 * parameters, instead allowing motion.
8340 *
8341 * This can be useful on mechanisms such as an
8342 * intake/feeder, where a limit switch stops motion
8343 * while intaking but should be ignored when feeding
8344 * to a shooter.
8345 *
8346 * The hardware limit faults and Forward/ReverseLimit
8347 * signals will still report the values of the limit
8348 * switches regardless of this parameter.
8349 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8350 * allowing motion.
8351 *
8352 * This can be useful when calibrating the zero point
8353 * of a mechanism such as an elevator.
8354 *
8355 * The software limit faults will still report the
8356 * values of the software limits regardless of this
8357 * parameter.
8358 * - UseTimesync: Set to true to delay applying this control request until a
8359 * timesync boundary (requires Phoenix Pro and CANivore). This
8360 * eliminates the impact of nondeterministic network delays in
8361 * exchange for a larger but deterministic control latency.
8362 *
8363 * This requires setting the ControlTimesyncFreqHz config in
8364 * MotorOutputConfigs. Additionally, when this is enabled, the
8365 * UpdateFreqHz of this request should be set to 0 Hz.
8366 *
8367 * \param request Control object to request of the device
8368 * \returns Status Code of the request, 0 is OK
8369 */
8370 ctre::phoenix::StatusCode SetControl(const controls::DynamicMotionMagicDutyCycle &request) final;
8371
8372 /**
8373 * \brief Requests Motion Magic® to target a final position using a
8374 * motion profile. This dynamic request allows runtime changes to
8375 * Cruise Velocity, Acceleration, and (optional) Jerk. Users can
8376 * optionally provide a voltage feedforward.
8377 *
8378 * \details Motion Magic® produces a motion profile in real-time while
8379 * attempting to honor the specified Cruise Velocity, Acceleration,
8380 * and (optional) Jerk. This control mode does not use the Expo_kV or
8381 * Expo_kA configs.
8382 *
8383 * Target position can be changed on-the-fly and Motion Magic® will do
8384 * its best to adjust the profile. This control mode is
8385 * voltage-based, so relevant closed-loop gains will use Volts for the
8386 * numerator.
8387 *
8388 * - DynamicMotionMagicVoltage Parameters:
8389 * - Position: Position to drive toward in rotations.
8390 * - Velocity: Cruise velocity for profiling. The signage does not matter as
8391 * the device will use the absolute value for profile generation.
8392 * - Acceleration: Acceleration for profiling. The signage does not matter as
8393 * the device will use the absolute value for profile
8394 * generation.
8395 * - Jerk: Jerk for profiling. The signage does not matter as the device will
8396 * use the absolute value for profile generation.
8397 *
8398 * Jerk is optional; if this is set to zero, then Motion Magic® will
8399 * not apply a Jerk limit.
8400 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8401 * which increases peak power by ~15% on supported devices (see
8402 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8403 * commutation.
8404 *
8405 * FOC improves motor performance by leveraging torque (current)
8406 * control. However, this may be inconvenient for applications
8407 * that require specifying duty cycle or voltage.
8408 * CTR-Electronics has developed a hybrid method that combines
8409 * the performances gains of FOC while still allowing
8410 * applications to provide duty cycle or voltage demand. This
8411 * not to be confused with simple sinusoidal control or phase
8412 * voltage control which lacks the performance gains.
8413 * - FeedForward: Feedforward to apply in volts. This is added to the output
8414 * of the onboard feedforward terms.
8415 * - Slot: Select which gains are applied by selecting the slot. Use the
8416 * configuration api to set the gain values for the selected slot
8417 * before enabling this feature. Slot must be within [0,2].
8418 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8419 * output is zero (or within deadband). Set to
8420 * false to use the NeutralMode configuration
8421 * setting (default). This flag exists to provide
8422 * the fundamental behavior of this control when
8423 * output is zero, which is to provide 0V to the
8424 * motor.
8425 * - LimitForwardMotion: Set to true to force forward 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 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8430 * users to use other limit switch sensors connected to
8431 * robot controller. This also allows use of active
8432 * sensors that require external power.
8433 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8434 * the LimitForwardMotion and LimitReverseMotion
8435 * parameters, instead allowing motion.
8436 *
8437 * This can be useful on mechanisms such as an
8438 * intake/feeder, where a limit switch stops motion
8439 * while intaking but should be ignored when feeding
8440 * to a shooter.
8441 *
8442 * The hardware limit faults and Forward/ReverseLimit
8443 * signals will still report the values of the limit
8444 * switches regardless of this parameter.
8445 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8446 * allowing motion.
8447 *
8448 * This can be useful when calibrating the zero point
8449 * of a mechanism such as an elevator.
8450 *
8451 * The software limit faults will still report the
8452 * values of the software limits regardless of this
8453 * parameter.
8454 * - UseTimesync: Set to true to delay applying this control request until a
8455 * timesync boundary (requires Phoenix Pro and CANivore). This
8456 * eliminates the impact of nondeterministic network delays in
8457 * exchange for a larger but deterministic control latency.
8458 *
8459 * This requires setting the ControlTimesyncFreqHz config in
8460 * MotorOutputConfigs. Additionally, when this is enabled, the
8461 * UpdateFreqHz of this request should be set to 0 Hz.
8462 *
8463 * \param request Control object to request of the device
8464 * \returns Status Code of the request, 0 is OK
8465 */
8466 ctre::phoenix::StatusCode SetControl(const controls::DynamicMotionMagicVoltage &request) final;
8467
8468 /**
8469 * \brief Requests Motion Magic® Expo to target a final position using
8470 * an exponential motion profile. This dynamic request allows runtime
8471 * changes to the profile kV, kA, and (optional) Cruise Velocity.
8472 * Users can optionally provide a duty cycle feedforward.
8473 *
8474 * \details Motion Magic® Expo produces a motion profile in real-time
8475 * while attempting to honor the specified Cruise Velocity (optional)
8476 * and the mechanism kV and kA. Note that unlike the slot gains, the
8477 * Expo_kV and Expo_kA parameters are always in output units of Volts.
8478 *
8479 * Setting the Cruise Velocity to 0 will allow the profile to run to
8480 * the max possible velocity based on Expo_kV. This control mode does
8481 * not use the Acceleration or Jerk configs.
8482 *
8483 * Target position can be changed on-the-fly and Motion Magic® will do
8484 * its best to adjust the profile. This control mode is duty cycle
8485 * based, so relevant closed-loop gains will use fractional duty cycle
8486 * for the numerator: +1.0 represents full forward output.
8487 *
8488 * - DynamicMotionMagicExpoDutyCycle Parameters:
8489 * - Position: Position to drive toward in rotations.
8490 * - kV: Mechanism kV for profiling. Unlike the kV slot gain, this is always
8491 * in units of V/rps.
8492 *
8493 * This represents the amount of voltage necessary to hold a velocity.
8494 * In terms of the Motion Magic® Expo profile, a higher kV results in a
8495 * slower maximum velocity.
8496 * - kA: Mechanism kA for profiling. Unlike the kA slot gain, this is always
8497 * in units of V/rps².
8498 *
8499 * This represents the amount of voltage necessary to achieve an
8500 * acceleration. In terms of the Motion Magic® Expo profile, a higher
8501 * kA results in a slower acceleration.
8502 * - Velocity: Cruise velocity for profiling. The signage does not matter as
8503 * the device will use the absolute value for profile generation.
8504 * Setting this to 0 will allow the profile to run to the max
8505 * possible velocity based on Expo_kV.
8506 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8507 * which increases peak power by ~15% on supported devices (see
8508 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8509 * commutation.
8510 *
8511 * FOC improves motor performance by leveraging torque (current)
8512 * control. However, this may be inconvenient for applications
8513 * that require specifying duty cycle or voltage.
8514 * CTR-Electronics has developed a hybrid method that combines
8515 * the performances gains of FOC while still allowing
8516 * applications to provide duty cycle or voltage demand. This
8517 * not to be confused with simple sinusoidal control or phase
8518 * voltage control which lacks the performance gains.
8519 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
8520 * This is added to the output of the onboard feedforward
8521 * terms.
8522 * - Slot: Select which gains are applied by selecting the slot. Use the
8523 * configuration api to set the gain values for the selected slot
8524 * before enabling this feature. Slot must be within [0,2].
8525 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8526 * output is zero (or within deadband). Set to
8527 * false to use the NeutralMode configuration
8528 * setting (default). This flag exists to provide
8529 * the fundamental behavior of this control when
8530 * output is zero, which is to provide 0V to the
8531 * motor.
8532 * - LimitForwardMotion: Set to true to force forward 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 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8537 * users to use other limit switch sensors connected to
8538 * robot controller. This also allows use of active
8539 * sensors that require external power.
8540 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8541 * the LimitForwardMotion and LimitReverseMotion
8542 * parameters, instead allowing motion.
8543 *
8544 * This can be useful on mechanisms such as an
8545 * intake/feeder, where a limit switch stops motion
8546 * while intaking but should be ignored when feeding
8547 * to a shooter.
8548 *
8549 * The hardware limit faults and Forward/ReverseLimit
8550 * signals will still report the values of the limit
8551 * switches regardless of this parameter.
8552 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8553 * allowing motion.
8554 *
8555 * This can be useful when calibrating the zero point
8556 * of a mechanism such as an elevator.
8557 *
8558 * The software limit faults will still report the
8559 * values of the software limits regardless of this
8560 * parameter.
8561 * - UseTimesync: Set to true to delay applying this control request until a
8562 * timesync boundary (requires Phoenix Pro and CANivore). This
8563 * eliminates the impact of nondeterministic network delays in
8564 * exchange for a larger but deterministic control latency.
8565 *
8566 * This requires setting the ControlTimesyncFreqHz config in
8567 * MotorOutputConfigs. Additionally, when this is enabled, the
8568 * UpdateFreqHz of this request should be set to 0 Hz.
8569 *
8570 * \param request Control object to request of the device
8571 * \returns Status Code of the request, 0 is OK
8572 */
8573 ctre::phoenix::StatusCode SetControl(const controls::DynamicMotionMagicExpoDutyCycle &request) final;
8574
8575 /**
8576 * \brief Requests Motion Magic® Expo to target a final position using
8577 * an exponential motion profile. This dynamic request allows runtime
8578 * changes to the profile kV, kA, and (optional) Cruise Velocity.
8579 * Users can optionally provide a voltage feedforward.
8580 *
8581 * \details Motion Magic® Expo produces a motion profile in real-time
8582 * while attempting to honor the specified Cruise Velocity (optional)
8583 * and the mechanism kV and kA. Note that unlike the slot gains, the
8584 * Expo_kV and Expo_kA parameters are always in output units of Volts.
8585 *
8586 * Setting the Cruise Velocity to 0 will allow the profile to run to
8587 * the max possible velocity based on Expo_kV. This control mode does
8588 * not use the Acceleration or Jerk configs.
8589 *
8590 * Target position can be changed on-the-fly and Motion Magic® will do
8591 * its best to adjust the profile. This control mode is
8592 * voltage-based, so relevant closed-loop gains will use Volts for the
8593 * numerator.
8594 *
8595 * - DynamicMotionMagicExpoVoltage Parameters:
8596 * - Position: Position to drive toward in rotations.
8597 * - kV: Mechanism kV for profiling. Unlike the kV slot gain, this is always
8598 * in units of V/rps.
8599 *
8600 * This represents the amount of voltage necessary to hold a velocity.
8601 * In terms of the Motion Magic® Expo profile, a higher kV results in a
8602 * slower maximum velocity.
8603 * - kA: Mechanism kA for profiling. Unlike the kA slot gain, this is always
8604 * in units of V/rps².
8605 *
8606 * This represents the amount of voltage necessary to achieve an
8607 * acceleration. In terms of the Motion Magic® Expo profile, a higher
8608 * kA results in a slower acceleration.
8609 * - Velocity: Cruise velocity for profiling. The signage does not matter as
8610 * the device will use the absolute value for profile generation.
8611 * Setting this to 0 will allow the profile to run to the max
8612 * possible velocity based on Expo_kV.
8613 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8614 * which increases peak power by ~15% on supported devices (see
8615 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8616 * commutation.
8617 *
8618 * FOC improves motor performance by leveraging torque (current)
8619 * control. However, this may be inconvenient for applications
8620 * that require specifying duty cycle or voltage.
8621 * CTR-Electronics has developed a hybrid method that combines
8622 * the performances gains of FOC while still allowing
8623 * applications to provide duty cycle or voltage demand. This
8624 * not to be confused with simple sinusoidal control or phase
8625 * voltage control which lacks the performance gains.
8626 * - FeedForward: Feedforward to apply in volts. This is added to the output
8627 * of the onboard feedforward terms.
8628 * - Slot: Select which gains are applied by selecting the slot. Use the
8629 * configuration api to set the gain values for the selected slot
8630 * before enabling this feature. Slot must be within [0,2].
8631 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8632 * output is zero (or within deadband). Set to
8633 * false to use the NeutralMode configuration
8634 * setting (default). This flag exists to provide
8635 * the fundamental behavior of this control when
8636 * output is zero, which is to provide 0V to the
8637 * motor.
8638 * - LimitForwardMotion: Set to true to force forward 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 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8643 * users to use other limit switch sensors connected to
8644 * robot controller. This also allows use of active
8645 * sensors that require external power.
8646 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8647 * the LimitForwardMotion and LimitReverseMotion
8648 * parameters, instead allowing motion.
8649 *
8650 * This can be useful on mechanisms such as an
8651 * intake/feeder, where a limit switch stops motion
8652 * while intaking but should be ignored when feeding
8653 * to a shooter.
8654 *
8655 * The hardware limit faults and Forward/ReverseLimit
8656 * signals will still report the values of the limit
8657 * switches regardless of this parameter.
8658 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8659 * allowing motion.
8660 *
8661 * This can be useful when calibrating the zero point
8662 * of a mechanism such as an elevator.
8663 *
8664 * The software limit faults will still report the
8665 * values of the software limits regardless of this
8666 * parameter.
8667 * - UseTimesync: Set to true to delay applying this control request until a
8668 * timesync boundary (requires Phoenix Pro and CANivore). This
8669 * eliminates the impact of nondeterministic network delays in
8670 * exchange for a larger but deterministic control latency.
8671 *
8672 * This requires setting the ControlTimesyncFreqHz config in
8673 * MotorOutputConfigs. Additionally, when this is enabled, the
8674 * UpdateFreqHz of this request should be set to 0 Hz.
8675 *
8676 * \param request Control object to request of the device
8677 * \returns Status Code of the request, 0 is OK
8678 */
8679 ctre::phoenix::StatusCode SetControl(const controls::DynamicMotionMagicExpoVoltage &request) final;
8680
8681 /**
8682 * \brief Differential control with duty cycle average target and
8683 * position difference target.
8684 *
8685 * - Diff_DutyCycleOut_Position Parameters:
8686 * - AverageRequest: Average DutyCycleOut request of the mechanism.
8687 * - DifferentialRequest: Differential PositionDutyCycle request of the
8688 * mechanism.
8689 *
8690 * \param request Control object to request of the device
8691 * \returns Status Code of the request, 0 is OK
8692 */
8693 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_DutyCycleOut_Position &request) final;
8694
8695 /**
8696 * \brief Differential control with position average target and
8697 * position difference target using duty cycle control.
8698 *
8699 * - Diff_PositionDutyCycle_Position Parameters:
8700 * - AverageRequest: Average PositionDutyCycle request of the mechanism.
8701 * - DifferentialRequest: Differential PositionDutyCycle request of the
8702 * mechanism.
8703 *
8704 * \param request Control object to request of the device
8705 * \returns Status Code of the request, 0 is OK
8706 */
8707 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionDutyCycle_Position &request) final;
8708
8709 /**
8710 * \brief Differential control with velocity average target and
8711 * position difference target using duty cycle control.
8712 *
8713 * - Diff_VelocityDutyCycle_Position Parameters:
8714 * - AverageRequest: Average VelocityDutyCYcle request of the mechanism.
8715 * - DifferentialRequest: Differential PositionDutyCycle request of the
8716 * mechanism.
8717 *
8718 * \param request Control object to request of the device
8719 * \returns Status Code of the request, 0 is OK
8720 */
8721 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityDutyCycle_Position &request) final;
8722
8723 /**
8724 * \brief Differential control with Motion Magic® average target and
8725 * position difference target using duty cycle control.
8726 *
8727 * - Diff_MotionMagicDutyCycle_Position Parameters:
8728 * - AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
8729 * - DifferentialRequest: Differential PositionDutyCycle request of the
8730 * mechanism.
8731 *
8732 * \param request Control object to request of the device
8733 * \returns Status Code of the request, 0 is OK
8734 */
8735 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicDutyCycle_Position &request) final;
8736
8737 /**
8738 * \brief Differential control with Motion Magic® Expo average target
8739 * and position difference target using duty cycle control.
8740 *
8741 * - Diff_MotionMagicExpoDutyCycle_Position Parameters:
8742 * - AverageRequest: Average MotionMagicExpoDutyCycle request of the
8743 * mechanism.
8744 * - DifferentialRequest: Differential PositionDutyCycle request of the
8745 * mechanism.
8746 *
8747 * \param request Control object to request of the device
8748 * \returns Status Code of the request, 0 is OK
8749 */
8750 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoDutyCycle_Position &request) final;
8751
8752 /**
8753 * \brief Differential control with Motion Magic® Velocity average
8754 * target and position difference target using duty cycle control.
8755 *
8756 * - Diff_MotionMagicVelocityDutyCycle_Position Parameters:
8757 * - AverageRequest: Average MotionMagicVelocityDutyCycle request of the
8758 * mechanism.
8759 * - DifferentialRequest: Differential PositionDutyCycle request of the
8760 * mechanism.
8761 *
8762 * \param request Control object to request of the device
8763 * \returns Status Code of the request, 0 is OK
8764 */
8765 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityDutyCycle_Position &request) final;
8766
8767 /**
8768 * \brief Differential control with duty cycle average target and
8769 * velocity difference target.
8770 *
8771 * - Diff_DutyCycleOut_Velocity Parameters:
8772 * - AverageRequest: Average DutyCycleOut request of the mechanism.
8773 * - DifferentialRequest: Differential VelocityDutyCycle request of the
8774 * mechanism.
8775 *
8776 * \param request Control object to request of the device
8777 * \returns Status Code of the request, 0 is OK
8778 */
8779 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_DutyCycleOut_Velocity &request) final;
8780
8781 /**
8782 * \brief Differential control with position average target and
8783 * velocity difference target using duty cycle control.
8784 *
8785 * - Diff_PositionDutyCycle_Velocity Parameters:
8786 * - AverageRequest: Average PositionDutyCycle request of the mechanism.
8787 * - DifferentialRequest: Differential VelocityDutyCycle request of the
8788 * mechanism.
8789 *
8790 * \param request Control object to request of the device
8791 * \returns Status Code of the request, 0 is OK
8792 */
8793 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionDutyCycle_Velocity &request) final;
8794
8795 /**
8796 * \brief Differential control with velocity average target and
8797 * velocity difference target using duty cycle control.
8798 *
8799 * - Diff_VelocityDutyCycle_Velocity Parameters:
8800 * - AverageRequest: Average VelocityDutyCycle request of the mechanism.
8801 * - DifferentialRequest: Differential VelocityDutyCycle request of the
8802 * mechanism.
8803 *
8804 * \param request Control object to request of the device
8805 * \returns Status Code of the request, 0 is OK
8806 */
8807 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityDutyCycle_Velocity &request) final;
8808
8809 /**
8810 * \brief Differential control with Motion Magic® average target and
8811 * velocity difference target using duty cycle control.
8812 *
8813 * - Diff_MotionMagicDutyCycle_Velocity Parameters:
8814 * - AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
8815 * - DifferentialRequest: Differential VelocityDutyCycle request of the
8816 * mechanism.
8817 *
8818 * \param request Control object to request of the device
8819 * \returns Status Code of the request, 0 is OK
8820 */
8821 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicDutyCycle_Velocity &request) final;
8822
8823 /**
8824 * \brief Differential control with Motion Magic® Expo average target
8825 * and velocity difference target using duty cycle control.
8826 *
8827 * - Diff_MotionMagicExpoDutyCycle_Velocity Parameters:
8828 * - AverageRequest: Average MotionMagicExpoDutyCycle request of the
8829 * mechanism.
8830 * - DifferentialRequest: Differential VelocityDutyCycle request of the
8831 * mechanism.
8832 *
8833 * \param request Control object to request of the device
8834 * \returns Status Code of the request, 0 is OK
8835 */
8836 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoDutyCycle_Velocity &request) final;
8837
8838 /**
8839 * \brief Differential control with Motion Magic® Velocity average
8840 * target and velocity difference target using duty cycle control.
8841 *
8842 * - Diff_MotionMagicVelocityDutyCycle_Velocity Parameters:
8843 * - AverageRequest: Average MotionMagicVelocityDutyCycle request of the
8844 * mechanism.
8845 * - DifferentialRequest: Differential VelocityDutyCycle request of the
8846 * mechanism.
8847 *
8848 * \param request Control object to request of the device
8849 * \returns Status Code of the request, 0 is OK
8850 */
8851 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityDutyCycle_Velocity &request) final;
8852
8853 /**
8854 * \brief Differential control with duty cycle average target and duty
8855 * cycle difference target.
8856 *
8857 * - Diff_DutyCycleOut_Open Parameters:
8858 * - AverageRequest: Average DutyCycleOut request of the mechanism.
8859 * - DifferentialRequest: Differential DutyCycleOut request of the mechanism.
8860 *
8861 * \param request Control object to request of the device
8862 * \returns Status Code of the request, 0 is OK
8863 */
8864 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_DutyCycleOut_Open &request) final;
8865
8866 /**
8867 * \brief Differential control with position average target and duty
8868 * cycle difference target.
8869 *
8870 * - Diff_PositionDutyCycle_Open Parameters:
8871 * - AverageRequest: Average PositionDutyCycle request of the mechanism.
8872 * - DifferentialRequest: Differential DutyCycleOut request of the mechanism.
8873 *
8874 * \param request Control object to request of the device
8875 * \returns Status Code of the request, 0 is OK
8876 */
8877 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionDutyCycle_Open &request) final;
8878
8879 /**
8880 * \brief Differential control with velocity average target and duty
8881 * cycle difference target.
8882 *
8883 * - Diff_VelocityDutyCycle_Open Parameters:
8884 * - AverageRequest: Average VelocityDutyCYcle request of the mechanism.
8885 * - DifferentialRequest: Differential DutyCycleOut request of the mechanism.
8886 *
8887 * \param request Control object to request of the device
8888 * \returns Status Code of the request, 0 is OK
8889 */
8890 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityDutyCycle_Open &request) final;
8891
8892 /**
8893 * \brief Differential control with Motion Magic® average target and
8894 * duty cycle difference target.
8895 *
8896 * - Diff_MotionMagicDutyCycle_Open Parameters:
8897 * - AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
8898 * - DifferentialRequest: Differential DutyCycleOut request of the mechanism.
8899 *
8900 * \param request Control object to request of the device
8901 * \returns Status Code of the request, 0 is OK
8902 */
8903 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicDutyCycle_Open &request) final;
8904
8905 /**
8906 * \brief Differential control with Motion Magic® Expo average target
8907 * and duty cycle difference target.
8908 *
8909 * - Diff_MotionMagicExpoDutyCycle_Open Parameters:
8910 * - AverageRequest: Average MotionMagicExpoDutyCycle request of the
8911 * mechanism.
8912 * - DifferentialRequest: Differential DutyCycleOut request of the mechanism.
8913 *
8914 * \param request Control object to request of the device
8915 * \returns Status Code of the request, 0 is OK
8916 */
8917 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoDutyCycle_Open &request) final;
8918
8919 /**
8920 * \brief Differential control with Motion Magic® Velocity average
8921 * target and duty cycle difference target.
8922 *
8923 * - Diff_MotionMagicVelocityDutyCycle_Open Parameters:
8924 * - AverageRequest: Average MotionMagicVelocityDutyCycle request of the
8925 * mechanism.
8926 * - DifferentialRequest: Differential DutyCycleOut request of the mechanism.
8927 *
8928 * \param request Control object to request of the device
8929 * \returns Status Code of the request, 0 is OK
8930 */
8931 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityDutyCycle_Open &request) final;
8932
8933 /**
8934 * \brief Differential control with voltage average target and
8935 * position difference target.
8936 *
8937 * - Diff_VoltageOut_Position Parameters:
8938 * - AverageRequest: Average VoltageOut request of the mechanism.
8939 * - DifferentialRequest: Differential PositionVoltage request of the
8940 * mechanism.
8941 *
8942 * \param request Control object to request of the device
8943 * \returns Status Code of the request, 0 is OK
8944 */
8945 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VoltageOut_Position &request) final;
8946
8947 /**
8948 * \brief Differential control with position average target and
8949 * position difference target using voltage control.
8950 *
8951 * - Diff_PositionVoltage_Position Parameters:
8952 * - AverageRequest: Average PositionVoltage request of the mechanism.
8953 * - DifferentialRequest: Differential PositionVoltage request of the
8954 * mechanism.
8955 *
8956 * \param request Control object to request of the device
8957 * \returns Status Code of the request, 0 is OK
8958 */
8959 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionVoltage_Position &request) final;
8960
8961 /**
8962 * \brief Differential control with velocity average target and
8963 * position difference target using voltage control.
8964 *
8965 * - Diff_VelocityVoltage_Position Parameters:
8966 * - AverageRequest: Average VelocityVoltage request of the mechanism.
8967 * - DifferentialRequest: Differential PositionVoltage request of the
8968 * mechanism.
8969 *
8970 * \param request Control object to request of the device
8971 * \returns Status Code of the request, 0 is OK
8972 */
8973 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityVoltage_Position &request) final;
8974
8975 /**
8976 * \brief Differential control with Motion Magic® average target and
8977 * position difference target using voltage control.
8978 *
8979 * - Diff_MotionMagicVoltage_Position Parameters:
8980 * - AverageRequest: Average MotionMagicVoltage request of the mechanism.
8981 * - DifferentialRequest: Differential PositionVoltage request of the
8982 * mechanism.
8983 *
8984 * \param request Control object to request of the device
8985 * \returns Status Code of the request, 0 is OK
8986 */
8987 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVoltage_Position &request) final;
8988
8989 /**
8990 * \brief Differential control with Motion Magic® Expo average target
8991 * and position difference target using voltage control.
8992 *
8993 * - Diff_MotionMagicExpoVoltage_Position Parameters:
8994 * - AverageRequest: Average MotionMagicExpoVoltage request of the mechanism.
8995 * - DifferentialRequest: Differential PositionVoltage request of the
8996 * mechanism.
8997 *
8998 * \param request Control object to request of the device
8999 * \returns Status Code of the request, 0 is OK
9000 */
9001 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoVoltage_Position &request) final;
9002
9003 /**
9004 * \brief Differential control with Motion Magic® Velocity average
9005 * target and position difference target using voltage control.
9006 *
9007 * - Diff_MotionMagicVelocityVoltage_Position Parameters:
9008 * - AverageRequest: Average MotionMagicVelocityVoltage request of the
9009 * mechanism.
9010 * - DifferentialRequest: Differential PositionVoltage request of the
9011 * mechanism.
9012 *
9013 * \param request Control object to request of the device
9014 * \returns Status Code of the request, 0 is OK
9015 */
9016 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityVoltage_Position &request) final;
9017
9018 /**
9019 * \brief Differential control with voltage average target and
9020 * velocity difference target.
9021 *
9022 * - Diff_VoltageOut_Velocity Parameters:
9023 * - AverageRequest: Average VoltageOut request of the mechanism.
9024 * - DifferentialRequest: Differential VelocityVoltage request of the
9025 * mechanism.
9026 *
9027 * \param request Control object to request of the device
9028 * \returns Status Code of the request, 0 is OK
9029 */
9030 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VoltageOut_Velocity &request) final;
9031
9032 /**
9033 * \brief Differential control with position average target and
9034 * velocity difference target using voltage control.
9035 *
9036 * - Diff_PositionVoltage_Velocity Parameters:
9037 * - AverageRequest: Average PositionVoltage request of the mechanism.
9038 * - DifferentialRequest: Differential VelocityVoltage request of the
9039 * mechanism.
9040 *
9041 * \param request Control object to request of the device
9042 * \returns Status Code of the request, 0 is OK
9043 */
9044 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionVoltage_Velocity &request) final;
9045
9046 /**
9047 * \brief Differential control with velocity average target and
9048 * velocity difference target using voltage control.
9049 *
9050 * - Diff_VelocityVoltage_Velocity Parameters:
9051 * - AverageRequest: Average VelocityVoltage request of the mechanism.
9052 * - DifferentialRequest: Differential VelocityVoltage request of the
9053 * mechanism.
9054 *
9055 * \param request Control object to request of the device
9056 * \returns Status Code of the request, 0 is OK
9057 */
9058 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityVoltage_Velocity &request) final;
9059
9060 /**
9061 * \brief Differential control with Motion Magic® average target and
9062 * velocity difference target using voltage control.
9063 *
9064 * - Diff_MotionMagicVoltage_Velocity Parameters:
9065 * - AverageRequest: Average MotionMagicVoltage request of the mechanism.
9066 * - DifferentialRequest: Differential VelocityVoltage request of the
9067 * mechanism.
9068 *
9069 * \param request Control object to request of the device
9070 * \returns Status Code of the request, 0 is OK
9071 */
9072 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVoltage_Velocity &request) final;
9073
9074 /**
9075 * \brief Differential control with Motion Magic® Expo average target
9076 * and velocity difference target using voltage control.
9077 *
9078 * - Diff_MotionMagicExpoVoltage_Velocity Parameters:
9079 * - AverageRequest: Average MotionMagicExpoVoltage request of the mechanism.
9080 * - DifferentialRequest: Differential VelocityVoltage request of the
9081 * mechanism.
9082 *
9083 * \param request Control object to request of the device
9084 * \returns Status Code of the request, 0 is OK
9085 */
9086 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoVoltage_Velocity &request) final;
9087
9088 /**
9089 * \brief Differential control with Motion Magic® Velocity average
9090 * target and velocity difference target using voltage control.
9091 *
9092 * - Diff_MotionMagicVelocityVoltage_Velocity Parameters:
9093 * - AverageRequest: Average MotionMagicVelocityVoltage request of the
9094 * mechanism.
9095 * - DifferentialRequest: Differential VelocityVoltage request of the
9096 * mechanism.
9097 *
9098 * \param request Control object to request of the device
9099 * \returns Status Code of the request, 0 is OK
9100 */
9101 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityVoltage_Velocity &request) final;
9102
9103 /**
9104 * \brief Differential control with voltage average target and voltage
9105 * difference target.
9106 *
9107 * - Diff_VoltageOut_Open Parameters:
9108 * - AverageRequest: Average VoltageOut request of the mechanism.
9109 * - DifferentialRequest: Differential VoltageOut request of the mechanism.
9110 *
9111 * \param request Control object to request of the device
9112 * \returns Status Code of the request, 0 is OK
9113 */
9114 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VoltageOut_Open &request) final;
9115
9116 /**
9117 * \brief Differential control with position average target and
9118 * voltage difference target.
9119 *
9120 * - Diff_PositionVoltage_Open Parameters:
9121 * - AverageRequest: Average PositionVoltage request of the mechanism.
9122 * - DifferentialRequest: Differential VoltageOut request of the mechanism.
9123 *
9124 * \param request Control object to request of the device
9125 * \returns Status Code of the request, 0 is OK
9126 */
9127 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionVoltage_Open &request) final;
9128
9129 /**
9130 * \brief Differential control with velocity average target and
9131 * voltage difference target.
9132 *
9133 * - Diff_VelocityVoltage_Open Parameters:
9134 * - AverageRequest: Average VelocityVoltage request of the mechanism.
9135 * - DifferentialRequest: Differential VoltageOut request of the mechanism.
9136 *
9137 * \param request Control object to request of the device
9138 * \returns Status Code of the request, 0 is OK
9139 */
9140 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityVoltage_Open &request) final;
9141
9142 /**
9143 * \brief Differential control with Motion Magic® average target and
9144 * voltage difference target.
9145 *
9146 * - Diff_MotionMagicVoltage_Open Parameters:
9147 * - AverageRequest: Average MotionMagicVoltage request of the mechanism.
9148 * - DifferentialRequest: Differential VoltageOut request of the mechanism.
9149 *
9150 * \param request Control object to request of the device
9151 * \returns Status Code of the request, 0 is OK
9152 */
9153 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVoltage_Open &request) final;
9154
9155 /**
9156 * \brief Differential control with Motion Magic® Expo average target
9157 * and voltage difference target.
9158 *
9159 * - Diff_MotionMagicExpoVoltage_Open Parameters:
9160 * - AverageRequest: Average MotionMagicExpoVoltage request of the mechanism.
9161 * - DifferentialRequest: Differential VoltageOut request of the mechanism.
9162 *
9163 * \param request Control object to request of the device
9164 * \returns Status Code of the request, 0 is OK
9165 */
9166 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoVoltage_Open &request) final;
9167
9168 /**
9169 * \brief Differential control with Motion Magic® Velocity average
9170 * target and voltage difference target.
9171 *
9172 * - Diff_MotionMagicVelocityVoltage_Open Parameters:
9173 * - AverageRequest: Average MotionMagicVelocityVoltage request of the
9174 * mechanism.
9175 * - DifferentialRequest: Differential VoltageOut request of the mechanism.
9176 *
9177 * \param request Control object to request of the device
9178 * \returns Status Code of the request, 0 is OK
9179 */
9180 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityVoltage_Open &request) final;
9181
9182 /**
9183 * \brief Control device with generic control request object. User must make
9184 * sure the specified object is castable to a valid control request,
9185 * otherwise this function will fail at run-time and return the NotSupported
9186 * StatusCode
9187 *
9188 * \param request Control object to request of the device
9189 * \returns Status Code of the request, 0 is OK
9190 */
9191 ctre::phoenix::StatusCode SetControl(controls::ControlRequest const &request) final;
9192
9193
9194 /**
9195 * \brief Sets the mechanism position of the device in mechanism
9196 * rotations.
9197 *
9198 * \param newValue Value to set to. Units are in rotations.
9199 * \param timeoutSeconds Maximum time to wait up to in seconds.
9200 * \returns StatusCode of the set command
9201 */
9202 ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds) final
9203 {
9204 return GetConfigurator().SetPosition(newValue, timeoutSeconds);
9205 }
9206 /**
9207 * \brief Sets the mechanism position of the device in mechanism
9208 * rotations.
9209 *
9210 * This will wait up to 0.100 seconds (100ms) by default.
9211 *
9212 * \param newValue Value to set to. Units are in rotations.
9213 * \returns StatusCode of the set command
9214 */
9215 ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue) final
9216 {
9217 return SetPosition(newValue, 0.100_s);
9218 }
9219
9220 /**
9221 * \brief Clear the sticky faults in the device.
9222 *
9223 * \details This typically has no impact on the device functionality.
9224 * Instead, it just clears telemetry faults that are accessible via
9225 * API and Tuner Self-Test.
9226 *
9227 * \param timeoutSeconds Maximum time to wait up to in seconds.
9228 * \returns StatusCode of the set command
9229 */
9230 ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds) final
9231 {
9232 return GetConfigurator().ClearStickyFaults(timeoutSeconds);
9233 }
9234 /**
9235 * \brief Clear the sticky faults in the device.
9236 *
9237 * \details This typically has no impact on the device functionality.
9238 * Instead, it just clears telemetry faults that are accessible via
9239 * API and Tuner Self-Test.
9240 *
9241 * This will wait up to 0.100 seconds (100ms) by default.
9242 *
9243 * \returns StatusCode of the set command
9244 */
9246 {
9247 return ClearStickyFaults(0.100_s);
9248 }
9249
9250 /**
9251 * \brief Clear sticky fault: Hardware fault occurred
9252 *
9253 * \param timeoutSeconds Maximum time to wait up to in seconds.
9254 * \returns StatusCode of the set command
9255 */
9256 ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds) final
9257 {
9258 return GetConfigurator().ClearStickyFault_Hardware(timeoutSeconds);
9259 }
9260 /**
9261 * \brief Clear sticky fault: Hardware fault occurred
9262 *
9263 * This will wait up to 0.100 seconds (100ms) by default.
9264 *
9265 * \returns StatusCode of the set command
9266 */
9268 {
9269 return ClearStickyFault_Hardware(0.100_s);
9270 }
9271
9272 /**
9273 * \brief Clear sticky fault: Processor temperature exceeded limit
9274 *
9275 * \param timeoutSeconds Maximum time to wait up to in seconds.
9276 * \returns StatusCode of the set command
9277 */
9278 ctre::phoenix::StatusCode ClearStickyFault_ProcTemp(units::time::second_t timeoutSeconds) final
9279 {
9280 return GetConfigurator().ClearStickyFault_ProcTemp(timeoutSeconds);
9281 }
9282 /**
9283 * \brief Clear sticky fault: Processor temperature exceeded limit
9284 *
9285 * This will wait up to 0.100 seconds (100ms) by default.
9286 *
9287 * \returns StatusCode of the set command
9288 */
9290 {
9291 return ClearStickyFault_ProcTemp(0.100_s);
9292 }
9293
9294 /**
9295 * \brief Clear sticky fault: Device temperature exceeded limit
9296 *
9297 * \param timeoutSeconds Maximum time to wait up to in seconds.
9298 * \returns StatusCode of the set command
9299 */
9300 ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp(units::time::second_t timeoutSeconds) final
9301 {
9302 return GetConfigurator().ClearStickyFault_DeviceTemp(timeoutSeconds);
9303 }
9304 /**
9305 * \brief Clear sticky fault: Device temperature exceeded limit
9306 *
9307 * This will wait up to 0.100 seconds (100ms) by default.
9308 *
9309 * \returns StatusCode of the set command
9310 */
9312 {
9313 return ClearStickyFault_DeviceTemp(0.100_s);
9314 }
9315
9316 /**
9317 * \brief Clear sticky fault: Device supply voltage dropped to near
9318 * brownout levels
9319 *
9320 * \param timeoutSeconds Maximum time to wait up to in seconds.
9321 * \returns StatusCode of the set command
9322 */
9323 ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds) final
9324 {
9325 return GetConfigurator().ClearStickyFault_Undervoltage(timeoutSeconds);
9326 }
9327 /**
9328 * \brief Clear sticky fault: Device supply voltage dropped to near
9329 * brownout levels
9330 *
9331 * This will wait up to 0.100 seconds (100ms) by default.
9332 *
9333 * \returns StatusCode of the set command
9334 */
9336 {
9337 return ClearStickyFault_Undervoltage(0.100_s);
9338 }
9339
9340 /**
9341 * \brief Clear sticky fault: Device boot while detecting the enable
9342 * signal
9343 *
9344 * \param timeoutSeconds Maximum time to wait up to in seconds.
9345 * \returns StatusCode of the set command
9346 */
9347 ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable(units::time::second_t timeoutSeconds) final
9348 {
9349 return GetConfigurator().ClearStickyFault_BootDuringEnable(timeoutSeconds);
9350 }
9351 /**
9352 * \brief Clear sticky fault: Device boot while detecting the enable
9353 * signal
9354 *
9355 * This will wait up to 0.100 seconds (100ms) by default.
9356 *
9357 * \returns StatusCode of the set command
9358 */
9360 {
9361 return ClearStickyFault_BootDuringEnable(0.100_s);
9362 }
9363
9364 /**
9365 * \brief Clear sticky fault: An unlicensed feature is in use, device
9366 * may not behave as expected.
9367 *
9368 * \param timeoutSeconds Maximum time to wait up to in seconds.
9369 * \returns StatusCode of the set command
9370 */
9371 ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse(units::time::second_t timeoutSeconds) final
9372 {
9373 return GetConfigurator().ClearStickyFault_UnlicensedFeatureInUse(timeoutSeconds);
9374 }
9375 /**
9376 * \brief Clear sticky fault: An unlicensed feature is in use, device
9377 * may not behave as expected.
9378 *
9379 * This will wait up to 0.100 seconds (100ms) by default.
9380 *
9381 * \returns StatusCode of the set command
9382 */
9384 {
9385 return ClearStickyFault_UnlicensedFeatureInUse(0.100_s);
9386 }
9387
9388 /**
9389 * \brief Clear sticky fault: Bridge was disabled most likely due to
9390 * supply voltage dropping too low.
9391 *
9392 * \param timeoutSeconds Maximum time to wait up to in seconds.
9393 * \returns StatusCode of the set command
9394 */
9395 ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout(units::time::second_t timeoutSeconds) final
9396 {
9397 return GetConfigurator().ClearStickyFault_BridgeBrownout(timeoutSeconds);
9398 }
9399 /**
9400 * \brief Clear sticky fault: Bridge was disabled most likely due to
9401 * supply voltage dropping too low.
9402 *
9403 * This will wait up to 0.100 seconds (100ms) by default.
9404 *
9405 * \returns StatusCode of the set command
9406 */
9408 {
9409 return ClearStickyFault_BridgeBrownout(0.100_s);
9410 }
9411
9412 /**
9413 * \brief Clear sticky fault: The remote sensor has reset.
9414 *
9415 * \param timeoutSeconds Maximum time to wait up to in seconds.
9416 * \returns StatusCode of the set command
9417 */
9418 ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset(units::time::second_t timeoutSeconds) final
9419 {
9420 return GetConfigurator().ClearStickyFault_RemoteSensorReset(timeoutSeconds);
9421 }
9422 /**
9423 * \brief Clear sticky fault: The remote sensor has reset.
9424 *
9425 * This will wait up to 0.100 seconds (100ms) by default.
9426 *
9427 * \returns StatusCode of the set command
9428 */
9430 {
9431 return ClearStickyFault_RemoteSensorReset(0.100_s);
9432 }
9433
9434 /**
9435 * \brief Clear sticky fault: The remote Talon used for differential
9436 * control is not present on CAN Bus.
9437 *
9438 * \param timeoutSeconds Maximum time to wait up to in seconds.
9439 * \returns StatusCode of the set command
9440 */
9441 ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX(units::time::second_t timeoutSeconds) final
9442 {
9443 return GetConfigurator().ClearStickyFault_MissingDifferentialFX(timeoutSeconds);
9444 }
9445 /**
9446 * \brief Clear sticky fault: The remote Talon used for differential
9447 * control is not present on CAN Bus.
9448 *
9449 * This will wait up to 0.100 seconds (100ms) by default.
9450 *
9451 * \returns StatusCode of the set command
9452 */
9454 {
9455 return ClearStickyFault_MissingDifferentialFX(0.100_s);
9456 }
9457
9458 /**
9459 * \brief Clear sticky fault: The remote sensor position has
9460 * overflowed. Because of the nature of remote sensors, it is possible
9461 * for the remote sensor position to overflow beyond what is supported
9462 * by the status signal frame. However, this is rare and cannot occur
9463 * over the course of an FRC match under normal use.
9464 *
9465 * \param timeoutSeconds Maximum time to wait up to in seconds.
9466 * \returns StatusCode of the set command
9467 */
9469 {
9470 return GetConfigurator().ClearStickyFault_RemoteSensorPosOverflow(timeoutSeconds);
9471 }
9472 /**
9473 * \brief Clear sticky fault: The remote sensor position has
9474 * overflowed. Because of the nature of remote sensors, it is possible
9475 * for the remote sensor position to overflow beyond what is supported
9476 * by the status signal frame. However, this is rare and cannot occur
9477 * over the course of an FRC match under normal use.
9478 *
9479 * This will wait up to 0.100 seconds (100ms) by default.
9480 *
9481 * \returns StatusCode of the set command
9482 */
9484 {
9485 return ClearStickyFault_RemoteSensorPosOverflow(0.100_s);
9486 }
9487
9488 /**
9489 * \brief Clear sticky fault: Supply Voltage has exceeded the maximum
9490 * voltage rating of device.
9491 *
9492 * \param timeoutSeconds Maximum time to wait up to in seconds.
9493 * \returns StatusCode of the set command
9494 */
9495 ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV(units::time::second_t timeoutSeconds) final
9496 {
9497 return GetConfigurator().ClearStickyFault_OverSupplyV(timeoutSeconds);
9498 }
9499 /**
9500 * \brief Clear sticky fault: Supply Voltage has exceeded the maximum
9501 * voltage rating of device.
9502 *
9503 * This will wait up to 0.100 seconds (100ms) by default.
9504 *
9505 * \returns StatusCode of the set command
9506 */
9508 {
9509 return ClearStickyFault_OverSupplyV(0.100_s);
9510 }
9511
9512 /**
9513 * \brief Clear sticky fault: Supply Voltage is unstable. Ensure you
9514 * are using a battery and current limited power supply.
9515 *
9516 * \param timeoutSeconds Maximum time to wait up to in seconds.
9517 * \returns StatusCode of the set command
9518 */
9519 ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV(units::time::second_t timeoutSeconds) final
9520 {
9521 return GetConfigurator().ClearStickyFault_UnstableSupplyV(timeoutSeconds);
9522 }
9523 /**
9524 * \brief Clear sticky fault: Supply Voltage is unstable. Ensure you
9525 * are using a battery and current limited power supply.
9526 *
9527 * This will wait up to 0.100 seconds (100ms) by default.
9528 *
9529 * \returns StatusCode of the set command
9530 */
9532 {
9533 return ClearStickyFault_UnstableSupplyV(0.100_s);
9534 }
9535
9536 /**
9537 * \brief Clear sticky fault: Reverse limit switch has been asserted.
9538 * Output is set to neutral.
9539 *
9540 * \param timeoutSeconds Maximum time to wait up to in seconds.
9541 * \returns StatusCode of the set command
9542 */
9543 ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit(units::time::second_t timeoutSeconds) final
9544 {
9545 return GetConfigurator().ClearStickyFault_ReverseHardLimit(timeoutSeconds);
9546 }
9547 /**
9548 * \brief Clear sticky fault: Reverse limit switch has been asserted.
9549 * Output is set to neutral.
9550 *
9551 * This will wait up to 0.100 seconds (100ms) by default.
9552 *
9553 * \returns StatusCode of the set command
9554 */
9556 {
9557 return ClearStickyFault_ReverseHardLimit(0.100_s);
9558 }
9559
9560 /**
9561 * \brief Clear sticky fault: Forward limit switch has been asserted.
9562 * Output is set to neutral.
9563 *
9564 * \param timeoutSeconds Maximum time to wait up to in seconds.
9565 * \returns StatusCode of the set command
9566 */
9567 ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit(units::time::second_t timeoutSeconds) final
9568 {
9569 return GetConfigurator().ClearStickyFault_ForwardHardLimit(timeoutSeconds);
9570 }
9571 /**
9572 * \brief Clear sticky fault: Forward limit switch has been asserted.
9573 * Output is set to neutral.
9574 *
9575 * This will wait up to 0.100 seconds (100ms) by default.
9576 *
9577 * \returns StatusCode of the set command
9578 */
9580 {
9581 return ClearStickyFault_ForwardHardLimit(0.100_s);
9582 }
9583
9584 /**
9585 * \brief Clear sticky fault: Reverse soft limit has been asserted.
9586 * Output is set to neutral.
9587 *
9588 * \param timeoutSeconds Maximum time to wait up to in seconds.
9589 * \returns StatusCode of the set command
9590 */
9591 ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit(units::time::second_t timeoutSeconds) final
9592 {
9593 return GetConfigurator().ClearStickyFault_ReverseSoftLimit(timeoutSeconds);
9594 }
9595 /**
9596 * \brief Clear sticky fault: Reverse soft limit has been asserted.
9597 * Output is set to neutral.
9598 *
9599 * This will wait up to 0.100 seconds (100ms) by default.
9600 *
9601 * \returns StatusCode of the set command
9602 */
9604 {
9605 return ClearStickyFault_ReverseSoftLimit(0.100_s);
9606 }
9607
9608 /**
9609 * \brief Clear sticky fault: Forward soft limit has been asserted.
9610 * Output is set to neutral.
9611 *
9612 * \param timeoutSeconds Maximum time to wait up to in seconds.
9613 * \returns StatusCode of the set command
9614 */
9615 ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit(units::time::second_t timeoutSeconds) final
9616 {
9617 return GetConfigurator().ClearStickyFault_ForwardSoftLimit(timeoutSeconds);
9618 }
9619 /**
9620 * \brief Clear sticky fault: Forward soft limit has been asserted.
9621 * Output is set to neutral.
9622 *
9623 * This will wait up to 0.100 seconds (100ms) by default.
9624 *
9625 * \returns StatusCode of the set command
9626 */
9628 {
9629 return ClearStickyFault_ForwardSoftLimit(0.100_s);
9630 }
9631
9632 /**
9633 * \brief Clear sticky fault: The remote soft limit device is not
9634 * present on CAN Bus.
9635 *
9636 * \param timeoutSeconds Maximum time to wait up to in seconds.
9637 * \returns StatusCode of the set command
9638 */
9639 ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote(units::time::second_t timeoutSeconds) final
9640 {
9641 return GetConfigurator().ClearStickyFault_MissingSoftLimitRemote(timeoutSeconds);
9642 }
9643 /**
9644 * \brief Clear sticky fault: The remote soft limit device is not
9645 * present on CAN Bus.
9646 *
9647 * This will wait up to 0.100 seconds (100ms) by default.
9648 *
9649 * \returns StatusCode of the set command
9650 */
9652 {
9653 return ClearStickyFault_MissingSoftLimitRemote(0.100_s);
9654 }
9655
9656 /**
9657 * \brief Clear sticky fault: The remote limit switch device is not
9658 * present on CAN Bus.
9659 *
9660 * \param timeoutSeconds Maximum time to wait up to in seconds.
9661 * \returns StatusCode of the set command
9662 */
9663 ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote(units::time::second_t timeoutSeconds) final
9664 {
9665 return GetConfigurator().ClearStickyFault_MissingHardLimitRemote(timeoutSeconds);
9666 }
9667 /**
9668 * \brief Clear sticky fault: The remote limit switch device is not
9669 * present on CAN Bus.
9670 *
9671 * This will wait up to 0.100 seconds (100ms) by default.
9672 *
9673 * \returns StatusCode of the set command
9674 */
9676 {
9677 return ClearStickyFault_MissingHardLimitRemote(0.100_s);
9678 }
9679
9680 /**
9681 * \brief Clear sticky fault: The remote sensor's data is no longer
9682 * trusted. This can happen if the remote sensor disappears from the
9683 * CAN bus or if the remote sensor indicates its data is no longer
9684 * valid, such as when a CANcoder's magnet strength falls into the
9685 * "red" range.
9686 *
9687 * \param timeoutSeconds Maximum time to wait up to in seconds.
9688 * \returns StatusCode of the set command
9689 */
9691 {
9692 return GetConfigurator().ClearStickyFault_RemoteSensorDataInvalid(timeoutSeconds);
9693 }
9694 /**
9695 * \brief Clear sticky fault: The remote sensor's data is no longer
9696 * trusted. This can happen if the remote sensor disappears from the
9697 * CAN bus or if the remote sensor indicates its data is no longer
9698 * valid, such as when a CANcoder's magnet strength falls into the
9699 * "red" range.
9700 *
9701 * This will wait up to 0.100 seconds (100ms) by default.
9702 *
9703 * \returns StatusCode of the set command
9704 */
9706 {
9707 return ClearStickyFault_RemoteSensorDataInvalid(0.100_s);
9708 }
9709
9710 /**
9711 * \brief Clear sticky fault: The remote sensor used for fusion has
9712 * fallen out of sync to the local sensor. A re-synchronization has
9713 * occurred, which may cause a discontinuity. This typically happens
9714 * if there is significant slop in the mechanism, or if the
9715 * RotorToSensorRatio configuration parameter is incorrect.
9716 *
9717 * \param timeoutSeconds Maximum time to wait up to in seconds.
9718 * \returns StatusCode of the set command
9719 */
9720 ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync(units::time::second_t timeoutSeconds) final
9721 {
9722 return GetConfigurator().ClearStickyFault_FusedSensorOutOfSync(timeoutSeconds);
9723 }
9724 /**
9725 * \brief Clear sticky fault: The remote sensor used for fusion has
9726 * fallen out of sync to the local sensor. A re-synchronization has
9727 * occurred, which may cause a discontinuity. This typically happens
9728 * if there is significant slop in the mechanism, or if the
9729 * RotorToSensorRatio configuration parameter is incorrect.
9730 *
9731 * This will wait up to 0.100 seconds (100ms) by default.
9732 *
9733 * \returns StatusCode of the set command
9734 */
9736 {
9737 return ClearStickyFault_FusedSensorOutOfSync(0.100_s);
9738 }
9739
9740 /**
9741 * \brief Clear sticky fault: Stator current limit occured.
9742 *
9743 * \param timeoutSeconds Maximum time to wait up to in seconds.
9744 * \returns StatusCode of the set command
9745 */
9746 ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit(units::time::second_t timeoutSeconds) final
9747 {
9748 return GetConfigurator().ClearStickyFault_StatorCurrLimit(timeoutSeconds);
9749 }
9750 /**
9751 * \brief Clear sticky fault: Stator current limit occured.
9752 *
9753 * This will wait up to 0.100 seconds (100ms) by default.
9754 *
9755 * \returns StatusCode of the set command
9756 */
9758 {
9759 return ClearStickyFault_StatorCurrLimit(0.100_s);
9760 }
9761
9762 /**
9763 * \brief Clear sticky fault: Supply current limit occured.
9764 *
9765 * \param timeoutSeconds Maximum time to wait up to in seconds.
9766 * \returns StatusCode of the set command
9767 */
9768 ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit(units::time::second_t timeoutSeconds) final
9769 {
9770 return GetConfigurator().ClearStickyFault_SupplyCurrLimit(timeoutSeconds);
9771 }
9772 /**
9773 * \brief Clear sticky fault: Supply current limit occured.
9774 *
9775 * This will wait up to 0.100 seconds (100ms) by default.
9776 *
9777 * \returns StatusCode of the set command
9778 */
9780 {
9781 return ClearStickyFault_SupplyCurrLimit(0.100_s);
9782 }
9783
9784 /**
9785 * \brief Clear sticky fault: Using Fused CANcoder feature while
9786 * unlicensed. Device has fallen back to remote CANcoder.
9787 *
9788 * \param timeoutSeconds Maximum time to wait up to in seconds.
9789 * \returns StatusCode of the set command
9790 */
9792 {
9793 return GetConfigurator().ClearStickyFault_UsingFusedCANcoderWhileUnlicensed(timeoutSeconds);
9794 }
9795 /**
9796 * \brief Clear sticky fault: Using Fused CANcoder feature while
9797 * unlicensed. Device has fallen back to remote CANcoder.
9798 *
9799 * This will wait up to 0.100 seconds (100ms) by default.
9800 *
9801 * \returns StatusCode of the set command
9802 */
9804 {
9805 return ClearStickyFault_UsingFusedCANcoderWhileUnlicensed(0.100_s);
9806 }
9807
9808 /**
9809 * \brief Clear sticky fault: Static brake was momentarily disabled
9810 * due to excessive braking current while disabled.
9811 *
9812 * \param timeoutSeconds Maximum time to wait up to in seconds.
9813 * \returns StatusCode of the set command
9814 */
9815 ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled(units::time::second_t timeoutSeconds) final
9816 {
9817 return GetConfigurator().ClearStickyFault_StaticBrakeDisabled(timeoutSeconds);
9818 }
9819 /**
9820 * \brief Clear sticky fault: Static brake was momentarily disabled
9821 * due to excessive braking current while disabled.
9822 *
9823 * This will wait up to 0.100 seconds (100ms) by default.
9824 *
9825 * \returns StatusCode of the set command
9826 */
9828 {
9829 return ClearStickyFault_StaticBrakeDisabled(0.100_s);
9830 }
9831
9832 /**
9833 * \brief Clear sticky fault: Bridge was disabled most likely due to a
9834 * short in the motor leads.
9835 *
9836 * \param timeoutSeconds Maximum time to wait up to in seconds.
9837 * \returns StatusCode of the set command
9838 */
9839 ctre::phoenix::StatusCode ClearStickyFault_BridgeShort(units::time::second_t timeoutSeconds) final
9840 {
9841 return GetConfigurator().ClearStickyFault_BridgeShort(timeoutSeconds);
9842 }
9843 /**
9844 * \brief Clear sticky fault: Bridge was disabled most likely due to a
9845 * short in the motor leads.
9846 *
9847 * This will wait up to 0.100 seconds (100ms) by default.
9848 *
9849 * \returns StatusCode of the set command
9850 */
9852 {
9853 return ClearStickyFault_BridgeShort(0.100_s);
9854 }
9855
9856 /**
9857 * \brief Clear sticky fault: Hall sensor signals are invalid. Check
9858 * hall sensor and cabling. This fault can be used to detect when
9859 * hall cable is unplugged.
9860 *
9861 * \param timeoutSeconds Maximum time to wait up to in seconds.
9862 * \returns StatusCode of the set command
9863 */
9864 ctre::phoenix::StatusCode ClearStickyFault_HallSensorMissing(units::time::second_t timeoutSeconds) final
9865 {
9866 return GetConfigurator().ClearStickyFault_HallSensorMissing(timeoutSeconds);
9867 }
9868 /**
9869 * \brief Clear sticky fault: Hall sensor signals are invalid. Check
9870 * hall sensor and cabling. This fault can be used to detect when
9871 * hall cable is unplugged.
9872 *
9873 * This will wait up to 0.100 seconds (100ms) by default.
9874 *
9875 * \returns StatusCode of the set command
9876 */
9878 {
9879 return ClearStickyFault_HallSensorMissing(0.100_s);
9880 }
9881
9882 /**
9883 * \brief Clear sticky fault: Hall sensor signals are invalid during
9884 * motor drive, so motor was disabled. Check hall sensor and cabling.
9885 *
9886 * \param timeoutSeconds Maximum time to wait up to in seconds.
9887 * \returns StatusCode of the set command
9888 */
9890 {
9891 return GetConfigurator().ClearStickyFault_DriveDisabledHallSensor(timeoutSeconds);
9892 }
9893 /**
9894 * \brief Clear sticky fault: Hall sensor signals are invalid during
9895 * motor drive, so motor was disabled. Check hall sensor and cabling.
9896 *
9897 * This will wait up to 0.100 seconds (100ms) by default.
9898 *
9899 * \returns StatusCode of the set command
9900 */
9902 {
9903 return ClearStickyFault_DriveDisabledHallSensor(0.100_s);
9904 }
9905
9906 /**
9907 * \brief Clear sticky fault: Motor temperature signal appears to not
9908 * be connected.
9909 *
9910 * \param timeoutSeconds Maximum time to wait up to in seconds.
9911 * \returns StatusCode of the set command
9912 */
9913 ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorMissing(units::time::second_t timeoutSeconds) final
9914 {
9915 return GetConfigurator().ClearStickyFault_MotorTempSensorMissing(timeoutSeconds);
9916 }
9917 /**
9918 * \brief Clear sticky fault: Motor temperature signal appears to not
9919 * be connected.
9920 *
9921 * This will wait up to 0.100 seconds (100ms) by default.
9922 *
9923 * \returns StatusCode of the set command
9924 */
9926 {
9927 return ClearStickyFault_MotorTempSensorMissing(0.100_s);
9928 }
9929
9930 /**
9931 * \brief Clear sticky fault: Motor temperature signal indicates motor
9932 * is too hot.
9933 *
9934 * \param timeoutSeconds Maximum time to wait up to in seconds.
9935 * \returns StatusCode of the set command
9936 */
9937 ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorTooHot(units::time::second_t timeoutSeconds) final
9938 {
9939 return GetConfigurator().ClearStickyFault_MotorTempSensorTooHot(timeoutSeconds);
9940 }
9941 /**
9942 * \brief Clear sticky fault: Motor temperature signal indicates motor
9943 * is too hot.
9944 *
9945 * This will wait up to 0.100 seconds (100ms) by default.
9946 *
9947 * \returns StatusCode of the set command
9948 */
9950 {
9951 return ClearStickyFault_MotorTempSensorTooHot(0.100_s);
9952 }
9953
9954 /**
9955 * \brief Clear sticky fault: Motor arrangement has not been set in
9956 * configuration.
9957 *
9958 * \param timeoutSeconds Maximum time to wait up to in seconds.
9959 * \returns StatusCode of the set command
9960 */
9962 {
9963 return GetConfigurator().ClearStickyFault_MotorArrangementNotSelected(timeoutSeconds);
9964 }
9965 /**
9966 * \brief Clear sticky fault: Motor arrangement has not been set in
9967 * configuration.
9968 *
9969 * This will wait up to 0.100 seconds (100ms) by default.
9970 *
9971 * \returns StatusCode of the set command
9972 */
9974 {
9975 return ClearStickyFault_MotorArrangementNotSelected(0.100_s);
9976 }
9977};
9978
9979#if defined(_WIN32) || defined(_WIN64)
9980#pragma warning(pop)
9981#endif
9982
9983}
9984}
9985
9986}
9987}
9988
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:9735
ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV() final
Clear sticky fault: Supply Voltage is unstable.
Definition CoreTalonFXS.hpp:9531
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow() final
Clear sticky fault: The remote sensor position has overflowed.
Definition CoreTalonFXS.hpp:9483
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:9815
ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds) final
Clear sticky fault: Hardware fault occurred.
Definition CoreTalonFXS.hpp:9256
ctre::phoenix::StatusCode ClearStickyFault_HallSensorMissing() final
Clear sticky fault: Hall sensor signals are invalid.
Definition CoreTalonFXS.hpp:9877
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:9913
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid() final
Clear sticky fault: The remote sensor's data is no longer trusted.
Definition CoreTalonFXS.hpp:9705
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable() final
Clear sticky fault: Device boot while detecting the enable signal.
Definition CoreTalonFXS.hpp:9359
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow(units::time::second_t timeoutSeconds) final
Clear sticky fault: The remote sensor position has overflowed.
Definition CoreTalonFXS.hpp:9468
ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit(units::time::second_t timeoutSeconds) final
Clear sticky fault: Reverse soft limit has been asserted.
Definition CoreTalonFXS.hpp:9591
ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit() final
Clear sticky fault: Forward limit switch has been asserted.
Definition CoreTalonFXS.hpp:9579
ctre::phoenix::StatusCode ClearStickyFaults() final
Clear the sticky faults in the device.
Definition CoreTalonFXS.hpp:9245
ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed(units::time::second_t timeoutSeconds) final
Clear sticky fault: Using Fused CANcoder feature while unlicensed.
Definition CoreTalonFXS.hpp:9791
ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit() final
Clear sticky fault: Stator current limit occured.
Definition CoreTalonFXS.hpp:9757
ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit(units::time::second_t timeoutSeconds) final
Clear sticky fault: Stator current limit occured.
Definition CoreTalonFXS.hpp:9746
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:9961
ctre::phoenix::StatusCode ClearStickyFault_DriveDisabledHallSensor() final
Clear sticky fault: Hall sensor signals are invalid during motor drive, so motor was disabled.
Definition CoreTalonFXS.hpp:9901
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:9639
ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds) final
Clear the sticky faults in the device.
Definition CoreTalonFXS.hpp:9230
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:9453
ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit() final
Clear sticky fault: Reverse limit switch has been asserted.
Definition CoreTalonFXS.hpp:9555
ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled() final
Clear sticky fault: Static brake was momentarily disabled due to excessive braking current while disa...
Definition CoreTalonFXS.hpp:9827
ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote() final
Clear sticky fault: The remote soft limit device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:9651
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:9690
ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV(units::time::second_t timeoutSeconds) final
Clear sticky fault: Supply Voltage is unstable.
Definition CoreTalonFXS.hpp:9519
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:9395
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp(units::time::second_t timeoutSeconds) final
Clear sticky fault: Device temperature exceeded limit.
Definition CoreTalonFXS.hpp:9300
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:9441
ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit() final
Clear sticky fault: Reverse soft limit has been asserted.
Definition CoreTalonFXS.hpp:9603
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:9663
ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit(units::time::second_t timeoutSeconds) final
Clear sticky fault: Reverse limit switch has been asserted.
Definition CoreTalonFXS.hpp:9543
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:9973
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:9278
ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote() final
Clear sticky fault: The remote limit switch device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:9675
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorTooHot() final
Clear sticky fault: Motor temperature signal indicates motor is too hot.
Definition CoreTalonFXS.hpp:9949
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset() final
Clear sticky fault: The remote sensor has reset.
Definition CoreTalonFXS.hpp:9429
ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit(units::time::second_t timeoutSeconds) final
Clear sticky fault: Forward limit switch has been asserted.
Definition CoreTalonFXS.hpp:9567
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:9839
ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout() final
Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low.
Definition CoreTalonFXS.hpp:9407
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:9937
ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit() final
Clear sticky fault: Forward soft limit has been asserted.
Definition CoreTalonFXS.hpp:9627
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:9323
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse() final
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
Definition CoreTalonFXS.hpp:9383
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:9720
ctre::phoenix::StatusCode ClearStickyFault_HallSensorMissing(units::time::second_t timeoutSeconds) final
Clear sticky fault: Hall sensor signals are invalid.
Definition CoreTalonFXS.hpp:9864
ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV() final
Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device.
Definition CoreTalonFXS.hpp:9507
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:9768
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage() final
Clear sticky fault: Device supply voltage dropped to near brownout levels.
Definition CoreTalonFXS.hpp:9335
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:9495
ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit() final
Clear sticky fault: Supply current limit occured.
Definition CoreTalonFXS.hpp:9779
ctre::phoenix::StatusCode ClearStickyFault_ProcTemp() final
Clear sticky fault: Processor temperature exceeded limit.
Definition CoreTalonFXS.hpp:9289
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:9889
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset(units::time::second_t timeoutSeconds) final
Clear sticky fault: The remote sensor has reset.
Definition CoreTalonFXS.hpp:9418
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:9371
ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed() final
Clear sticky fault: Using Fused CANcoder feature while unlicensed.
Definition CoreTalonFXS.hpp:9803
ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue) final
Sets the mechanism position of the device in mechanism rotations.
Definition CoreTalonFXS.hpp:9215
ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit(units::time::second_t timeoutSeconds) final
Clear sticky fault: Forward soft limit has been asserted.
Definition CoreTalonFXS.hpp:9615
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp() final
Clear sticky fault: Device temperature exceeded limit.
Definition CoreTalonFXS.hpp:9311
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable(units::time::second_t timeoutSeconds) final
Clear sticky fault: Device boot while detecting the enable signal.
Definition CoreTalonFXS.hpp:9347
ctre::phoenix::StatusCode ClearStickyFault_Hardware() final
Clear sticky fault: Hardware fault occurred.
Definition CoreTalonFXS.hpp:9267
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:9851
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorMissing() final
Clear sticky fault: Motor temperature signal appears to not be connected.
Definition CoreTalonFXS.hpp:9925
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