CTRE Phoenix 6 C++ 26.0.0-beta-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 Closed loop proportional component.
5660 *
5661 * \details The portion of the closed loop output that is proportional
5662 * to the error. Alternatively, the kP contribution of the closed loop
5663 * output.
5664 *
5665 * When using differential control, this applies to the average axis.
5666 *
5667 * Default Rates:
5668 * - CAN 2.0: 4.0 Hz
5669 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5670 *
5671 * This refreshes and returns a cached StatusSignal object.
5672 *
5673 * \param refresh Whether to refresh the StatusSignal before returning it;
5674 * defaults to true
5675 * \returns ClosedLoopProportionalOutput Status Signal object
5676 */
5677 StatusSignal<double> &GetClosedLoopProportionalOutput(bool refresh = true) final;
5678
5679 /**
5680 * \brief Closed loop integrated component.
5681 *
5682 * \details The portion of the closed loop output that is proportional
5683 * to the integrated error. Alternatively, the kI contribution of the
5684 * closed loop output.
5685 *
5686 * When using differential control, this applies to the average axis.
5687 *
5688 * Default Rates:
5689 * - CAN 2.0: 4.0 Hz
5690 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5691 *
5692 * This refreshes and returns a cached StatusSignal object.
5693 *
5694 * \param refresh Whether to refresh the StatusSignal before returning it;
5695 * defaults to true
5696 * \returns ClosedLoopIntegratedOutput Status Signal object
5697 */
5698 StatusSignal<double> &GetClosedLoopIntegratedOutput(bool refresh = true) final;
5699
5700 /**
5701 * \brief Feedforward passed by the user.
5702 *
5703 * \details This is the general feedforward that the user provides for
5704 * the closed loop.
5705 *
5706 * When using differential control, this applies to the average axis.
5707 *
5708 * Default Rates:
5709 * - CAN 2.0: 4.0 Hz
5710 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5711 *
5712 * This refreshes and returns a cached StatusSignal object.
5713 *
5714 * \param refresh Whether to refresh the StatusSignal before returning it;
5715 * defaults to true
5716 * \returns ClosedLoopFeedForward Status Signal object
5717 */
5718 StatusSignal<double> &GetClosedLoopFeedForward(bool refresh = true) final;
5719
5720 /**
5721 * \brief Closed loop derivative component.
5722 *
5723 * \details The portion of the closed loop output that is proportional
5724 * to the deriviative of error. Alternatively, the kD contribution of
5725 * the closed loop output.
5726 *
5727 * When using differential control, this applies to the average axis.
5728 *
5729 * Default Rates:
5730 * - CAN 2.0: 4.0 Hz
5731 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5732 *
5733 * This refreshes and returns a cached StatusSignal object.
5734 *
5735 * \param refresh Whether to refresh the StatusSignal before returning it;
5736 * defaults to true
5737 * \returns ClosedLoopDerivativeOutput Status Signal object
5738 */
5739 StatusSignal<double> &GetClosedLoopDerivativeOutput(bool refresh = true) final;
5740
5741 /**
5742 * \brief Closed loop total output.
5743 *
5744 * \details The total output of the closed loop output.
5745 *
5746 * When using differential control, this applies to the average axis.
5747 *
5748 * Default Rates:
5749 * - CAN 2.0: 4.0 Hz
5750 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5751 *
5752 * This refreshes and returns a cached StatusSignal object.
5753 *
5754 * \param refresh Whether to refresh the StatusSignal before returning it;
5755 * defaults to true
5756 * \returns ClosedLoopOutput Status Signal object
5757 */
5758 StatusSignal<double> &GetClosedLoopOutput(bool refresh = true) final;
5759
5760 /**
5761 * \brief Value that the closed loop is targeting.
5762 *
5763 * \details This is the value that the closed loop PID controller
5764 * targets.
5765 *
5766 * When using differential control, this applies to the average axis.
5767 *
5768 * Default Rates:
5769 * - CAN 2.0: 4.0 Hz
5770 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5771 *
5772 * This refreshes and returns a cached StatusSignal object.
5773 *
5774 * \param refresh Whether to refresh the StatusSignal before returning it;
5775 * defaults to true
5776 * \returns ClosedLoopReference Status Signal object
5777 */
5778 StatusSignal<double> &GetClosedLoopReference(bool refresh = true) final;
5779
5780 /**
5781 * \brief Derivative of the target that the closed loop is targeting.
5782 *
5783 * \details This is the change in the closed loop reference. This may
5784 * be used in the feed-forward calculation, the derivative-error, or
5785 * in application of the signage for kS. Typically, this represents
5786 * the target velocity during Motion Magic®.
5787 *
5788 * When using differential control, this applies to the average axis.
5789 *
5790 * Default Rates:
5791 * - CAN 2.0: 4.0 Hz
5792 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5793 *
5794 * This refreshes and returns a cached StatusSignal object.
5795 *
5796 * \param refresh Whether to refresh the StatusSignal before returning it;
5797 * defaults to true
5798 * \returns ClosedLoopReferenceSlope Status Signal object
5799 */
5800 StatusSignal<double> &GetClosedLoopReferenceSlope(bool refresh = true) final;
5801
5802 /**
5803 * \brief The difference between target reference and current
5804 * measurement.
5805 *
5806 * \details This is the value that is treated as the error in the PID
5807 * loop.
5808 *
5809 * When using differential control, this applies to the average axis.
5810 *
5811 * Default Rates:
5812 * - CAN 2.0: 4.0 Hz
5813 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5814 *
5815 * This refreshes and returns a cached StatusSignal object.
5816 *
5817 * \param refresh Whether to refresh the StatusSignal before returning it;
5818 * defaults to true
5819 * \returns ClosedLoopError Status Signal object
5820 */
5821 StatusSignal<double> &GetClosedLoopError(bool refresh = true) final;
5822
5823 /**
5824 * \brief The calculated motor output for differential followers.
5825 *
5826 * \details This is a torque request when using the TorqueCurrentFOC
5827 * control output type, a voltage request when using the Voltage
5828 * control output type, and a duty cycle when using the DutyCycle
5829 * control output type.
5830 *
5831 * Default Rates:
5832 * - CAN 2.0: 100.0 Hz
5833 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5834 *
5835 * This refreshes and returns a cached StatusSignal object.
5836 *
5837 * \param refresh Whether to refresh the StatusSignal before returning it;
5838 * defaults to true
5839 * \returns DifferentialOutput Status Signal object
5840 */
5841 StatusSignal<double> &GetDifferentialOutput(bool refresh = true) final;
5842
5843 /**
5844 * \brief Differential closed loop proportional component.
5845 *
5846 * \details The portion of the differential closed loop output (on the
5847 * difference axis) that is proportional to the error. Alternatively,
5848 * the kP contribution of the closed loop output.
5849 *
5850 * Default Rates:
5851 * - CAN 2.0: 4.0 Hz
5852 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5853 *
5854 * This refreshes and returns a cached StatusSignal object.
5855 *
5856 * \param refresh Whether to refresh the StatusSignal before returning it;
5857 * defaults to true
5858 * \returns DifferentialClosedLoopProportionalOutput Status Signal object
5859 */
5860 StatusSignal<double> &GetDifferentialClosedLoopProportionalOutput(bool refresh = true) final;
5861
5862 /**
5863 * \brief Differential closed loop integrated component.
5864 *
5865 * \details The portion of the differential closed loop output (on the
5866 * difference axis) that is proportional to the integrated error.
5867 * Alternatively, the kI contribution of the closed loop output.
5868 *
5869 * Default Rates:
5870 * - CAN 2.0: 100.0 Hz
5871 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5872 *
5873 * This refreshes and returns a cached StatusSignal object.
5874 *
5875 * \param refresh Whether to refresh the StatusSignal before returning it;
5876 * defaults to true
5877 * \returns DifferentialClosedLoopIntegratedOutput Status Signal object
5878 */
5879 StatusSignal<double> &GetDifferentialClosedLoopIntegratedOutput(bool refresh = true) final;
5880
5881 /**
5882 * \brief Differential Feedforward passed by the user.
5883 *
5884 * \details This is the general feedforward that the user provides for
5885 * the differential closed loop (on the difference axis).
5886 *
5887 * Default Rates:
5888 * - CAN 2.0: 100.0 Hz
5889 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5890 *
5891 * This refreshes and returns a cached StatusSignal object.
5892 *
5893 * \param refresh Whether to refresh the StatusSignal before returning it;
5894 * defaults to true
5895 * \returns DifferentialClosedLoopFeedForward Status Signal object
5896 */
5897 StatusSignal<double> &GetDifferentialClosedLoopFeedForward(bool refresh = true) final;
5898
5899 /**
5900 * \brief Differential closed loop derivative component.
5901 *
5902 * \details The portion of the differential closed loop output (on the
5903 * difference axis) that is proportional to the deriviative of error.
5904 * Alternatively, the kD contribution of the closed loop output.
5905 *
5906 * Default Rates:
5907 * - CAN 2.0: 4.0 Hz
5908 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5909 *
5910 * This refreshes and returns a cached StatusSignal object.
5911 *
5912 * \param refresh Whether to refresh the StatusSignal before returning it;
5913 * defaults to true
5914 * \returns DifferentialClosedLoopDerivativeOutput Status Signal object
5915 */
5916 StatusSignal<double> &GetDifferentialClosedLoopDerivativeOutput(bool refresh = true) final;
5917
5918 /**
5919 * \brief Differential closed loop total output.
5920 *
5921 * \details The total output of the differential closed loop output
5922 * (on the difference axis).
5923 *
5924 * Default Rates:
5925 * - CAN 2.0: 4.0 Hz
5926 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5927 *
5928 * This refreshes and returns a cached StatusSignal object.
5929 *
5930 * \param refresh Whether to refresh the StatusSignal before returning it;
5931 * defaults to true
5932 * \returns DifferentialClosedLoopOutput Status Signal object
5933 */
5934 StatusSignal<double> &GetDifferentialClosedLoopOutput(bool refresh = true) final;
5935
5936 /**
5937 * \brief Value that the differential closed loop is targeting.
5938 *
5939 * \details This is the value that the differential closed loop PID
5940 * controller targets (on the difference axis).
5941 *
5942 * Default Rates:
5943 * - CAN 2.0: 4.0 Hz
5944 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5945 *
5946 * This refreshes and returns a cached StatusSignal object.
5947 *
5948 * \param refresh Whether to refresh the StatusSignal before returning it;
5949 * defaults to true
5950 * \returns DifferentialClosedLoopReference Status Signal object
5951 */
5952 StatusSignal<double> &GetDifferentialClosedLoopReference(bool refresh = true) final;
5953
5954 /**
5955 * \brief Derivative of the target that the differential closed loop
5956 * is targeting.
5957 *
5958 * \details This is the change in the closed loop reference (on the
5959 * difference axis). This may be used in the feed-forward calculation,
5960 * the derivative-error, or in application of the signage for kS.
5961 * Typically, this represents the target velocity during Motion
5962 * Magic®.
5963 *
5964 * Default Rates:
5965 * - CAN 2.0: 4.0 Hz
5966 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5967 *
5968 * This refreshes and returns a cached StatusSignal object.
5969 *
5970 * \param refresh Whether to refresh the StatusSignal before returning it;
5971 * defaults to true
5972 * \returns DifferentialClosedLoopReferenceSlope Status Signal object
5973 */
5974 StatusSignal<double> &GetDifferentialClosedLoopReferenceSlope(bool refresh = true) final;
5975
5976 /**
5977 * \brief The difference between target differential reference and
5978 * current measurement.
5979 *
5980 * \details This is the value that is treated as the error in the
5981 * differential PID loop (on the difference axis).
5982 *
5983 * Default Rates:
5984 * - CAN 2.0: 4.0 Hz
5985 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
5986 *
5987 * This refreshes and returns a cached StatusSignal object.
5988 *
5989 * \param refresh Whether to refresh the StatusSignal before returning it;
5990 * defaults to true
5991 * \returns DifferentialClosedLoopError Status Signal object
5992 */
5993 StatusSignal<double> &GetDifferentialClosedLoopError(bool refresh = true) final;
5994
5995
5996 /**
5997 * \brief Request a specified motor duty cycle.
5998 *
5999 * \details This control mode will output a proportion of the supplied
6000 * voltage which is supplied by the user.
6001 *
6002 * - DutyCycleOut Parameters:
6003 * - Output: Proportion of supply voltage to apply in fractional units between
6004 * -1 and +1
6005 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6006 * which increases peak power by ~15% on supported devices (see
6007 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6008 * commutation.
6009 *
6010 * FOC improves motor performance by leveraging torque (current)
6011 * control. However, this may be inconvenient for applications
6012 * that require specifying duty cycle or voltage.
6013 * CTR-Electronics has developed a hybrid method that combines
6014 * the performances gains of FOC while still allowing
6015 * applications to provide duty cycle or voltage demand. This
6016 * not to be confused with simple sinusoidal control or phase
6017 * voltage control which lacks the performance gains.
6018 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6019 * output is zero (or within deadband). Set to
6020 * false to use the NeutralMode configuration
6021 * setting (default). This flag exists to provide
6022 * the fundamental behavior of this control when
6023 * output is zero, which is to provide 0V to the
6024 * motor.
6025 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6026 * users to use other limit switch sensors connected to
6027 * robot controller. This also allows use of active
6028 * sensors that require external power.
6029 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6030 * users to use other limit switch sensors connected to
6031 * robot controller. This also allows use of active
6032 * sensors that require external power.
6033 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
6034 * the LimitForwardMotion and LimitReverseMotion
6035 * parameters, instead allowing motion.
6036 *
6037 * This can be useful on mechanisms such as an
6038 * intake/feeder, where a limit switch stops motion
6039 * while intaking but should be ignored when feeding
6040 * to a shooter.
6041 *
6042 * The hardware limit faults and Forward/ReverseLimit
6043 * signals will still report the values of the limit
6044 * switches regardless of this parameter.
6045 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
6046 * allowing motion.
6047 *
6048 * This can be useful when calibrating the zero point
6049 * of a mechanism such as an elevator.
6050 *
6051 * The software limit faults will still report the
6052 * values of the software limits regardless of this
6053 * parameter.
6054 * - UseTimesync: Set to true to delay applying this control request until a
6055 * timesync boundary (requires Phoenix Pro and CANivore). This
6056 * eliminates the impact of nondeterministic network delays in
6057 * exchange for a larger but deterministic control latency.
6058 *
6059 * This requires setting the ControlTimesyncFreqHz config in
6060 * MotorOutputConfigs. Additionally, when this is enabled, the
6061 * UpdateFreqHz of this request should be set to 0 Hz.
6062 *
6063 * \param request Control object to request of the device
6064 * \returns Status Code of the request, 0 is OK
6065 */
6066 ctre::phoenix::StatusCode SetControl(const controls::DutyCycleOut &request) final;
6067
6068 /**
6069 * \brief Request a specified voltage.
6070 *
6071 * \details This control mode will attempt to apply the specified
6072 * voltage to the motor. If the supply voltage is below the requested
6073 * voltage, the motor controller will output the supply voltage.
6074 *
6075 * - VoltageOut Parameters:
6076 * - Output: Voltage to attempt to drive at
6077 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6078 * which increases peak power by ~15% on supported devices (see
6079 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6080 * commutation.
6081 *
6082 * FOC improves motor performance by leveraging torque (current)
6083 * control. However, this may be inconvenient for applications
6084 * that require specifying duty cycle or voltage.
6085 * CTR-Electronics has developed a hybrid method that combines
6086 * the performances gains of FOC while still allowing
6087 * applications to provide duty cycle or voltage demand. This
6088 * not to be confused with simple sinusoidal control or phase
6089 * voltage control which lacks the performance gains.
6090 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6091 * output is zero (or within deadband). Set to
6092 * false to use the NeutralMode configuration
6093 * setting (default). This flag exists to provide
6094 * the fundamental behavior of this control when
6095 * output is zero, which is to provide 0V to the
6096 * motor.
6097 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6098 * users to use other limit switch sensors connected to
6099 * robot controller. This also allows use of active
6100 * sensors that require external power.
6101 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6102 * users to use other limit switch sensors connected to
6103 * robot controller. This also allows use of active
6104 * sensors that require external power.
6105 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
6106 * the LimitForwardMotion and LimitReverseMotion
6107 * parameters, instead allowing motion.
6108 *
6109 * This can be useful on mechanisms such as an
6110 * intake/feeder, where a limit switch stops motion
6111 * while intaking but should be ignored when feeding
6112 * to a shooter.
6113 *
6114 * The hardware limit faults and Forward/ReverseLimit
6115 * signals will still report the values of the limit
6116 * switches regardless of this parameter.
6117 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
6118 * allowing motion.
6119 *
6120 * This can be useful when calibrating the zero point
6121 * of a mechanism such as an elevator.
6122 *
6123 * The software limit faults will still report the
6124 * values of the software limits regardless of this
6125 * parameter.
6126 * - UseTimesync: Set to true to delay applying this control request until a
6127 * timesync boundary (requires Phoenix Pro and CANivore). This
6128 * eliminates the impact of nondeterministic network delays in
6129 * exchange for a larger but deterministic control latency.
6130 *
6131 * This requires setting the ControlTimesyncFreqHz config in
6132 * MotorOutputConfigs. Additionally, when this is enabled, the
6133 * UpdateFreqHz of this request should be set to 0 Hz.
6134 *
6135 * \param request Control object to request of the device
6136 * \returns Status Code of the request, 0 is OK
6137 */
6138 ctre::phoenix::StatusCode SetControl(const controls::VoltageOut &request) final;
6139
6140 /**
6141 * \brief Request PID to target position with duty cycle feedforward.
6142 *
6143 * \details This control mode will set the motor's position setpoint
6144 * to the position specified by the user. In addition, it will apply
6145 * an additional duty cycle as an arbitrary feedforward value.
6146 *
6147 * - PositionDutyCycle Parameters:
6148 * - Position: Position to drive toward in rotations.
6149 * - Velocity: Velocity to drive toward in rotations per second. This is
6150 * typically used for motion profiles generated by the robot
6151 * program.
6152 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6153 * which increases peak power by ~15% on supported devices (see
6154 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6155 * commutation.
6156 *
6157 * FOC improves motor performance by leveraging torque (current)
6158 * control. However, this may be inconvenient for applications
6159 * that require specifying duty cycle or voltage.
6160 * CTR-Electronics has developed a hybrid method that combines
6161 * the performances gains of FOC while still allowing
6162 * applications to provide duty cycle or voltage demand. This
6163 * not to be confused with simple sinusoidal control or phase
6164 * voltage control which lacks the performance gains.
6165 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
6166 * This is added to the output of the onboard feedforward
6167 * terms.
6168 * - Slot: Select which gains are applied by selecting the slot. Use the
6169 * configuration api to set the gain values for the selected slot
6170 * before enabling this feature. Slot must be within [0,2].
6171 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6172 * output is zero (or within deadband). Set to
6173 * false to use the NeutralMode configuration
6174 * setting (default). This flag exists to provide
6175 * the fundamental behavior of this control when
6176 * output is zero, which is to provide 0V to the
6177 * motor.
6178 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6179 * users to use other limit switch sensors connected to
6180 * robot controller. This also allows use of active
6181 * sensors that require external power.
6182 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6183 * users to use other limit switch sensors connected to
6184 * robot controller. This also allows use of active
6185 * sensors that require external power.
6186 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
6187 * the LimitForwardMotion and LimitReverseMotion
6188 * parameters, instead allowing motion.
6189 *
6190 * This can be useful on mechanisms such as an
6191 * intake/feeder, where a limit switch stops motion
6192 * while intaking but should be ignored when feeding
6193 * to a shooter.
6194 *
6195 * The hardware limit faults and Forward/ReverseLimit
6196 * signals will still report the values of the limit
6197 * switches regardless of this parameter.
6198 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
6199 * allowing motion.
6200 *
6201 * This can be useful when calibrating the zero point
6202 * of a mechanism such as an elevator.
6203 *
6204 * The software limit faults will still report the
6205 * values of the software limits regardless of this
6206 * parameter.
6207 * - UseTimesync: Set to true to delay applying this control request until a
6208 * timesync boundary (requires Phoenix Pro and CANivore). This
6209 * eliminates the impact of nondeterministic network delays in
6210 * exchange for a larger but deterministic control latency.
6211 *
6212 * This requires setting the ControlTimesyncFreqHz config in
6213 * MotorOutputConfigs. Additionally, when this is enabled, the
6214 * UpdateFreqHz of this request should be set to 0 Hz.
6215 *
6216 * \param request Control object to request of the device
6217 * \returns Status Code of the request, 0 is OK
6218 */
6219 ctre::phoenix::StatusCode SetControl(const controls::PositionDutyCycle &request) final;
6220
6221 /**
6222 * \brief Request PID to target position with voltage feedforward
6223 *
6224 * \details This control mode will set the motor's position setpoint
6225 * to the position specified by the user. In addition, it will apply
6226 * an additional voltage as an arbitrary feedforward value.
6227 *
6228 * - PositionVoltage Parameters:
6229 * - Position: Position to drive toward in rotations.
6230 * - Velocity: Velocity to drive toward in rotations per second. This is
6231 * typically used for motion profiles generated by the robot
6232 * program.
6233 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6234 * which increases peak power by ~15% on supported devices (see
6235 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6236 * commutation.
6237 *
6238 * FOC improves motor performance by leveraging torque (current)
6239 * control. However, this may be inconvenient for applications
6240 * that require specifying duty cycle or voltage.
6241 * CTR-Electronics has developed a hybrid method that combines
6242 * the performances gains of FOC while still allowing
6243 * applications to provide duty cycle or voltage demand. This
6244 * not to be confused with simple sinusoidal control or phase
6245 * voltage control which lacks the performance gains.
6246 * - FeedForward: Feedforward to apply in volts. This is added to the output
6247 * of the onboard feedforward terms.
6248 * - Slot: Select which gains are applied by selecting the slot. Use the
6249 * configuration api to set the gain values for the selected slot
6250 * before enabling this feature. Slot must be within [0,2].
6251 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6252 * output is zero (or within deadband). Set to
6253 * false to use the NeutralMode configuration
6254 * setting (default). This flag exists to provide
6255 * the fundamental behavior of this control when
6256 * output is zero, which is to provide 0V to the
6257 * motor.
6258 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6259 * users to use other limit switch sensors connected to
6260 * robot controller. This also allows use of active
6261 * sensors that require external power.
6262 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6263 * users to use other limit switch sensors connected to
6264 * robot controller. This also allows use of active
6265 * sensors that require external power.
6266 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
6267 * the LimitForwardMotion and LimitReverseMotion
6268 * parameters, instead allowing motion.
6269 *
6270 * This can be useful on mechanisms such as an
6271 * intake/feeder, where a limit switch stops motion
6272 * while intaking but should be ignored when feeding
6273 * to a shooter.
6274 *
6275 * The hardware limit faults and Forward/ReverseLimit
6276 * signals will still report the values of the limit
6277 * switches regardless of this parameter.
6278 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
6279 * allowing motion.
6280 *
6281 * This can be useful when calibrating the zero point
6282 * of a mechanism such as an elevator.
6283 *
6284 * The software limit faults will still report the
6285 * values of the software limits regardless of this
6286 * parameter.
6287 * - UseTimesync: Set to true to delay applying this control request until a
6288 * timesync boundary (requires Phoenix Pro and CANivore). This
6289 * eliminates the impact of nondeterministic network delays in
6290 * exchange for a larger but deterministic control latency.
6291 *
6292 * This requires setting the ControlTimesyncFreqHz config in
6293 * MotorOutputConfigs. Additionally, when this is enabled, the
6294 * UpdateFreqHz of this request should be set to 0 Hz.
6295 *
6296 * \param request Control object to request of the device
6297 * \returns Status Code of the request, 0 is OK
6298 */
6299 ctre::phoenix::StatusCode SetControl(const controls::PositionVoltage &request) final;
6300
6301 /**
6302 * \brief Request PID to target velocity with duty cycle feedforward.
6303 *
6304 * \details This control mode will set the motor's velocity setpoint
6305 * to the velocity specified by the user. In addition, it will apply
6306 * an additional voltage as an arbitrary feedforward value.
6307 *
6308 * - VelocityDutyCycle Parameters:
6309 * - Velocity: Velocity to drive toward in rotations per second.
6310 * - Acceleration: Acceleration to drive toward in rotations per second
6311 * squared. This is typically used for motion profiles
6312 * generated by the robot program.
6313 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6314 * which increases peak power by ~15% on supported devices (see
6315 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6316 * commutation.
6317 *
6318 * FOC improves motor performance by leveraging torque (current)
6319 * control. However, this may be inconvenient for applications
6320 * that require specifying duty cycle or voltage.
6321 * CTR-Electronics has developed a hybrid method that combines
6322 * the performances gains of FOC while still allowing
6323 * applications to provide duty cycle or voltage demand. This
6324 * not to be confused with simple sinusoidal control or phase
6325 * voltage control which lacks the performance gains.
6326 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
6327 * This is added to the output of the onboard feedforward
6328 * terms.
6329 * - Slot: Select which gains are applied by selecting the slot. Use the
6330 * configuration api to set the gain values for the selected slot
6331 * before enabling this feature. Slot must be within [0,2].
6332 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6333 * output is zero (or within deadband). Set to
6334 * false to use the NeutralMode configuration
6335 * setting (default). This flag exists to provide
6336 * the fundamental behavior of this control when
6337 * output is zero, which is to provide 0V to the
6338 * motor.
6339 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6340 * users to use other limit switch sensors connected to
6341 * robot controller. This also allows use of active
6342 * sensors that require external power.
6343 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6344 * users to use other limit switch sensors connected to
6345 * robot controller. This also allows use of active
6346 * sensors that require external power.
6347 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
6348 * the LimitForwardMotion and LimitReverseMotion
6349 * parameters, instead allowing motion.
6350 *
6351 * This can be useful on mechanisms such as an
6352 * intake/feeder, where a limit switch stops motion
6353 * while intaking but should be ignored when feeding
6354 * to a shooter.
6355 *
6356 * The hardware limit faults and Forward/ReverseLimit
6357 * signals will still report the values of the limit
6358 * switches regardless of this parameter.
6359 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
6360 * allowing motion.
6361 *
6362 * This can be useful when calibrating the zero point
6363 * of a mechanism such as an elevator.
6364 *
6365 * The software limit faults will still report the
6366 * values of the software limits regardless of this
6367 * parameter.
6368 * - UseTimesync: Set to true to delay applying this control request until a
6369 * timesync boundary (requires Phoenix Pro and CANivore). This
6370 * eliminates the impact of nondeterministic network delays in
6371 * exchange for a larger but deterministic control latency.
6372 *
6373 * This requires setting the ControlTimesyncFreqHz config in
6374 * MotorOutputConfigs. Additionally, when this is enabled, the
6375 * UpdateFreqHz of this request should be set to 0 Hz.
6376 *
6377 * \param request Control object to request of the device
6378 * \returns Status Code of the request, 0 is OK
6379 */
6380 ctre::phoenix::StatusCode SetControl(const controls::VelocityDutyCycle &request) final;
6381
6382 /**
6383 * \brief Request PID to target velocity with voltage feedforward.
6384 *
6385 * \details This control mode will set the motor's velocity setpoint
6386 * to the velocity specified by the user. In addition, it will apply
6387 * an additional voltage as an arbitrary feedforward value.
6388 *
6389 * - VelocityVoltage Parameters:
6390 * - Velocity: Velocity to drive toward in rotations per second.
6391 * - Acceleration: Acceleration to drive toward in rotations per second
6392 * squared. This is typically used for motion profiles
6393 * generated by the robot program.
6394 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6395 * which increases peak power by ~15% on supported devices (see
6396 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6397 * commutation.
6398 *
6399 * FOC improves motor performance by leveraging torque (current)
6400 * control. However, this may be inconvenient for applications
6401 * that require specifying duty cycle or voltage.
6402 * CTR-Electronics has developed a hybrid method that combines
6403 * the performances gains of FOC while still allowing
6404 * applications to provide duty cycle or voltage demand. This
6405 * not to be confused with simple sinusoidal control or phase
6406 * voltage control which lacks the performance gains.
6407 * - FeedForward: Feedforward to apply in volts This is added to the output of
6408 * the onboard feedforward terms.
6409 * - Slot: Select which gains are applied by selecting the slot. Use the
6410 * configuration api to set the gain values for the selected slot
6411 * before enabling this feature. Slot must be within [0,2].
6412 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6413 * output is zero (or within deadband). Set to
6414 * false to use the NeutralMode configuration
6415 * setting (default). This flag exists to provide
6416 * the fundamental behavior of this control when
6417 * output is zero, which is to provide 0V to the
6418 * motor.
6419 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6420 * users to use other limit switch sensors connected to
6421 * robot controller. This also allows use of active
6422 * sensors that require external power.
6423 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6424 * users to use other limit switch sensors connected to
6425 * robot controller. This also allows use of active
6426 * sensors that require external power.
6427 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
6428 * the LimitForwardMotion and LimitReverseMotion
6429 * parameters, instead allowing motion.
6430 *
6431 * This can be useful on mechanisms such as an
6432 * intake/feeder, where a limit switch stops motion
6433 * while intaking but should be ignored when feeding
6434 * to a shooter.
6435 *
6436 * The hardware limit faults and Forward/ReverseLimit
6437 * signals will still report the values of the limit
6438 * switches regardless of this parameter.
6439 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
6440 * allowing motion.
6441 *
6442 * This can be useful when calibrating the zero point
6443 * of a mechanism such as an elevator.
6444 *
6445 * The software limit faults will still report the
6446 * values of the software limits regardless of this
6447 * parameter.
6448 * - UseTimesync: Set to true to delay applying this control request until a
6449 * timesync boundary (requires Phoenix Pro and CANivore). This
6450 * eliminates the impact of nondeterministic network delays in
6451 * exchange for a larger but deterministic control latency.
6452 *
6453 * This requires setting the ControlTimesyncFreqHz config in
6454 * MotorOutputConfigs. Additionally, when this is enabled, the
6455 * UpdateFreqHz of this request should be set to 0 Hz.
6456 *
6457 * \param request Control object to request of the device
6458 * \returns Status Code of the request, 0 is OK
6459 */
6460 ctre::phoenix::StatusCode SetControl(const controls::VelocityVoltage &request) final;
6461
6462 /**
6463 * \brief Requests Motion Magic® to target a final position using a
6464 * motion profile. Users can optionally provide a duty cycle
6465 * feedforward.
6466 *
6467 * \details Motion Magic® produces a motion profile in real-time while
6468 * attempting to honor the Cruise Velocity, Acceleration, and
6469 * (optional) Jerk specified via the Motion Magic® configuration
6470 * values. This control mode does not use the Expo_kV or Expo_kA
6471 * configs.
6472 *
6473 * Target position can be changed on-the-fly and Motion Magic® will do
6474 * its best to adjust the profile. This control mode is duty cycle
6475 * based, so relevant closed-loop gains will use fractional duty cycle
6476 * for the numerator: +1.0 represents full forward output.
6477 *
6478 * - MotionMagicDutyCycle Parameters:
6479 * - Position: Position to drive toward in rotations.
6480 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6481 * which increases peak power by ~15% on supported devices (see
6482 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6483 * commutation.
6484 *
6485 * FOC improves motor performance by leveraging torque (current)
6486 * control. However, this may be inconvenient for applications
6487 * that require specifying duty cycle or voltage.
6488 * CTR-Electronics has developed a hybrid method that combines
6489 * the performances gains of FOC while still allowing
6490 * applications to provide duty cycle or voltage demand. This
6491 * not to be confused with simple sinusoidal control or phase
6492 * voltage control which lacks the performance gains.
6493 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
6494 * This is added to the output of the onboard feedforward
6495 * terms.
6496 * - Slot: Select which gains are applied by selecting the slot. Use the
6497 * configuration api to set the gain values for the selected slot
6498 * before enabling this feature. Slot must be within [0,2].
6499 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6500 * output is zero (or within deadband). Set to
6501 * false to use the NeutralMode configuration
6502 * setting (default). This flag exists to provide
6503 * the fundamental behavior of this control when
6504 * output is zero, which is to provide 0V to the
6505 * motor.
6506 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6507 * users to use other limit switch sensors connected to
6508 * robot controller. This also allows use of active
6509 * sensors that require external power.
6510 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6511 * users to use other limit switch sensors connected to
6512 * robot controller. This also allows use of active
6513 * sensors that require external power.
6514 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
6515 * the LimitForwardMotion and LimitReverseMotion
6516 * parameters, instead allowing motion.
6517 *
6518 * This can be useful on mechanisms such as an
6519 * intake/feeder, where a limit switch stops motion
6520 * while intaking but should be ignored when feeding
6521 * to a shooter.
6522 *
6523 * The hardware limit faults and Forward/ReverseLimit
6524 * signals will still report the values of the limit
6525 * switches regardless of this parameter.
6526 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
6527 * allowing motion.
6528 *
6529 * This can be useful when calibrating the zero point
6530 * of a mechanism such as an elevator.
6531 *
6532 * The software limit faults will still report the
6533 * values of the software limits regardless of this
6534 * parameter.
6535 * - UseTimesync: Set to true to delay applying this control request until a
6536 * timesync boundary (requires Phoenix Pro and CANivore). This
6537 * eliminates the impact of nondeterministic network delays in
6538 * exchange for a larger but deterministic control latency.
6539 *
6540 * This requires setting the ControlTimesyncFreqHz config in
6541 * MotorOutputConfigs. Additionally, when this is enabled, the
6542 * UpdateFreqHz of this request should be set to 0 Hz.
6543 *
6544 * \param request Control object to request of the device
6545 * \returns Status Code of the request, 0 is OK
6546 */
6547 ctre::phoenix::StatusCode SetControl(const controls::MotionMagicDutyCycle &request) final;
6548
6549 /**
6550 * \brief Requests Motion Magic® to target a final position using a
6551 * motion profile. Users can optionally provide a voltage
6552 * feedforward.
6553 *
6554 * \details Motion Magic® produces a motion profile in real-time while
6555 * attempting to honor the Cruise Velocity, Acceleration, and
6556 * (optional) Jerk specified via the Motion Magic® configuration
6557 * values. This control mode does not use the Expo_kV or Expo_kA
6558 * configs.
6559 *
6560 * Target position can be changed on-the-fly and Motion Magic® will do
6561 * its best to adjust the profile. This control mode is
6562 * voltage-based, so relevant closed-loop gains will use Volts for the
6563 * numerator.
6564 *
6565 * - MotionMagicVoltage Parameters:
6566 * - Position: Position to drive toward in rotations.
6567 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6568 * which increases peak power by ~15% on supported devices (see
6569 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6570 * commutation.
6571 *
6572 * FOC improves motor performance by leveraging torque (current)
6573 * control. However, this may be inconvenient for applications
6574 * that require specifying duty cycle or voltage.
6575 * CTR-Electronics has developed a hybrid method that combines
6576 * the performances gains of FOC while still allowing
6577 * applications to provide duty cycle or voltage demand. This
6578 * not to be confused with simple sinusoidal control or phase
6579 * voltage control which lacks the performance gains.
6580 * - FeedForward: Feedforward to apply in volts. This is added to the output
6581 * of the onboard feedforward terms.
6582 * - Slot: Select which gains are applied by selecting the slot. Use the
6583 * configuration api to set the gain values for the selected slot
6584 * before enabling this feature. Slot must be within [0,2].
6585 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6586 * output is zero (or within deadband). Set to
6587 * false to use the NeutralMode configuration
6588 * setting (default). This flag exists to provide
6589 * the fundamental behavior of this control when
6590 * output is zero, which is to provide 0V to the
6591 * motor.
6592 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6593 * users to use other limit switch sensors connected to
6594 * robot controller. This also allows use of active
6595 * sensors that require external power.
6596 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6597 * users to use other limit switch sensors connected to
6598 * robot controller. This also allows use of active
6599 * sensors that require external power.
6600 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
6601 * the LimitForwardMotion and LimitReverseMotion
6602 * parameters, instead allowing motion.
6603 *
6604 * This can be useful on mechanisms such as an
6605 * intake/feeder, where a limit switch stops motion
6606 * while intaking but should be ignored when feeding
6607 * to a shooter.
6608 *
6609 * The hardware limit faults and Forward/ReverseLimit
6610 * signals will still report the values of the limit
6611 * switches regardless of this parameter.
6612 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
6613 * allowing motion.
6614 *
6615 * This can be useful when calibrating the zero point
6616 * of a mechanism such as an elevator.
6617 *
6618 * The software limit faults will still report the
6619 * values of the software limits regardless of this
6620 * parameter.
6621 * - UseTimesync: Set to true to delay applying this control request until a
6622 * timesync boundary (requires Phoenix Pro and CANivore). This
6623 * eliminates the impact of nondeterministic network delays in
6624 * exchange for a larger but deterministic control latency.
6625 *
6626 * This requires setting the ControlTimesyncFreqHz config in
6627 * MotorOutputConfigs. Additionally, when this is enabled, the
6628 * UpdateFreqHz of this request should be set to 0 Hz.
6629 *
6630 * \param request Control object to request of the device
6631 * \returns Status Code of the request, 0 is OK
6632 */
6633 ctre::phoenix::StatusCode SetControl(const controls::MotionMagicVoltage &request) final;
6634
6635 /**
6636 * \brief Request a specified motor duty cycle with a differential
6637 * position closed-loop.
6638 *
6639 * \details This control mode will output a proportion of the supplied
6640 * voltage which is supplied by the user. It will also set the motor's
6641 * differential position setpoint to the specified position.
6642 *
6643 * - DifferentialDutyCycle Parameters:
6644 * - AverageOutput: Proportion of supply voltage to apply on the Average axis
6645 * in fractional units between -1 and +1.
6646 * - DifferentialPosition: Differential position to drive towards in
6647 * rotations.
6648 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6649 * which increases peak power by ~15% on supported devices (see
6650 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6651 * commutation.
6652 *
6653 * FOC improves motor performance by leveraging torque (current)
6654 * control. However, this may be inconvenient for applications
6655 * that require specifying duty cycle or voltage.
6656 * CTR-Electronics has developed a hybrid method that combines
6657 * the performances gains of FOC while still allowing
6658 * applications to provide duty cycle or voltage demand. This
6659 * not to be confused with simple sinusoidal control or phase
6660 * voltage control which lacks the performance gains.
6661 * - DifferentialSlot: Select which gains are applied to the differential
6662 * controller by selecting the slot. Use the
6663 * configuration api to set the gain values for the
6664 * selected slot before enabling this feature. Slot must
6665 * be within [0,2].
6666 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6667 * output is zero (or within deadband). Set to
6668 * false to use the NeutralMode configuration
6669 * setting (default). This flag exists to provide
6670 * the fundamental behavior of this control when
6671 * output is zero, which is to provide 0V to the
6672 * motor.
6673 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6674 * users to use other limit switch sensors connected to
6675 * robot controller. This also allows use of active
6676 * sensors that require external power.
6677 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6678 * users to use other limit switch sensors connected to
6679 * robot controller. This also allows use of active
6680 * sensors that require external power.
6681 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
6682 * the LimitForwardMotion and LimitReverseMotion
6683 * parameters, instead allowing motion.
6684 *
6685 * This can be useful on mechanisms such as an
6686 * intake/feeder, where a limit switch stops motion
6687 * while intaking but should be ignored when feeding
6688 * to a shooter.
6689 *
6690 * The hardware limit faults and Forward/ReverseLimit
6691 * signals will still report the values of the limit
6692 * switches regardless of this parameter.
6693 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
6694 * allowing motion.
6695 *
6696 * This can be useful when calibrating the zero point
6697 * of a mechanism such as an elevator.
6698 *
6699 * The software limit faults will still report the
6700 * values of the software limits regardless of this
6701 * parameter.
6702 * - UseTimesync: Set to true to delay applying this control request until a
6703 * timesync boundary (requires Phoenix Pro and CANivore). This
6704 * eliminates the impact of nondeterministic network delays in
6705 * exchange for a larger but deterministic control latency.
6706 *
6707 * This requires setting the ControlTimesyncFreqHz config in
6708 * MotorOutputConfigs. Additionally, when this is enabled, the
6709 * UpdateFreqHz of this request should be set to 0 Hz.
6710 *
6711 * \param request Control object to request of the device
6712 * \returns Status Code of the request, 0 is OK
6713 */
6714 ctre::phoenix::StatusCode SetControl(const controls::DifferentialDutyCycle &request) final;
6715
6716 /**
6717 * \brief Request a specified voltage with a differential position
6718 * closed-loop.
6719 *
6720 * \details This control mode will attempt to apply the specified
6721 * voltage to the motor. If the supply voltage is below the requested
6722 * voltage, the motor controller will output the supply voltage. It
6723 * will also set the motor's differential position setpoint to the
6724 * specified position.
6725 *
6726 * - DifferentialVoltage Parameters:
6727 * - AverageOutput: Voltage to attempt to drive at on the Average axis.
6728 * - DifferentialPosition: Differential position to drive towards in
6729 * rotations.
6730 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6731 * which increases peak power by ~15% on supported devices (see
6732 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6733 * commutation.
6734 *
6735 * FOC improves motor performance by leveraging torque (current)
6736 * control. However, this may be inconvenient for applications
6737 * that require specifying duty cycle or voltage.
6738 * CTR-Electronics has developed a hybrid method that combines
6739 * the performances gains of FOC while still allowing
6740 * applications to provide duty cycle or voltage demand. This
6741 * not to be confused with simple sinusoidal control or phase
6742 * voltage control which lacks the performance gains.
6743 * - DifferentialSlot: Select which gains are applied to the differential
6744 * controller by selecting the slot. Use the
6745 * configuration api to set the gain values for the
6746 * selected slot before enabling this feature. Slot must
6747 * be within [0,2].
6748 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6749 * output is zero (or within deadband). Set to
6750 * false to use the NeutralMode configuration
6751 * setting (default). This flag exists to provide
6752 * the fundamental behavior of this control when
6753 * output is zero, which is to provide 0V to the
6754 * motor.
6755 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6756 * users to use other limit switch sensors connected to
6757 * robot controller. This also allows use of active
6758 * sensors that require external power.
6759 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6760 * users to use other limit switch sensors connected to
6761 * robot controller. This also allows use of active
6762 * sensors that require external power.
6763 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
6764 * the LimitForwardMotion and LimitReverseMotion
6765 * parameters, instead allowing motion.
6766 *
6767 * This can be useful on mechanisms such as an
6768 * intake/feeder, where a limit switch stops motion
6769 * while intaking but should be ignored when feeding
6770 * to a shooter.
6771 *
6772 * The hardware limit faults and Forward/ReverseLimit
6773 * signals will still report the values of the limit
6774 * switches regardless of this parameter.
6775 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
6776 * allowing motion.
6777 *
6778 * This can be useful when calibrating the zero point
6779 * of a mechanism such as an elevator.
6780 *
6781 * The software limit faults will still report the
6782 * values of the software limits regardless of this
6783 * parameter.
6784 * - UseTimesync: Set to true to delay applying this control request until a
6785 * timesync boundary (requires Phoenix Pro and CANivore). This
6786 * eliminates the impact of nondeterministic network delays in
6787 * exchange for a larger but deterministic control latency.
6788 *
6789 * This requires setting the ControlTimesyncFreqHz config in
6790 * MotorOutputConfigs. Additionally, when this is enabled, the
6791 * UpdateFreqHz of this request should be set to 0 Hz.
6792 *
6793 * \param request Control object to request of the device
6794 * \returns Status Code of the request, 0 is OK
6795 */
6796 ctre::phoenix::StatusCode SetControl(const controls::DifferentialVoltage &request) final;
6797
6798 /**
6799 * \brief Request PID to target position with a differential position
6800 * setpoint.
6801 *
6802 * \details This control mode will set the motor's position setpoint
6803 * to the position specified by the user. It will also set the motor's
6804 * differential position setpoint to the specified position.
6805 *
6806 * - DifferentialPositionDutyCycle Parameters:
6807 * - AveragePosition: Average position to drive toward in rotations.
6808 * - DifferentialPosition: Differential position to drive toward in rotations.
6809 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6810 * which increases peak power by ~15% on supported devices (see
6811 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6812 * commutation.
6813 *
6814 * FOC improves motor performance by leveraging torque (current)
6815 * control. However, this may be inconvenient for applications
6816 * that require specifying duty cycle or voltage.
6817 * CTR-Electronics has developed a hybrid method that combines
6818 * the performances gains of FOC while still allowing
6819 * applications to provide duty cycle or voltage demand. This
6820 * not to be confused with simple sinusoidal control or phase
6821 * voltage control which lacks the performance gains.
6822 * - AverageSlot: Select which gains are applied to the average controller by
6823 * selecting the slot. Use the configuration api to set the
6824 * gain values for the selected slot before enabling this
6825 * feature. Slot must be within [0,2].
6826 * - DifferentialSlot: Select which gains are applied to the differential
6827 * controller by selecting the slot. Use the
6828 * configuration api to set the gain values for the
6829 * selected slot before enabling this feature. Slot must
6830 * be within [0,2].
6831 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6832 * output is zero (or within deadband). Set to
6833 * false to use the NeutralMode configuration
6834 * setting (default). This flag exists to provide
6835 * the fundamental behavior of this control when
6836 * output is zero, which is to provide 0V to the
6837 * motor.
6838 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6839 * users to use other limit switch sensors connected to
6840 * robot controller. This also allows use of active
6841 * sensors that require external power.
6842 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6843 * users to use other limit switch sensors connected to
6844 * robot controller. This also allows use of active
6845 * sensors that require external power.
6846 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
6847 * the LimitForwardMotion and LimitReverseMotion
6848 * parameters, instead allowing motion.
6849 *
6850 * This can be useful on mechanisms such as an
6851 * intake/feeder, where a limit switch stops motion
6852 * while intaking but should be ignored when feeding
6853 * to a shooter.
6854 *
6855 * The hardware limit faults and Forward/ReverseLimit
6856 * signals will still report the values of the limit
6857 * switches regardless of this parameter.
6858 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
6859 * allowing motion.
6860 *
6861 * This can be useful when calibrating the zero point
6862 * of a mechanism such as an elevator.
6863 *
6864 * The software limit faults will still report the
6865 * values of the software limits regardless of this
6866 * parameter.
6867 * - UseTimesync: Set to true to delay applying this control request until a
6868 * timesync boundary (requires Phoenix Pro and CANivore). This
6869 * eliminates the impact of nondeterministic network delays in
6870 * exchange for a larger but deterministic control latency.
6871 *
6872 * This requires setting the ControlTimesyncFreqHz config in
6873 * MotorOutputConfigs. Additionally, when this is enabled, the
6874 * UpdateFreqHz of this request should be set to 0 Hz.
6875 *
6876 * \param request Control object to request of the device
6877 * \returns Status Code of the request, 0 is OK
6878 */
6879 ctre::phoenix::StatusCode SetControl(const controls::DifferentialPositionDutyCycle &request) final;
6880
6881 /**
6882 * \brief Request PID to target position with a differential position
6883 * setpoint
6884 *
6885 * \details This control mode will set the motor's position setpoint
6886 * to the position specified by the user. It will also set the motor's
6887 * differential position setpoint to the specified position.
6888 *
6889 * - DifferentialPositionVoltage Parameters:
6890 * - AveragePosition: Average position to drive toward in rotations.
6891 * - DifferentialPosition: Differential position to drive toward in rotations.
6892 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6893 * which increases peak power by ~15% on supported devices (see
6894 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6895 * commutation.
6896 *
6897 * FOC improves motor performance by leveraging torque (current)
6898 * control. However, this may be inconvenient for applications
6899 * that require specifying duty cycle or voltage.
6900 * CTR-Electronics has developed a hybrid method that combines
6901 * the performances gains of FOC while still allowing
6902 * applications to provide duty cycle or voltage demand. This
6903 * not to be confused with simple sinusoidal control or phase
6904 * voltage control which lacks the performance gains.
6905 * - AverageSlot: Select which gains are applied to the average controller by
6906 * selecting the slot. Use the configuration api to set the
6907 * gain values for the selected slot before enabling this
6908 * feature. Slot must be within [0,2].
6909 * - DifferentialSlot: Select which gains are applied to the differential
6910 * controller by selecting the slot. Use the
6911 * configuration api to set the gain values for the
6912 * selected slot before enabling this feature. Slot must
6913 * be within [0,2].
6914 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6915 * output is zero (or within deadband). Set to
6916 * false to use the NeutralMode configuration
6917 * setting (default). This flag exists to provide
6918 * the fundamental behavior of this control when
6919 * output is zero, which is to provide 0V to the
6920 * motor.
6921 * - LimitForwardMotion: Set to true to force forward limiting. This allows
6922 * users to use other limit switch sensors connected to
6923 * robot controller. This also allows use of active
6924 * sensors that require external power.
6925 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
6926 * users to use other limit switch sensors connected to
6927 * robot controller. This also allows use of active
6928 * sensors that require external power.
6929 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
6930 * the LimitForwardMotion and LimitReverseMotion
6931 * parameters, instead allowing motion.
6932 *
6933 * This can be useful on mechanisms such as an
6934 * intake/feeder, where a limit switch stops motion
6935 * while intaking but should be ignored when feeding
6936 * to a shooter.
6937 *
6938 * The hardware limit faults and Forward/ReverseLimit
6939 * signals will still report the values of the limit
6940 * switches regardless of this parameter.
6941 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
6942 * allowing motion.
6943 *
6944 * This can be useful when calibrating the zero point
6945 * of a mechanism such as an elevator.
6946 *
6947 * The software limit faults will still report the
6948 * values of the software limits regardless of this
6949 * parameter.
6950 * - UseTimesync: Set to true to delay applying this control request until a
6951 * timesync boundary (requires Phoenix Pro and CANivore). This
6952 * eliminates the impact of nondeterministic network delays in
6953 * exchange for a larger but deterministic control latency.
6954 *
6955 * This requires setting the ControlTimesyncFreqHz config in
6956 * MotorOutputConfigs. Additionally, when this is enabled, the
6957 * UpdateFreqHz of this request should be set to 0 Hz.
6958 *
6959 * \param request Control object to request of the device
6960 * \returns Status Code of the request, 0 is OK
6961 */
6962 ctre::phoenix::StatusCode SetControl(const controls::DifferentialPositionVoltage &request) final;
6963
6964 /**
6965 * \brief Request PID to target velocity with a differential position
6966 * setpoint.
6967 *
6968 * \details This control mode will set the motor's velocity setpoint
6969 * to the velocity specified by the user. It will also set the motor's
6970 * differential position setpoint to the specified position.
6971 *
6972 * - DifferentialVelocityDutyCycle Parameters:
6973 * - AverageVelocity: Average velocity to drive toward in rotations per
6974 * second.
6975 * - DifferentialPosition: Differential position to drive toward in rotations.
6976 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
6977 * which increases peak power by ~15% on supported devices (see
6978 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
6979 * commutation.
6980 *
6981 * FOC improves motor performance by leveraging torque (current)
6982 * control. However, this may be inconvenient for applications
6983 * that require specifying duty cycle or voltage.
6984 * CTR-Electronics has developed a hybrid method that combines
6985 * the performances gains of FOC while still allowing
6986 * applications to provide duty cycle or voltage demand. This
6987 * not to be confused with simple sinusoidal control or phase
6988 * voltage control which lacks the performance gains.
6989 * - AverageSlot: Select which gains are applied to the average controller by
6990 * selecting the slot. Use the configuration api to set the
6991 * gain values for the selected slot before enabling this
6992 * feature. Slot must be within [0,2].
6993 * - DifferentialSlot: Select which gains are applied to the differential
6994 * controller by selecting the slot. Use the
6995 * configuration api to set the gain values for the
6996 * selected slot before enabling this feature. Slot must
6997 * be within [0,2].
6998 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
6999 * output is zero (or within deadband). Set to
7000 * false to use the NeutralMode configuration
7001 * setting (default). This flag exists to provide
7002 * the fundamental behavior of this control when
7003 * output is zero, which is to provide 0V to the
7004 * motor.
7005 * - LimitForwardMotion: Set to true to force forward limiting. This allows
7006 * users to use other limit switch sensors connected to
7007 * robot controller. This also allows use of active
7008 * sensors that require external power.
7009 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
7010 * users to use other limit switch sensors connected to
7011 * robot controller. This also allows use of active
7012 * sensors that require external power.
7013 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
7014 * the LimitForwardMotion and LimitReverseMotion
7015 * parameters, instead allowing motion.
7016 *
7017 * This can be useful on mechanisms such as an
7018 * intake/feeder, where a limit switch stops motion
7019 * while intaking but should be ignored when feeding
7020 * to a shooter.
7021 *
7022 * The hardware limit faults and Forward/ReverseLimit
7023 * signals will still report the values of the limit
7024 * switches regardless of this parameter.
7025 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
7026 * allowing motion.
7027 *
7028 * This can be useful when calibrating the zero point
7029 * of a mechanism such as an elevator.
7030 *
7031 * The software limit faults will still report the
7032 * values of the software limits regardless of this
7033 * parameter.
7034 * - UseTimesync: Set to true to delay applying this control request until a
7035 * timesync boundary (requires Phoenix Pro and CANivore). This
7036 * eliminates the impact of nondeterministic network delays in
7037 * exchange for a larger but deterministic control latency.
7038 *
7039 * This requires setting the ControlTimesyncFreqHz config in
7040 * MotorOutputConfigs. Additionally, when this is enabled, the
7041 * UpdateFreqHz of this request should be set to 0 Hz.
7042 *
7043 * \param request Control object to request of the device
7044 * \returns Status Code of the request, 0 is OK
7045 */
7046 ctre::phoenix::StatusCode SetControl(const controls::DifferentialVelocityDutyCycle &request) final;
7047
7048 /**
7049 * \brief Request PID to target velocity with a differential position
7050 * setpoint.
7051 *
7052 * \details This control mode will set the motor's velocity setpoint
7053 * to the velocity specified by the user. It will also set the motor's
7054 * differential position setpoint to the specified position.
7055 *
7056 * - DifferentialVelocityVoltage Parameters:
7057 * - AverageVelocity: Average velocity to drive toward in rotations per
7058 * second.
7059 * - DifferentialPosition: Differential position to drive toward in rotations.
7060 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
7061 * which increases peak power by ~15% on supported devices (see
7062 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
7063 * commutation.
7064 *
7065 * FOC improves motor performance by leveraging torque (current)
7066 * control. However, this may be inconvenient for applications
7067 * that require specifying duty cycle or voltage.
7068 * CTR-Electronics has developed a hybrid method that combines
7069 * the performances gains of FOC while still allowing
7070 * applications to provide duty cycle or voltage demand. This
7071 * not to be confused with simple sinusoidal control or phase
7072 * voltage control which lacks the performance gains.
7073 * - AverageSlot: Select which gains are applied to the average controller by
7074 * selecting the slot. Use the configuration api to set the
7075 * gain values for the selected slot before enabling this
7076 * feature. Slot must be within [0,2].
7077 * - DifferentialSlot: Select which gains are applied to the differential
7078 * controller by selecting the slot. Use the
7079 * configuration api to set the gain values for the
7080 * selected slot before enabling this feature. Slot must
7081 * be within [0,2].
7082 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
7083 * output is zero (or within deadband). Set to
7084 * false to use the NeutralMode configuration
7085 * setting (default). This flag exists to provide
7086 * the fundamental behavior of this control when
7087 * output is zero, which is to provide 0V to the
7088 * motor.
7089 * - LimitForwardMotion: Set to true to force forward limiting. This allows
7090 * users to use other limit switch sensors connected to
7091 * robot controller. This also allows use of active
7092 * sensors that require external power.
7093 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
7094 * users to use other limit switch sensors connected to
7095 * robot controller. This also allows use of active
7096 * sensors that require external power.
7097 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
7098 * the LimitForwardMotion and LimitReverseMotion
7099 * parameters, instead allowing motion.
7100 *
7101 * This can be useful on mechanisms such as an
7102 * intake/feeder, where a limit switch stops motion
7103 * while intaking but should be ignored when feeding
7104 * to a shooter.
7105 *
7106 * The hardware limit faults and Forward/ReverseLimit
7107 * signals will still report the values of the limit
7108 * switches regardless of this parameter.
7109 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
7110 * allowing motion.
7111 *
7112 * This can be useful when calibrating the zero point
7113 * of a mechanism such as an elevator.
7114 *
7115 * The software limit faults will still report the
7116 * values of the software limits regardless of this
7117 * parameter.
7118 * - UseTimesync: Set to true to delay applying this control request until a
7119 * timesync boundary (requires Phoenix Pro and CANivore). This
7120 * eliminates the impact of nondeterministic network delays in
7121 * exchange for a larger but deterministic control latency.
7122 *
7123 * This requires setting the ControlTimesyncFreqHz config in
7124 * MotorOutputConfigs. Additionally, when this is enabled, the
7125 * UpdateFreqHz of this request should be set to 0 Hz.
7126 *
7127 * \param request Control object to request of the device
7128 * \returns Status Code of the request, 0 is OK
7129 */
7130 ctre::phoenix::StatusCode SetControl(const controls::DifferentialVelocityVoltage &request) final;
7131
7132 /**
7133 * \brief Requests Motion Magic® to target a final position using a
7134 * motion profile, and PID to a differential position setpoint.
7135 *
7136 * \details Motion Magic® produces a motion profile in real-time while
7137 * attempting to honor the Cruise Velocity, Acceleration, and
7138 * (optional) Jerk specified via the Motion Magic® configuration
7139 * values. This control mode does not use the Expo_kV or Expo_kA
7140 * configs.
7141 *
7142 * Target position can be changed on-the-fly and Motion Magic® will do
7143 * its best to adjust the profile. This control mode is duty cycle
7144 * based, so relevant closed-loop gains will use fractional duty cycle
7145 * for the numerator: +1.0 represents full forward output.
7146 *
7147 * - DifferentialMotionMagicDutyCycle Parameters:
7148 * - AveragePosition: Average position to drive toward in rotations.
7149 * - DifferentialPosition: Differential position to drive toward in rotations.
7150 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
7151 * which increases peak power by ~15% on supported devices (see
7152 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
7153 * commutation.
7154 *
7155 * FOC improves motor performance by leveraging torque (current)
7156 * control. However, this may be inconvenient for applications
7157 * that require specifying duty cycle or voltage.
7158 * CTR-Electronics has developed a hybrid method that combines
7159 * the performances gains of FOC while still allowing
7160 * applications to provide duty cycle or voltage demand. This
7161 * not to be confused with simple sinusoidal control or phase
7162 * voltage control which lacks the performance gains.
7163 * - AverageSlot: Select which gains are applied to the average controller by
7164 * selecting the slot. Use the configuration api to set the
7165 * gain values for the selected slot before enabling this
7166 * feature. Slot must be within [0,2].
7167 * - DifferentialSlot: Select which gains are applied to the differential
7168 * controller by selecting the slot. Use the
7169 * configuration api to set the gain values for the
7170 * selected slot before enabling this feature. Slot must
7171 * be within [0,2].
7172 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
7173 * output is zero (or within deadband). Set to
7174 * false to use the NeutralMode configuration
7175 * setting (default). This flag exists to provide
7176 * the fundamental behavior of this control when
7177 * output is zero, which is to provide 0V to the
7178 * motor.
7179 * - LimitForwardMotion: Set to true to force forward limiting. This allows
7180 * users to use other limit switch sensors connected to
7181 * robot controller. This also allows use of active
7182 * sensors that require external power.
7183 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
7184 * users to use other limit switch sensors connected to
7185 * robot controller. This also allows use of active
7186 * sensors that require external power.
7187 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
7188 * the LimitForwardMotion and LimitReverseMotion
7189 * parameters, instead allowing motion.
7190 *
7191 * This can be useful on mechanisms such as an
7192 * intake/feeder, where a limit switch stops motion
7193 * while intaking but should be ignored when feeding
7194 * to a shooter.
7195 *
7196 * The hardware limit faults and Forward/ReverseLimit
7197 * signals will still report the values of the limit
7198 * switches regardless of this parameter.
7199 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
7200 * allowing motion.
7201 *
7202 * This can be useful when calibrating the zero point
7203 * of a mechanism such as an elevator.
7204 *
7205 * The software limit faults will still report the
7206 * values of the software limits regardless of this
7207 * parameter.
7208 * - UseTimesync: Set to true to delay applying this control request until a
7209 * timesync boundary (requires Phoenix Pro and CANivore). This
7210 * eliminates the impact of nondeterministic network delays in
7211 * exchange for a larger but deterministic control latency.
7212 *
7213 * This requires setting the ControlTimesyncFreqHz config in
7214 * MotorOutputConfigs. Additionally, when this is enabled, the
7215 * UpdateFreqHz of this request should be set to 0 Hz.
7216 *
7217 * \param request Control object to request of the device
7218 * \returns Status Code of the request, 0 is OK
7219 */
7220 ctre::phoenix::StatusCode SetControl(const controls::DifferentialMotionMagicDutyCycle &request) final;
7221
7222 /**
7223 * \brief Requests Motion Magic® to target a final position using a
7224 * motion profile, and PID to a differential position setpoint.
7225 *
7226 * \details Motion Magic® produces a motion profile in real-time while
7227 * attempting to honor the Cruise Velocity, Acceleration, and
7228 * (optional) Jerk specified via the Motion Magic® configuration
7229 * values. This control mode does not use the Expo_kV or Expo_kA
7230 * configs.
7231 *
7232 * Target position can be changed on-the-fly and Motion Magic® will do
7233 * its best to adjust the profile. This control mode is
7234 * voltage-based, so relevant closed-loop gains will use Volts for the
7235 * numerator.
7236 *
7237 * - DifferentialMotionMagicVoltage Parameters:
7238 * - AveragePosition: Average position to drive toward in rotations.
7239 * - DifferentialPosition: Differential position to drive toward in rotations.
7240 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
7241 * which increases peak power by ~15% on supported devices (see
7242 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
7243 * commutation.
7244 *
7245 * FOC improves motor performance by leveraging torque (current)
7246 * control. However, this may be inconvenient for applications
7247 * that require specifying duty cycle or voltage.
7248 * CTR-Electronics has developed a hybrid method that combines
7249 * the performances gains of FOC while still allowing
7250 * applications to provide duty cycle or voltage demand. This
7251 * not to be confused with simple sinusoidal control or phase
7252 * voltage control which lacks the performance gains.
7253 * - AverageSlot: Select which gains are applied to the average controller by
7254 * selecting the slot. Use the configuration api to set the
7255 * gain values for the selected slot before enabling this
7256 * feature. Slot must be within [0,2].
7257 * - DifferentialSlot: Select which gains are applied to the differential
7258 * controller by selecting the slot. Use the
7259 * configuration api to set the gain values for the
7260 * selected slot before enabling this feature. Slot must
7261 * be within [0,2].
7262 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
7263 * output is zero (or within deadband). Set to
7264 * false to use the NeutralMode configuration
7265 * setting (default). This flag exists to provide
7266 * the fundamental behavior of this control when
7267 * output is zero, which is to provide 0V to the
7268 * motor.
7269 * - LimitForwardMotion: Set to true to force forward limiting. This allows
7270 * users to use other limit switch sensors connected to
7271 * robot controller. This also allows use of active
7272 * sensors that require external power.
7273 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
7274 * users to use other limit switch sensors connected to
7275 * robot controller. This also allows use of active
7276 * sensors that require external power.
7277 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
7278 * the LimitForwardMotion and LimitReverseMotion
7279 * parameters, instead allowing motion.
7280 *
7281 * This can be useful on mechanisms such as an
7282 * intake/feeder, where a limit switch stops motion
7283 * while intaking but should be ignored when feeding
7284 * to a shooter.
7285 *
7286 * The hardware limit faults and Forward/ReverseLimit
7287 * signals will still report the values of the limit
7288 * switches regardless of this parameter.
7289 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
7290 * allowing motion.
7291 *
7292 * This can be useful when calibrating the zero point
7293 * of a mechanism such as an elevator.
7294 *
7295 * The software limit faults will still report the
7296 * values of the software limits regardless of this
7297 * parameter.
7298 * - UseTimesync: Set to true to delay applying this control request until a
7299 * timesync boundary (requires Phoenix Pro and CANivore). This
7300 * eliminates the impact of nondeterministic network delays in
7301 * exchange for a larger but deterministic control latency.
7302 *
7303 * This requires setting the ControlTimesyncFreqHz config in
7304 * MotorOutputConfigs. Additionally, when this is enabled, the
7305 * UpdateFreqHz of this request should be set to 0 Hz.
7306 *
7307 * \param request Control object to request of the device
7308 * \returns Status Code of the request, 0 is OK
7309 */
7310 ctre::phoenix::StatusCode SetControl(const controls::DifferentialMotionMagicVoltage &request) final;
7311
7312 /**
7313 * \brief Requests Motion Magic® to target a final position using an
7314 * exponential motion profile, and PID to a differential position
7315 * setpoint.
7316 *
7317 * \details Motion Magic® Expo produces a motion profile in real-time
7318 * while attempting to honor the Cruise Velocity (optional) and the
7319 * mechanism kV and kA, specified via the Motion Magic® configuration
7320 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA
7321 * configs are always in output units of Volts.
7322 *
7323 * Setting Cruise Velocity to 0 will allow the profile to run to the
7324 * max possible velocity based on Expo_kV. This control mode does not
7325 * use the Acceleration or Jerk configs.
7326 *
7327 * Target position can be changed on-the-fly and Motion Magic® will do
7328 * its best to adjust the profile. This control mode is duty cycle
7329 * based, so relevant closed-loop gains will use fractional duty cycle
7330 * for the numerator: +1.0 represents full forward output.
7331 *
7332 * - DifferentialMotionMagicExpoDutyCycle Parameters:
7333 * - AveragePosition: Average position to drive toward in rotations.
7334 * - DifferentialPosition: Differential position to drive toward in rotations.
7335 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
7336 * which increases peak power by ~15% on supported devices (see
7337 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
7338 * commutation.
7339 *
7340 * FOC improves motor performance by leveraging torque (current)
7341 * control. However, this may be inconvenient for applications
7342 * that require specifying duty cycle or voltage.
7343 * CTR-Electronics has developed a hybrid method that combines
7344 * the performances gains of FOC while still allowing
7345 * applications to provide duty cycle or voltage demand. This
7346 * not to be confused with simple sinusoidal control or phase
7347 * voltage control which lacks the performance gains.
7348 * - AverageSlot: Select which gains are applied to the average controller by
7349 * selecting the slot. Use the configuration api to set the
7350 * gain values for the selected slot before enabling this
7351 * feature. Slot must be within [0,2].
7352 * - DifferentialSlot: Select which gains are applied to the differential
7353 * controller by selecting the slot. Use the
7354 * configuration api to set the gain values for the
7355 * selected slot before enabling this feature. Slot must
7356 * be within [0,2].
7357 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
7358 * output is zero (or within deadband). Set to
7359 * false to use the NeutralMode configuration
7360 * setting (default). This flag exists to provide
7361 * the fundamental behavior of this control when
7362 * output is zero, which is to provide 0V to the
7363 * motor.
7364 * - LimitForwardMotion: Set to true to force forward limiting. This allows
7365 * users to use other limit switch sensors connected to
7366 * robot controller. This also allows use of active
7367 * sensors that require external power.
7368 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
7369 * users to use other limit switch sensors connected to
7370 * robot controller. This also allows use of active
7371 * sensors that require external power.
7372 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
7373 * the LimitForwardMotion and LimitReverseMotion
7374 * parameters, instead allowing motion.
7375 *
7376 * This can be useful on mechanisms such as an
7377 * intake/feeder, where a limit switch stops motion
7378 * while intaking but should be ignored when feeding
7379 * to a shooter.
7380 *
7381 * The hardware limit faults and Forward/ReverseLimit
7382 * signals will still report the values of the limit
7383 * switches regardless of this parameter.
7384 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
7385 * allowing motion.
7386 *
7387 * This can be useful when calibrating the zero point
7388 * of a mechanism such as an elevator.
7389 *
7390 * The software limit faults will still report the
7391 * values of the software limits regardless of this
7392 * parameter.
7393 * - UseTimesync: Set to true to delay applying this control request until a
7394 * timesync boundary (requires Phoenix Pro and CANivore). This
7395 * eliminates the impact of nondeterministic network delays in
7396 * exchange for a larger but deterministic control latency.
7397 *
7398 * This requires setting the ControlTimesyncFreqHz config in
7399 * MotorOutputConfigs. Additionally, when this is enabled, the
7400 * UpdateFreqHz of this request should be set to 0 Hz.
7401 *
7402 * \param request Control object to request of the device
7403 * \returns Status Code of the request, 0 is OK
7404 */
7405 ctre::phoenix::StatusCode SetControl(const controls::DifferentialMotionMagicExpoDutyCycle &request) final;
7406
7407 /**
7408 * \brief Requests Motion Magic® to target a final position using an
7409 * exponential motion profile, and PID to a differential position
7410 * setpoint.
7411 *
7412 * \details Motion Magic® Expo produces a motion profile in real-time
7413 * while attempting to honor the Cruise Velocity (optional) and the
7414 * mechanism kV and kA, specified via the Motion Magic® configuration
7415 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA
7416 * configs are always in output units of Volts.
7417 *
7418 * Setting Cruise Velocity to 0 will allow the profile to run to the
7419 * max possible velocity based on Expo_kV. This control mode does not
7420 * use the Acceleration or Jerk configs.
7421 *
7422 * Target position can be changed on-the-fly and Motion Magic® will do
7423 * its best to adjust the profile. This control mode is
7424 * voltage-based, so relevant closed-loop gains will use Volts for the
7425 * numerator.
7426 *
7427 * - DifferentialMotionMagicExpoVoltage Parameters:
7428 * - AveragePosition: Average position to drive toward in rotations.
7429 * - DifferentialPosition: Differential position to drive toward in rotations.
7430 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
7431 * which increases peak power by ~15% on supported devices (see
7432 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
7433 * commutation.
7434 *
7435 * FOC improves motor performance by leveraging torque (current)
7436 * control. However, this may be inconvenient for applications
7437 * that require specifying duty cycle or voltage.
7438 * CTR-Electronics has developed a hybrid method that combines
7439 * the performances gains of FOC while still allowing
7440 * applications to provide duty cycle or voltage demand. This
7441 * not to be confused with simple sinusoidal control or phase
7442 * voltage control which lacks the performance gains.
7443 * - AverageSlot: Select which gains are applied to the average controller by
7444 * selecting the slot. Use the configuration api to set the
7445 * gain values for the selected slot before enabling this
7446 * feature. Slot must be within [0,2].
7447 * - DifferentialSlot: Select which gains are applied to the differential
7448 * controller by selecting the slot. Use the
7449 * configuration api to set the gain values for the
7450 * selected slot before enabling this feature. Slot must
7451 * be within [0,2].
7452 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
7453 * output is zero (or within deadband). Set to
7454 * false to use the NeutralMode configuration
7455 * setting (default). This flag exists to provide
7456 * the fundamental behavior of this control when
7457 * output is zero, which is to provide 0V to the
7458 * motor.
7459 * - LimitForwardMotion: Set to true to force forward limiting. This allows
7460 * users to use other limit switch sensors connected to
7461 * robot controller. This also allows use of active
7462 * sensors that require external power.
7463 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
7464 * users to use other limit switch sensors connected to
7465 * robot controller. This also allows use of active
7466 * sensors that require external power.
7467 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
7468 * the LimitForwardMotion and LimitReverseMotion
7469 * parameters, instead allowing motion.
7470 *
7471 * This can be useful on mechanisms such as an
7472 * intake/feeder, where a limit switch stops motion
7473 * while intaking but should be ignored when feeding
7474 * to a shooter.
7475 *
7476 * The hardware limit faults and Forward/ReverseLimit
7477 * signals will still report the values of the limit
7478 * switches regardless of this parameter.
7479 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
7480 * allowing motion.
7481 *
7482 * This can be useful when calibrating the zero point
7483 * of a mechanism such as an elevator.
7484 *
7485 * The software limit faults will still report the
7486 * values of the software limits regardless of this
7487 * parameter.
7488 * - UseTimesync: Set to true to delay applying this control request until a
7489 * timesync boundary (requires Phoenix Pro and CANivore). This
7490 * eliminates the impact of nondeterministic network delays in
7491 * exchange for a larger but deterministic control latency.
7492 *
7493 * This requires setting the ControlTimesyncFreqHz config in
7494 * MotorOutputConfigs. Additionally, when this is enabled, the
7495 * UpdateFreqHz of this request should be set to 0 Hz.
7496 *
7497 * \param request Control object to request of the device
7498 * \returns Status Code of the request, 0 is OK
7499 */
7500 ctre::phoenix::StatusCode SetControl(const controls::DifferentialMotionMagicExpoVoltage &request) final;
7501
7502 /**
7503 * \brief Requests Motion Magic® to target a final velocity using a
7504 * motion profile, and PID to a differential position setpoint. This
7505 * allows smooth transitions between velocity set points.
7506 *
7507 * \details Motion Magic® Velocity produces a motion profile in
7508 * real-time while attempting to honor the specified Acceleration and
7509 * (optional) Jerk. This control mode does not use the
7510 * CruiseVelocity, Expo_kV, or Expo_kA configs.
7511 *
7512 * Acceleration and jerk are specified in the Motion Magic® persistent
7513 * configuration values. If Jerk is set to zero, Motion Magic® will
7514 * produce a trapezoidal acceleration profile.
7515 *
7516 * Target velocity can also be changed on-the-fly and Motion Magic®
7517 * will do its best to adjust the profile. This control mode is duty
7518 * cycle based, so relevant closed-loop gains will use fractional duty
7519 * cycle for the numerator: +1.0 represents full forward output.
7520 *
7521 * - DifferentialMotionMagicVelocityDutyCycle Parameters:
7522 * - AverageVelocity: Average velocity to drive toward in rotations per
7523 * second.
7524 * - DifferentialPosition: Differential position to drive toward in rotations.
7525 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
7526 * which increases peak power by ~15% on supported devices (see
7527 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
7528 * commutation.
7529 *
7530 * FOC improves motor performance by leveraging torque (current)
7531 * control. However, this may be inconvenient for applications
7532 * that require specifying duty cycle or voltage.
7533 * CTR-Electronics has developed a hybrid method that combines
7534 * the performances gains of FOC while still allowing
7535 * applications to provide duty cycle or voltage demand. This
7536 * not to be confused with simple sinusoidal control or phase
7537 * voltage control which lacks the performance gains.
7538 * - AverageSlot: Select which gains are applied to the average controller by
7539 * selecting the slot. Use the configuration api to set the
7540 * gain values for the selected slot before enabling this
7541 * feature. Slot must be within [0,2].
7542 * - DifferentialSlot: Select which gains are applied to the differential
7543 * controller by selecting the slot. Use the
7544 * configuration api to set the gain values for the
7545 * selected slot before enabling this feature. Slot must
7546 * be within [0,2].
7547 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
7548 * output is zero (or within deadband). Set to
7549 * false to use the NeutralMode configuration
7550 * setting (default). This flag exists to provide
7551 * the fundamental behavior of this control when
7552 * output is zero, which is to provide 0V to the
7553 * motor.
7554 * - LimitForwardMotion: Set to true to force forward limiting. This allows
7555 * users to use other limit switch sensors connected to
7556 * robot controller. This also allows use of active
7557 * sensors that require external power.
7558 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
7559 * users to use other limit switch sensors connected to
7560 * robot controller. This also allows use of active
7561 * sensors that require external power.
7562 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
7563 * the LimitForwardMotion and LimitReverseMotion
7564 * parameters, instead allowing motion.
7565 *
7566 * This can be useful on mechanisms such as an
7567 * intake/feeder, where a limit switch stops motion
7568 * while intaking but should be ignored when feeding
7569 * to a shooter.
7570 *
7571 * The hardware limit faults and Forward/ReverseLimit
7572 * signals will still report the values of the limit
7573 * switches regardless of this parameter.
7574 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
7575 * allowing motion.
7576 *
7577 * This can be useful when calibrating the zero point
7578 * of a mechanism such as an elevator.
7579 *
7580 * The software limit faults will still report the
7581 * values of the software limits regardless of this
7582 * parameter.
7583 * - UseTimesync: Set to true to delay applying this control request until a
7584 * timesync boundary (requires Phoenix Pro and CANivore). This
7585 * eliminates the impact of nondeterministic network delays in
7586 * exchange for a larger but deterministic control latency.
7587 *
7588 * This requires setting the ControlTimesyncFreqHz config in
7589 * MotorOutputConfigs. Additionally, when this is enabled, the
7590 * UpdateFreqHz of this request should be set to 0 Hz.
7591 *
7592 * \param request Control object to request of the device
7593 * \returns Status Code of the request, 0 is OK
7594 */
7595 ctre::phoenix::StatusCode SetControl(const controls::DifferentialMotionMagicVelocityDutyCycle &request) final;
7596
7597 /**
7598 * \brief Requests Motion Magic® to target a final velocity using a
7599 * motion profile, and PID to a differential position setpoint. This
7600 * allows smooth transitions between velocity set points.
7601 *
7602 * \details Motion Magic® Velocity produces a motion profile in
7603 * real-time while attempting to honor the specified Acceleration and
7604 * (optional) Jerk. This control mode does not use the
7605 * CruiseVelocity, Expo_kV, or Expo_kA configs.
7606 *
7607 * Acceleration and jerk are specified in the Motion Magic® persistent
7608 * configuration values. If Jerk is set to zero, Motion Magic® will
7609 * produce a trapezoidal acceleration profile.
7610 *
7611 * Target velocity can also be changed on-the-fly and Motion Magic®
7612 * will do its best to adjust the profile. This control mode is
7613 * voltage-based, so relevant closed-loop gains will use Volts for the
7614 * numerator.
7615 *
7616 * - DifferentialMotionMagicVelocityVoltage Parameters:
7617 * - AverageVelocity: Average velocity to drive toward in rotations per
7618 * second.
7619 * - DifferentialPosition: Differential position to drive toward in rotations.
7620 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
7621 * which increases peak power by ~15% on supported devices (see
7622 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
7623 * commutation.
7624 *
7625 * FOC improves motor performance by leveraging torque (current)
7626 * control. However, this may be inconvenient for applications
7627 * that require specifying duty cycle or voltage.
7628 * CTR-Electronics has developed a hybrid method that combines
7629 * the performances gains of FOC while still allowing
7630 * applications to provide duty cycle or voltage demand. This
7631 * not to be confused with simple sinusoidal control or phase
7632 * voltage control which lacks the performance gains.
7633 * - AverageSlot: Select which gains are applied to the average controller by
7634 * selecting the slot. Use the configuration api to set the
7635 * gain values for the selected slot before enabling this
7636 * feature. Slot must be within [0,2].
7637 * - DifferentialSlot: Select which gains are applied to the differential
7638 * controller by selecting the slot. Use the
7639 * configuration api to set the gain values for the
7640 * selected slot before enabling this feature. Slot must
7641 * be within [0,2].
7642 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
7643 * output is zero (or within deadband). Set to
7644 * false to use the NeutralMode configuration
7645 * setting (default). This flag exists to provide
7646 * the fundamental behavior of this control when
7647 * output is zero, which is to provide 0V to the
7648 * motor.
7649 * - LimitForwardMotion: Set to true to force forward limiting. This allows
7650 * users to use other limit switch sensors connected to
7651 * robot controller. This also allows use of active
7652 * sensors that require external power.
7653 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
7654 * users to use other limit switch sensors connected to
7655 * robot controller. This also allows use of active
7656 * sensors that require external power.
7657 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
7658 * the LimitForwardMotion and LimitReverseMotion
7659 * parameters, instead allowing motion.
7660 *
7661 * This can be useful on mechanisms such as an
7662 * intake/feeder, where a limit switch stops motion
7663 * while intaking but should be ignored when feeding
7664 * to a shooter.
7665 *
7666 * The hardware limit faults and Forward/ReverseLimit
7667 * signals will still report the values of the limit
7668 * switches regardless of this parameter.
7669 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
7670 * allowing motion.
7671 *
7672 * This can be useful when calibrating the zero point
7673 * of a mechanism such as an elevator.
7674 *
7675 * The software limit faults will still report the
7676 * values of the software limits regardless of this
7677 * parameter.
7678 * - UseTimesync: Set to true to delay applying this control request until a
7679 * timesync boundary (requires Phoenix Pro and CANivore). This
7680 * eliminates the impact of nondeterministic network delays in
7681 * exchange for a larger but deterministic control latency.
7682 *
7683 * This requires setting the ControlTimesyncFreqHz config in
7684 * MotorOutputConfigs. Additionally, when this is enabled, the
7685 * UpdateFreqHz of this request should be set to 0 Hz.
7686 *
7687 * \param request Control object to request of the device
7688 * \returns Status Code of the request, 0 is OK
7689 */
7690 ctre::phoenix::StatusCode SetControl(const controls::DifferentialMotionMagicVelocityVoltage &request) final;
7691
7692 /**
7693 * \brief Follow the motor output of another Talon.
7694 *
7695 * \details If Talon is in torque control, the torque is copied -
7696 * which will increase the total torque applied. If Talon is in duty
7697 * cycle output control, the duty cycle is matched. If Talon is in
7698 * voltage output control, the motor voltage is matched. Motor
7699 * direction either matches the leader's configured direction or
7700 * opposes it based on the MotorAlignment.
7701 *
7702 * The leader must enable the status signal corresponding to its
7703 * control output type (DutyCycle, MotorVoltage, TorqueCurrent). The
7704 * update rate of the status signal determines the update rate of the
7705 * follower's output and should be no slower than 20 Hz.
7706 *
7707 * - Follower Parameters:
7708 * - LeaderID: Device ID of the leader to follow.
7709 * - MotorAlignment: Set to Aligned for motor invert to match the leader's
7710 * configured Invert - which is typical when leader and
7711 * follower are mechanically linked and spin in the same
7712 * direction. Set to Opposed for motor invert to oppose the
7713 * leader's configured Invert - this is typical where the
7714 * leader and follower mechanically spin in opposite
7715 * directions.
7716 *
7717 * \param request Control object to request of the device
7718 * \returns Status Code of the request, 0 is OK
7719 */
7720 ctre::phoenix::StatusCode SetControl(const controls::Follower &request) final;
7721
7722 /**
7723 * \brief Follow the motor output of another Talon while ignoring the
7724 * leader's invert setting.
7725 *
7726 * \details If Talon is in torque control, the torque is copied -
7727 * which will increase the total torque applied. If Talon is in duty
7728 * cycle output control, the duty cycle is matched. If Talon is in
7729 * voltage output control, the motor voltage is matched. Motor
7730 * direction is strictly determined by the configured invert and not
7731 * the leader. If you want motor direction to match or oppose the
7732 * leader, use Follower instead.
7733 *
7734 * The leader must enable the status signal corresponding to its
7735 * control output type (DutyCycle, MotorVoltage, TorqueCurrent). The
7736 * update rate of the status signal determines the update rate of the
7737 * follower's output and should be no slower than 20 Hz.
7738 *
7739 * - StrictFollower Parameters:
7740 * - LeaderID: Device ID of the leader to follow.
7741 *
7742 * \param request Control object to request of the device
7743 * \returns Status Code of the request, 0 is OK
7744 */
7745 ctre::phoenix::StatusCode SetControl(const controls::StrictFollower &request) final;
7746
7747 /**
7748 * \brief Follow the differential motor output of another Talon.
7749 *
7750 * \details If Talon is in torque control, the differential torque is
7751 * copied - which will increase the total torque applied. If Talon is
7752 * in duty cycle output control, the differential duty cycle is
7753 * matched. If Talon is in voltage output control, the differential
7754 * motor voltage is matched. Motor direction either matches leader's
7755 * configured direction or opposes it based on the MotorAlignment.
7756 *
7757 * The leader must enable its DifferentialOutput status signal. The
7758 * update rate of the status signal determines the update rate of the
7759 * follower's output and should be no slower than 20 Hz.
7760 *
7761 * - DifferentialFollower Parameters:
7762 * - LeaderID: Device ID of the differential leader to follow.
7763 * - MotorAlignment: Set to Aligned for motor invert to match the leader's
7764 * configured Invert - which is typical when leader and
7765 * follower are mechanically linked and spin in the same
7766 * direction. Set to Opposed for motor invert to oppose the
7767 * leader's configured Invert - this is typical where the
7768 * leader and follower mechanically spin in opposite
7769 * directions.
7770 *
7771 * \param request Control object to request of the device
7772 * \returns Status Code of the request, 0 is OK
7773 */
7774 ctre::phoenix::StatusCode SetControl(const controls::DifferentialFollower &request) final;
7775
7776 /**
7777 * \brief Follow the differential motor output of another Talon while
7778 * ignoring the leader's invert setting.
7779 *
7780 * \details If Talon is in torque control, the differential torque is
7781 * copied - which will increase the total torque applied. If Talon is
7782 * in duty cycle output control, the differential duty cycle is
7783 * matched. If Talon is in voltage output control, the differential
7784 * motor voltage is matched. Motor direction is strictly determined by
7785 * the configured invert and not the leader. If you want motor
7786 * direction to match or oppose the leader, use DifferentialFollower
7787 * instead.
7788 *
7789 * The leader must enable its DifferentialOutput status signal. The
7790 * update rate of the status signal determines the update rate of the
7791 * follower's output and should be no slower than 20 Hz.
7792 *
7793 * - DifferentialStrictFollower Parameters:
7794 * - LeaderID: Device ID of the differential leader to follow.
7795 *
7796 * \param request Control object to request of the device
7797 * \returns Status Code of the request, 0 is OK
7798 */
7799 ctre::phoenix::StatusCode SetControl(const controls::DifferentialStrictFollower &request) final;
7800
7801 /**
7802 * \brief Request neutral output of actuator. The applied brake type
7803 * is determined by the NeutralMode configuration.
7804 *
7805 * - NeutralOut Parameters:
7806 * - UseTimesync: Set to true to delay applying this control request until a
7807 * timesync boundary (requires Phoenix Pro and CANivore). This
7808 * eliminates the impact of nondeterministic network delays in
7809 * exchange for a larger but deterministic control latency.
7810 *
7811 * This requires setting the ControlTimesyncFreqHz config in
7812 * MotorOutputConfigs. Additionally, when this is enabled, the
7813 * UpdateFreqHz of this request should be set to 0 Hz.
7814 *
7815 * \param request Control object to request of the device
7816 * \returns Status Code of the request, 0 is OK
7817 */
7818 ctre::phoenix::StatusCode SetControl(const controls::NeutralOut &request) final;
7819
7820 /**
7821 * \brief Request coast neutral output of actuator. The bridge is
7822 * disabled and the rotor is allowed to coast.
7823 *
7824 * - CoastOut Parameters:
7825 * - UseTimesync: Set to true to delay applying this control request until a
7826 * timesync boundary (requires Phoenix Pro and CANivore). This
7827 * eliminates the impact of nondeterministic network delays in
7828 * exchange for a larger but deterministic control latency.
7829 *
7830 * This requires setting the ControlTimesyncFreqHz config in
7831 * MotorOutputConfigs. Additionally, when this is enabled, the
7832 * UpdateFreqHz of this request should be set to 0 Hz.
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::CoastOut &request) final;
7838
7839 /**
7840 * \brief Applies full neutral-brake by shorting motor leads together.
7841 *
7842 * - StaticBrake Parameters:
7843 * - UseTimesync: Set to true to delay applying this control request until a
7844 * timesync boundary (requires Phoenix Pro and CANivore). This
7845 * eliminates the impact of nondeterministic network delays in
7846 * exchange for a larger but deterministic control latency.
7847 *
7848 * This requires setting the ControlTimesyncFreqHz config in
7849 * MotorOutputConfigs. Additionally, when this is enabled, the
7850 * UpdateFreqHz of this request should be set to 0 Hz.
7851 *
7852 * \param request Control object to request of the device
7853 * \returns Status Code of the request, 0 is OK
7854 */
7855 ctre::phoenix::StatusCode SetControl(const controls::StaticBrake &request) final;
7856
7857 /**
7858 * \brief Requests Motion Magic® to target a final velocity using a
7859 * motion profile. This allows smooth transitions between velocity
7860 * set points. Users can optionally provide a duty cycle feedforward.
7861 *
7862 * \details Motion Magic® Velocity produces a motion profile in
7863 * real-time while attempting to honor the specified Acceleration and
7864 * (optional) Jerk. This control mode does not use the
7865 * CruiseVelocity, Expo_kV, or Expo_kA configs.
7866 *
7867 * If the specified acceleration is zero, the Acceleration under
7868 * Motion Magic® configuration parameter is used instead. This allows
7869 * for runtime adjustment of acceleration for advanced users. Jerk is
7870 * also specified in the Motion Magic® persistent configuration
7871 * values. If Jerk is set to zero, Motion Magic® will produce a
7872 * trapezoidal acceleration profile.
7873 *
7874 * Target velocity can also be changed on-the-fly and Motion Magic®
7875 * will do its best to adjust the profile. This control mode is duty
7876 * cycle based, so relevant closed-loop gains will use fractional duty
7877 * cycle for the numerator: +1.0 represents full forward output.
7878 *
7879 * - MotionMagicVelocityDutyCycle Parameters:
7880 * - Velocity: Target velocity to drive toward in rotations per second. This
7881 * can be changed on-the fly.
7882 * - Acceleration: This is the absolute Acceleration to use generating the
7883 * profile. If this parameter is zero, the Acceleration
7884 * persistent configuration parameter is used instead.
7885 * Acceleration is in rotations per second squared. If
7886 * nonzero, the signage does not matter as the absolute value
7887 * is used.
7888 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
7889 * which increases peak power by ~15% on supported devices (see
7890 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
7891 * commutation.
7892 *
7893 * FOC improves motor performance by leveraging torque (current)
7894 * control. However, this may be inconvenient for applications
7895 * that require specifying duty cycle or voltage.
7896 * CTR-Electronics has developed a hybrid method that combines
7897 * the performances gains of FOC while still allowing
7898 * applications to provide duty cycle or voltage demand. This
7899 * not to be confused with simple sinusoidal control or phase
7900 * voltage control which lacks the performance gains.
7901 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
7902 * This is added to the output of the onboard feedforward
7903 * terms.
7904 * - Slot: Select which gains are applied by selecting the slot. Use the
7905 * configuration api to set the gain values for the selected slot
7906 * before enabling this feature. Slot must be within [0,2].
7907 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
7908 * output is zero (or within deadband). Set to
7909 * false to use the NeutralMode configuration
7910 * setting (default). This flag exists to provide
7911 * the fundamental behavior of this control when
7912 * output is zero, which is to provide 0V to the
7913 * motor.
7914 * - LimitForwardMotion: Set to true to force forward limiting. This allows
7915 * users to use other limit switch sensors connected to
7916 * robot controller. This also allows use of active
7917 * sensors that require external power.
7918 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
7919 * users to use other limit switch sensors connected to
7920 * robot controller. This also allows use of active
7921 * sensors that require external power.
7922 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
7923 * the LimitForwardMotion and LimitReverseMotion
7924 * parameters, instead allowing motion.
7925 *
7926 * This can be useful on mechanisms such as an
7927 * intake/feeder, where a limit switch stops motion
7928 * while intaking but should be ignored when feeding
7929 * to a shooter.
7930 *
7931 * The hardware limit faults and Forward/ReverseLimit
7932 * signals will still report the values of the limit
7933 * switches regardless of this parameter.
7934 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
7935 * allowing motion.
7936 *
7937 * This can be useful when calibrating the zero point
7938 * of a mechanism such as an elevator.
7939 *
7940 * The software limit faults will still report the
7941 * values of the software limits regardless of this
7942 * parameter.
7943 * - UseTimesync: Set to true to delay applying this control request until a
7944 * timesync boundary (requires Phoenix Pro and CANivore). This
7945 * eliminates the impact of nondeterministic network delays in
7946 * exchange for a larger but deterministic control latency.
7947 *
7948 * This requires setting the ControlTimesyncFreqHz config in
7949 * MotorOutputConfigs. Additionally, when this is enabled, the
7950 * UpdateFreqHz of this request should be set to 0 Hz.
7951 *
7952 * \param request Control object to request of the device
7953 * \returns Status Code of the request, 0 is OK
7954 */
7955 ctre::phoenix::StatusCode SetControl(const controls::MotionMagicVelocityDutyCycle &request) final;
7956
7957 /**
7958 * \brief Requests Motion Magic® to target a final velocity using a
7959 * motion profile. This allows smooth transitions between velocity
7960 * set points. Users can optionally provide a voltage feedforward.
7961 *
7962 * \details Motion Magic® Velocity produces a motion profile in
7963 * real-time while attempting to honor the specified Acceleration and
7964 * (optional) Jerk. This control mode does not use the
7965 * CruiseVelocity, Expo_kV, or Expo_kA configs.
7966 *
7967 * If the specified acceleration is zero, the Acceleration under
7968 * Motion Magic® configuration parameter is used instead. This allows
7969 * for runtime adjustment of acceleration for advanced users. Jerk is
7970 * also specified in the Motion Magic® persistent configuration
7971 * values. If Jerk is set to zero, Motion Magic® will produce a
7972 * trapezoidal acceleration profile.
7973 *
7974 * Target velocity can also be changed on-the-fly and Motion Magic®
7975 * will do its best to adjust the profile. This control mode is
7976 * voltage-based, so relevant closed-loop gains will use Volts for the
7977 * numerator.
7978 *
7979 * - MotionMagicVelocityVoltage Parameters:
7980 * - Velocity: Target velocity to drive toward in rotations per second. This
7981 * can be changed on-the fly.
7982 * - Acceleration: This is the absolute Acceleration to use generating the
7983 * profile. If this parameter is zero, the Acceleration
7984 * persistent configuration parameter is used instead.
7985 * Acceleration is in rotations per second squared. If
7986 * nonzero, the signage does not matter as the absolute value
7987 * is used.
7988 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
7989 * which increases peak power by ~15% on supported devices (see
7990 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
7991 * commutation.
7992 *
7993 * FOC improves motor performance by leveraging torque (current)
7994 * control. However, this may be inconvenient for applications
7995 * that require specifying duty cycle or voltage.
7996 * CTR-Electronics has developed a hybrid method that combines
7997 * the performances gains of FOC while still allowing
7998 * applications to provide duty cycle or voltage demand. This
7999 * not to be confused with simple sinusoidal control or phase
8000 * voltage control which lacks the performance gains.
8001 * - FeedForward: Feedforward to apply in volts. This is added to the output
8002 * of the onboard feedforward terms.
8003 * - Slot: Select which gains are applied by selecting the slot. Use the
8004 * configuration api to set the gain values for the selected slot
8005 * before enabling this feature. Slot must be within [0,2].
8006 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8007 * output is zero (or within deadband). Set to
8008 * false to use the NeutralMode configuration
8009 * setting (default). This flag exists to provide
8010 * the fundamental behavior of this control when
8011 * output is zero, which is to provide 0V to the
8012 * motor.
8013 * - LimitForwardMotion: Set to true to force forward limiting. This allows
8014 * users to use other limit switch sensors connected to
8015 * robot controller. This also allows use of active
8016 * sensors that require external power.
8017 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8018 * users to use other limit switch sensors connected to
8019 * robot controller. This also allows use of active
8020 * sensors that require external power.
8021 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8022 * the LimitForwardMotion and LimitReverseMotion
8023 * parameters, instead allowing motion.
8024 *
8025 * This can be useful on mechanisms such as an
8026 * intake/feeder, where a limit switch stops motion
8027 * while intaking but should be ignored when feeding
8028 * to a shooter.
8029 *
8030 * The hardware limit faults and Forward/ReverseLimit
8031 * signals will still report the values of the limit
8032 * switches regardless of this parameter.
8033 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8034 * allowing motion.
8035 *
8036 * This can be useful when calibrating the zero point
8037 * of a mechanism such as an elevator.
8038 *
8039 * The software limit faults will still report the
8040 * values of the software limits regardless of this
8041 * parameter.
8042 * - UseTimesync: Set to true to delay applying this control request until a
8043 * timesync boundary (requires Phoenix Pro and CANivore). This
8044 * eliminates the impact of nondeterministic network delays in
8045 * exchange for a larger but deterministic control latency.
8046 *
8047 * This requires setting the ControlTimesyncFreqHz config in
8048 * MotorOutputConfigs. Additionally, when this is enabled, the
8049 * UpdateFreqHz of this request should be set to 0 Hz.
8050 *
8051 * \param request Control object to request of the device
8052 * \returns Status Code of the request, 0 is OK
8053 */
8054 ctre::phoenix::StatusCode SetControl(const controls::MotionMagicVelocityVoltage &request) final;
8055
8056 /**
8057 * \brief Requests Motion Magic® to target a final position using an
8058 * exponential motion profile. Users can optionally provide a duty
8059 * cycle feedforward.
8060 *
8061 * \details Motion Magic® Expo produces a motion profile in real-time
8062 * while attempting to honor the Cruise Velocity (optional) and the
8063 * mechanism kV and kA, specified via the Motion Magic® configuration
8064 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA
8065 * configs are always in output units of Volts.
8066 *
8067 * Setting Cruise Velocity to 0 will allow the profile to run to the
8068 * max possible velocity based on Expo_kV. This control mode does not
8069 * use the Acceleration or Jerk configs.
8070 *
8071 * Target position can be changed on-the-fly and Motion Magic® will do
8072 * its best to adjust the profile. This control mode is duty cycle
8073 * based, so relevant closed-loop gains will use fractional duty cycle
8074 * for the numerator: +1.0 represents full forward output.
8075 *
8076 * - MotionMagicExpoDutyCycle Parameters:
8077 * - Position: Position to drive toward in rotations.
8078 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8079 * which increases peak power by ~15% on supported devices (see
8080 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8081 * commutation.
8082 *
8083 * FOC improves motor performance by leveraging torque (current)
8084 * control. However, this may be inconvenient for applications
8085 * that require specifying duty cycle or voltage.
8086 * CTR-Electronics has developed a hybrid method that combines
8087 * the performances gains of FOC while still allowing
8088 * applications to provide duty cycle or voltage demand. This
8089 * not to be confused with simple sinusoidal control or phase
8090 * voltage control which lacks the performance gains.
8091 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
8092 * This is added to the output of the onboard feedforward
8093 * terms.
8094 * - Slot: Select which gains are applied by selecting the slot. Use the
8095 * configuration api to set the gain values for the selected slot
8096 * before enabling this feature. Slot must be within [0,2].
8097 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8098 * output is zero (or within deadband). Set to
8099 * false to use the NeutralMode configuration
8100 * setting (default). This flag exists to provide
8101 * the fundamental behavior of this control when
8102 * output is zero, which is to provide 0V to the
8103 * motor.
8104 * - LimitForwardMotion: Set to true to force forward limiting. This allows
8105 * users to use other limit switch sensors connected to
8106 * robot controller. This also allows use of active
8107 * sensors that require external power.
8108 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8109 * users to use other limit switch sensors connected to
8110 * robot controller. This also allows use of active
8111 * sensors that require external power.
8112 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8113 * the LimitForwardMotion and LimitReverseMotion
8114 * parameters, instead allowing motion.
8115 *
8116 * This can be useful on mechanisms such as an
8117 * intake/feeder, where a limit switch stops motion
8118 * while intaking but should be ignored when feeding
8119 * to a shooter.
8120 *
8121 * The hardware limit faults and Forward/ReverseLimit
8122 * signals will still report the values of the limit
8123 * switches regardless of this parameter.
8124 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8125 * allowing motion.
8126 *
8127 * This can be useful when calibrating the zero point
8128 * of a mechanism such as an elevator.
8129 *
8130 * The software limit faults will still report the
8131 * values of the software limits regardless of this
8132 * parameter.
8133 * - UseTimesync: Set to true to delay applying this control request until a
8134 * timesync boundary (requires Phoenix Pro and CANivore). This
8135 * eliminates the impact of nondeterministic network delays in
8136 * exchange for a larger but deterministic control latency.
8137 *
8138 * This requires setting the ControlTimesyncFreqHz config in
8139 * MotorOutputConfigs. Additionally, when this is enabled, the
8140 * UpdateFreqHz of this request should be set to 0 Hz.
8141 *
8142 * \param request Control object to request of the device
8143 * \returns Status Code of the request, 0 is OK
8144 */
8145 ctre::phoenix::StatusCode SetControl(const controls::MotionMagicExpoDutyCycle &request) final;
8146
8147 /**
8148 * \brief Requests Motion Magic® to target a final position using an
8149 * exponential motion profile. Users can optionally provide a voltage
8150 * feedforward.
8151 *
8152 * \details Motion Magic® Expo produces a motion profile in real-time
8153 * while attempting to honor the Cruise Velocity (optional) and the
8154 * mechanism kV and kA, specified via the Motion Magic® configuration
8155 * values. Note that unlike the slot gains, the Expo_kV and Expo_kA
8156 * configs are always in output units of Volts.
8157 *
8158 * Setting Cruise Velocity to 0 will allow the profile to run to the
8159 * max possible velocity based on Expo_kV. This control mode does not
8160 * use the Acceleration or Jerk configs.
8161 *
8162 * Target position can be changed on-the-fly and Motion Magic® will do
8163 * its best to adjust the profile. This control mode is
8164 * voltage-based, so relevant closed-loop gains will use Volts for the
8165 * numerator.
8166 *
8167 * - MotionMagicExpoVoltage Parameters:
8168 * - Position: Position to drive toward in rotations.
8169 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8170 * which increases peak power by ~15% on supported devices (see
8171 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8172 * commutation.
8173 *
8174 * FOC improves motor performance by leveraging torque (current)
8175 * control. However, this may be inconvenient for applications
8176 * that require specifying duty cycle or voltage.
8177 * CTR-Electronics has developed a hybrid method that combines
8178 * the performances gains of FOC while still allowing
8179 * applications to provide duty cycle or voltage demand. This
8180 * not to be confused with simple sinusoidal control or phase
8181 * voltage control which lacks the performance gains.
8182 * - FeedForward: Feedforward to apply in volts. This is added to the output
8183 * of the onboard feedforward terms.
8184 * - Slot: Select which gains are applied by selecting the slot. Use the
8185 * configuration api to set the gain values for the selected slot
8186 * before enabling this feature. Slot must be within [0,2].
8187 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8188 * output is zero (or within deadband). Set to
8189 * false to use the NeutralMode configuration
8190 * setting (default). This flag exists to provide
8191 * the fundamental behavior of this control when
8192 * output is zero, which is to provide 0V to the
8193 * motor.
8194 * - LimitForwardMotion: Set to true to force forward limiting. This allows
8195 * users to use other limit switch sensors connected to
8196 * robot controller. This also allows use of active
8197 * sensors that require external power.
8198 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8199 * users to use other limit switch sensors connected to
8200 * robot controller. This also allows use of active
8201 * sensors that require external power.
8202 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8203 * the LimitForwardMotion and LimitReverseMotion
8204 * parameters, instead allowing motion.
8205 *
8206 * This can be useful on mechanisms such as an
8207 * intake/feeder, where a limit switch stops motion
8208 * while intaking but should be ignored when feeding
8209 * to a shooter.
8210 *
8211 * The hardware limit faults and Forward/ReverseLimit
8212 * signals will still report the values of the limit
8213 * switches regardless of this parameter.
8214 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8215 * allowing motion.
8216 *
8217 * This can be useful when calibrating the zero point
8218 * of a mechanism such as an elevator.
8219 *
8220 * The software limit faults will still report the
8221 * values of the software limits regardless of this
8222 * parameter.
8223 * - UseTimesync: Set to true to delay applying this control request until a
8224 * timesync boundary (requires Phoenix Pro and CANivore). This
8225 * eliminates the impact of nondeterministic network delays in
8226 * exchange for a larger but deterministic control latency.
8227 *
8228 * This requires setting the ControlTimesyncFreqHz config in
8229 * MotorOutputConfigs. Additionally, when this is enabled, the
8230 * UpdateFreqHz of this request should be set to 0 Hz.
8231 *
8232 * \param request Control object to request of the device
8233 * \returns Status Code of the request, 0 is OK
8234 */
8235 ctre::phoenix::StatusCode SetControl(const controls::MotionMagicExpoVoltage &request) final;
8236
8237 /**
8238 * \brief Requests Motion Magic® to target a final position using a
8239 * motion profile. This dynamic request allows runtime changes to
8240 * Cruise Velocity, Acceleration, and (optional) Jerk. Users can
8241 * optionally provide a duty cycle feedforward.
8242 *
8243 * \details Motion Magic® produces a motion profile in real-time while
8244 * attempting to honor the specified Cruise Velocity, Acceleration,
8245 * and (optional) Jerk. This control mode does not use the Expo_kV or
8246 * Expo_kA configs.
8247 *
8248 * Target position can be changed on-the-fly and Motion Magic® will do
8249 * its best to adjust the profile. This control mode is duty cycle
8250 * based, so relevant closed-loop gains will use fractional duty cycle
8251 * for the numerator: +1.0 represents full forward output.
8252 *
8253 * - DynamicMotionMagicDutyCycle Parameters:
8254 * - Position: Position to drive toward in rotations.
8255 * - Velocity: Cruise velocity for profiling. The signage does not matter as
8256 * the device will use the absolute value for profile generation.
8257 * - Acceleration: Acceleration for profiling. The signage does not matter as
8258 * the device will use the absolute value for profile
8259 * generation
8260 * - Jerk: Jerk for profiling. The signage does not matter as the device will
8261 * use the absolute value for profile generation.
8262 *
8263 * Jerk is optional; if this is set to zero, then Motion Magic® will
8264 * not apply a Jerk limit.
8265 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8266 * which increases peak power by ~15% on supported devices (see
8267 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8268 * commutation.
8269 *
8270 * FOC improves motor performance by leveraging torque (current)
8271 * control. However, this may be inconvenient for applications
8272 * that require specifying duty cycle or voltage.
8273 * CTR-Electronics has developed a hybrid method that combines
8274 * the performances gains of FOC while still allowing
8275 * applications to provide duty cycle or voltage demand. This
8276 * not to be confused with simple sinusoidal control or phase
8277 * voltage control which lacks the performance gains.
8278 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
8279 * This is added to the output of the onboard feedforward
8280 * terms.
8281 * - Slot: Select which gains are applied by selecting the slot. Use the
8282 * configuration api to set the gain values for the selected slot
8283 * before enabling this feature. Slot must be within [0,2].
8284 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8285 * output is zero (or within deadband). Set to
8286 * false to use the NeutralMode configuration
8287 * setting (default). This flag exists to provide
8288 * the fundamental behavior of this control when
8289 * output is zero, which is to provide 0V to the
8290 * motor.
8291 * - LimitForwardMotion: Set to true to force forward limiting. This allows
8292 * users to use other limit switch sensors connected to
8293 * robot controller. This also allows use of active
8294 * sensors that require external power.
8295 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8296 * users to use other limit switch sensors connected to
8297 * robot controller. This also allows use of active
8298 * sensors that require external power.
8299 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8300 * the LimitForwardMotion and LimitReverseMotion
8301 * parameters, instead allowing motion.
8302 *
8303 * This can be useful on mechanisms such as an
8304 * intake/feeder, where a limit switch stops motion
8305 * while intaking but should be ignored when feeding
8306 * to a shooter.
8307 *
8308 * The hardware limit faults and Forward/ReverseLimit
8309 * signals will still report the values of the limit
8310 * switches regardless of this parameter.
8311 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8312 * allowing motion.
8313 *
8314 * This can be useful when calibrating the zero point
8315 * of a mechanism such as an elevator.
8316 *
8317 * The software limit faults will still report the
8318 * values of the software limits regardless of this
8319 * parameter.
8320 * - UseTimesync: Set to true to delay applying this control request until a
8321 * timesync boundary (requires Phoenix Pro and CANivore). This
8322 * eliminates the impact of nondeterministic network delays in
8323 * exchange for a larger but deterministic control latency.
8324 *
8325 * This requires setting the ControlTimesyncFreqHz config in
8326 * MotorOutputConfigs. Additionally, when this is enabled, the
8327 * UpdateFreqHz of this request should be set to 0 Hz.
8328 *
8329 * \param request Control object to request of the device
8330 * \returns Status Code of the request, 0 is OK
8331 */
8332 ctre::phoenix::StatusCode SetControl(const controls::DynamicMotionMagicDutyCycle &request) final;
8333
8334 /**
8335 * \brief Requests Motion Magic® to target a final position using a
8336 * motion profile. This dynamic request allows runtime changes to
8337 * Cruise Velocity, Acceleration, and (optional) Jerk. Users can
8338 * optionally provide a voltage feedforward.
8339 *
8340 * \details Motion Magic® produces a motion profile in real-time while
8341 * attempting to honor the specified Cruise Velocity, Acceleration,
8342 * and (optional) Jerk. This control mode does not use the Expo_kV or
8343 * Expo_kA configs.
8344 *
8345 * Target position can be changed on-the-fly and Motion Magic® will do
8346 * its best to adjust the profile. This control mode is
8347 * voltage-based, so relevant closed-loop gains will use Volts for the
8348 * numerator.
8349 *
8350 * - DynamicMotionMagicVoltage Parameters:
8351 * - Position: Position to drive toward in rotations.
8352 * - Velocity: Cruise velocity for profiling. The signage does not matter as
8353 * the device will use the absolute value for profile generation.
8354 * - Acceleration: Acceleration for profiling. The signage does not matter as
8355 * the device will use the absolute value for profile
8356 * generation.
8357 * - Jerk: Jerk for profiling. The signage does not matter as the device will
8358 * use the absolute value for profile generation.
8359 *
8360 * Jerk is optional; if this is set to zero, then Motion Magic® will
8361 * not apply a Jerk limit.
8362 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8363 * which increases peak power by ~15% on supported devices (see
8364 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8365 * commutation.
8366 *
8367 * FOC improves motor performance by leveraging torque (current)
8368 * control. However, this may be inconvenient for applications
8369 * that require specifying duty cycle or voltage.
8370 * CTR-Electronics has developed a hybrid method that combines
8371 * the performances gains of FOC while still allowing
8372 * applications to provide duty cycle or voltage demand. This
8373 * not to be confused with simple sinusoidal control or phase
8374 * voltage control which lacks the performance gains.
8375 * - FeedForward: Feedforward to apply in volts. This is added to the output
8376 * of the onboard feedforward terms.
8377 * - Slot: Select which gains are applied by selecting the slot. Use the
8378 * configuration api to set the gain values for the selected slot
8379 * before enabling this feature. Slot must be within [0,2].
8380 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8381 * output is zero (or within deadband). Set to
8382 * false to use the NeutralMode configuration
8383 * setting (default). This flag exists to provide
8384 * the fundamental behavior of this control when
8385 * output is zero, which is to provide 0V to the
8386 * motor.
8387 * - LimitForwardMotion: Set to true to force forward limiting. This allows
8388 * users to use other limit switch sensors connected to
8389 * robot controller. This also allows use of active
8390 * sensors that require external power.
8391 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8392 * users to use other limit switch sensors connected to
8393 * robot controller. This also allows use of active
8394 * sensors that require external power.
8395 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8396 * the LimitForwardMotion and LimitReverseMotion
8397 * parameters, instead allowing motion.
8398 *
8399 * This can be useful on mechanisms such as an
8400 * intake/feeder, where a limit switch stops motion
8401 * while intaking but should be ignored when feeding
8402 * to a shooter.
8403 *
8404 * The hardware limit faults and Forward/ReverseLimit
8405 * signals will still report the values of the limit
8406 * switches regardless of this parameter.
8407 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8408 * allowing motion.
8409 *
8410 * This can be useful when calibrating the zero point
8411 * of a mechanism such as an elevator.
8412 *
8413 * The software limit faults will still report the
8414 * values of the software limits regardless of this
8415 * parameter.
8416 * - UseTimesync: Set to true to delay applying this control request until a
8417 * timesync boundary (requires Phoenix Pro and CANivore). This
8418 * eliminates the impact of nondeterministic network delays in
8419 * exchange for a larger but deterministic control latency.
8420 *
8421 * This requires setting the ControlTimesyncFreqHz config in
8422 * MotorOutputConfigs. Additionally, when this is enabled, the
8423 * UpdateFreqHz of this request should be set to 0 Hz.
8424 *
8425 * \param request Control object to request of the device
8426 * \returns Status Code of the request, 0 is OK
8427 */
8428 ctre::phoenix::StatusCode SetControl(const controls::DynamicMotionMagicVoltage &request) final;
8429
8430 /**
8431 * \brief Requests Motion Magic® Expo to target a final position using
8432 * an exponential motion profile. This dynamic request allows runtime
8433 * changes to the profile kV, kA, and (optional) Cruise Velocity.
8434 * Users can optionally provide a duty cycle feedforward.
8435 *
8436 * \details Motion Magic® Expo produces a motion profile in real-time
8437 * while attempting to honor the specified Cruise Velocity (optional)
8438 * and the mechanism kV and kA. Note that unlike the slot gains, the
8439 * Expo_kV and Expo_kA parameters are always in output units of Volts.
8440 *
8441 * Setting the Cruise Velocity to 0 will allow the profile to run to
8442 * the max possible velocity based on Expo_kV. This control mode does
8443 * not use the Acceleration or Jerk configs.
8444 *
8445 * Target position can be changed on-the-fly and Motion Magic® will do
8446 * its best to adjust the profile. This control mode is duty cycle
8447 * based, so relevant closed-loop gains will use fractional duty cycle
8448 * for the numerator: +1.0 represents full forward output.
8449 *
8450 * - DynamicMotionMagicExpoDutyCycle Parameters:
8451 * - Position: Position to drive toward in rotations.
8452 * - kV: Mechanism kV for profiling. Unlike the kV slot gain, this is always
8453 * in units of V/rps.
8454 *
8455 * This represents the amount of voltage necessary to hold a velocity.
8456 * In terms of the Motion Magic® Expo profile, a higher kV results in a
8457 * slower maximum velocity.
8458 * - kA: Mechanism kA for profiling. Unlike the kA slot gain, this is always
8459 * in units of V/rps².
8460 *
8461 * This represents the amount of voltage necessary to achieve an
8462 * acceleration. In terms of the Motion Magic® Expo profile, a higher
8463 * kA results in a slower acceleration.
8464 * - Velocity: Cruise velocity for profiling. The signage does not matter as
8465 * the device will use the absolute value for profile generation.
8466 * Setting this to 0 will allow the profile to run to the max
8467 * possible velocity based on Expo_kV.
8468 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8469 * which increases peak power by ~15% on supported devices (see
8470 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8471 * commutation.
8472 *
8473 * FOC improves motor performance by leveraging torque (current)
8474 * control. However, this may be inconvenient for applications
8475 * that require specifying duty cycle or voltage.
8476 * CTR-Electronics has developed a hybrid method that combines
8477 * the performances gains of FOC while still allowing
8478 * applications to provide duty cycle or voltage demand. This
8479 * not to be confused with simple sinusoidal control or phase
8480 * voltage control which lacks the performance gains.
8481 * - FeedForward: Feedforward to apply in fractional units between -1 and +1.
8482 * This is added to the output of the onboard feedforward
8483 * terms.
8484 * - Slot: Select which gains are applied by selecting the slot. Use the
8485 * configuration api to set the gain values for the selected slot
8486 * before enabling this feature. Slot must be within [0,2].
8487 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8488 * output is zero (or within deadband). Set to
8489 * false to use the NeutralMode configuration
8490 * setting (default). This flag exists to provide
8491 * the fundamental behavior of this control when
8492 * output is zero, which is to provide 0V to the
8493 * motor.
8494 * - LimitForwardMotion: Set to true to force forward limiting. This allows
8495 * users to use other limit switch sensors connected to
8496 * robot controller. This also allows use of active
8497 * sensors that require external power.
8498 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8499 * users to use other limit switch sensors connected to
8500 * robot controller. This also allows use of active
8501 * sensors that require external power.
8502 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8503 * the LimitForwardMotion and LimitReverseMotion
8504 * parameters, instead allowing motion.
8505 *
8506 * This can be useful on mechanisms such as an
8507 * intake/feeder, where a limit switch stops motion
8508 * while intaking but should be ignored when feeding
8509 * to a shooter.
8510 *
8511 * The hardware limit faults and Forward/ReverseLimit
8512 * signals will still report the values of the limit
8513 * switches regardless of this parameter.
8514 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8515 * allowing motion.
8516 *
8517 * This can be useful when calibrating the zero point
8518 * of a mechanism such as an elevator.
8519 *
8520 * The software limit faults will still report the
8521 * values of the software limits regardless of this
8522 * parameter.
8523 * - UseTimesync: Set to true to delay applying this control request until a
8524 * timesync boundary (requires Phoenix Pro and CANivore). This
8525 * eliminates the impact of nondeterministic network delays in
8526 * exchange for a larger but deterministic control latency.
8527 *
8528 * This requires setting the ControlTimesyncFreqHz config in
8529 * MotorOutputConfigs. Additionally, when this is enabled, the
8530 * UpdateFreqHz of this request should be set to 0 Hz.
8531 *
8532 * \param request Control object to request of the device
8533 * \returns Status Code of the request, 0 is OK
8534 */
8535 ctre::phoenix::StatusCode SetControl(const controls::DynamicMotionMagicExpoDutyCycle &request) final;
8536
8537 /**
8538 * \brief Requests Motion Magic® Expo to target a final position using
8539 * an exponential motion profile. This dynamic request allows runtime
8540 * changes to the profile kV, kA, and (optional) Cruise Velocity.
8541 * Users can optionally provide a voltage feedforward.
8542 *
8543 * \details Motion Magic® Expo produces a motion profile in real-time
8544 * while attempting to honor the specified Cruise Velocity (optional)
8545 * and the mechanism kV and kA. Note that unlike the slot gains, the
8546 * Expo_kV and Expo_kA parameters are always in output units of Volts.
8547 *
8548 * Setting the Cruise Velocity to 0 will allow the profile to run to
8549 * the max possible velocity based on Expo_kV. This control mode does
8550 * not use the Acceleration or Jerk configs.
8551 *
8552 * Target position can be changed on-the-fly and Motion Magic® will do
8553 * its best to adjust the profile. This control mode is
8554 * voltage-based, so relevant closed-loop gains will use Volts for the
8555 * numerator.
8556 *
8557 * - DynamicMotionMagicExpoVoltage Parameters:
8558 * - Position: Position to drive toward in rotations.
8559 * - kV: Mechanism kV for profiling. Unlike the kV slot gain, this is always
8560 * in units of V/rps.
8561 *
8562 * This represents the amount of voltage necessary to hold a velocity.
8563 * In terms of the Motion Magic® Expo profile, a higher kV results in a
8564 * slower maximum velocity.
8565 * - kA: Mechanism kA for profiling. Unlike the kA slot gain, this is always
8566 * in units of V/rps².
8567 *
8568 * This represents the amount of voltage necessary to achieve an
8569 * acceleration. In terms of the Motion Magic® Expo profile, a higher
8570 * kA results in a slower acceleration.
8571 * - Velocity: Cruise velocity for profiling. The signage does not matter as
8572 * the device will use the absolute value for profile generation.
8573 * Setting this to 0 will allow the profile to run to the max
8574 * possible velocity based on Expo_kV.
8575 * - EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro),
8576 * which increases peak power by ~15% on supported devices (see
8577 * hardware#traits#SupportsFOC). Set to false to use trapezoidal
8578 * commutation.
8579 *
8580 * FOC improves motor performance by leveraging torque (current)
8581 * control. However, this may be inconvenient for applications
8582 * that require specifying duty cycle or voltage.
8583 * CTR-Electronics has developed a hybrid method that combines
8584 * the performances gains of FOC while still allowing
8585 * applications to provide duty cycle or voltage demand. This
8586 * not to be confused with simple sinusoidal control or phase
8587 * voltage control which lacks the performance gains.
8588 * - FeedForward: Feedforward to apply in volts. This is added to the output
8589 * of the onboard feedforward terms.
8590 * - Slot: Select which gains are applied by selecting the slot. Use the
8591 * configuration api to set the gain values for the selected slot
8592 * before enabling this feature. Slot must be within [0,2].
8593 * - OverrideBrakeDurNeutral: Set to true to static-brake the rotor when
8594 * output is zero (or within deadband). Set to
8595 * false to use the NeutralMode configuration
8596 * setting (default). This flag exists to provide
8597 * the fundamental behavior of this control when
8598 * output is zero, which is to provide 0V to the
8599 * motor.
8600 * - LimitForwardMotion: Set to true to force forward limiting. This allows
8601 * users to use other limit switch sensors connected to
8602 * robot controller. This also allows use of active
8603 * sensors that require external power.
8604 * - LimitReverseMotion: Set to true to force reverse limiting. This allows
8605 * users to use other limit switch sensors connected to
8606 * robot controller. This also allows use of active
8607 * sensors that require external power.
8608 * - IgnoreHardwareLimits: Set to true to ignore hardware limit switches and
8609 * the LimitForwardMotion and LimitReverseMotion
8610 * parameters, instead allowing motion.
8611 *
8612 * This can be useful on mechanisms such as an
8613 * intake/feeder, where a limit switch stops motion
8614 * while intaking but should be ignored when feeding
8615 * to a shooter.
8616 *
8617 * The hardware limit faults and Forward/ReverseLimit
8618 * signals will still report the values of the limit
8619 * switches regardless of this parameter.
8620 * - IgnoreSoftwareLimits: Set to true to ignore software limits, instead
8621 * allowing motion.
8622 *
8623 * This can be useful when calibrating the zero point
8624 * of a mechanism such as an elevator.
8625 *
8626 * The software limit faults will still report the
8627 * values of the software limits regardless of this
8628 * parameter.
8629 * - UseTimesync: Set to true to delay applying this control request until a
8630 * timesync boundary (requires Phoenix Pro and CANivore). This
8631 * eliminates the impact of nondeterministic network delays in
8632 * exchange for a larger but deterministic control latency.
8633 *
8634 * This requires setting the ControlTimesyncFreqHz config in
8635 * MotorOutputConfigs. Additionally, when this is enabled, the
8636 * UpdateFreqHz of this request should be set to 0 Hz.
8637 *
8638 * \param request Control object to request of the device
8639 * \returns Status Code of the request, 0 is OK
8640 */
8641 ctre::phoenix::StatusCode SetControl(const controls::DynamicMotionMagicExpoVoltage &request) final;
8642
8643 /**
8644 * \brief Differential control with duty cycle average target and
8645 * position difference target.
8646 *
8647 * - Diff_DutyCycleOut_Position Parameters:
8648 * - AverageRequest: Average DutyCycleOut request of the mechanism.
8649 * - DifferentialRequest: Differential PositionDutyCycle request of the
8650 * mechanism.
8651 *
8652 * \param request Control object to request of the device
8653 * \returns Status Code of the request, 0 is OK
8654 */
8655 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_DutyCycleOut_Position &request) final;
8656
8657 /**
8658 * \brief Differential control with position average target and
8659 * position difference target using duty cycle control.
8660 *
8661 * - Diff_PositionDutyCycle_Position Parameters:
8662 * - AverageRequest: Average PositionDutyCycle request of the mechanism.
8663 * - DifferentialRequest: Differential PositionDutyCycle request of the
8664 * mechanism.
8665 *
8666 * \param request Control object to request of the device
8667 * \returns Status Code of the request, 0 is OK
8668 */
8669 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionDutyCycle_Position &request) final;
8670
8671 /**
8672 * \brief Differential control with velocity average target and
8673 * position difference target using duty cycle control.
8674 *
8675 * - Diff_VelocityDutyCycle_Position Parameters:
8676 * - AverageRequest: Average VelocityDutyCYcle request of the mechanism.
8677 * - DifferentialRequest: Differential PositionDutyCycle request of the
8678 * mechanism.
8679 *
8680 * \param request Control object to request of the device
8681 * \returns Status Code of the request, 0 is OK
8682 */
8683 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityDutyCycle_Position &request) final;
8684
8685 /**
8686 * \brief Differential control with Motion Magic® average target and
8687 * position difference target using duty cycle control.
8688 *
8689 * - Diff_MotionMagicDutyCycle_Position Parameters:
8690 * - AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
8691 * - DifferentialRequest: Differential PositionDutyCycle request of the
8692 * mechanism.
8693 *
8694 * \param request Control object to request of the device
8695 * \returns Status Code of the request, 0 is OK
8696 */
8697 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicDutyCycle_Position &request) final;
8698
8699 /**
8700 * \brief Differential control with Motion Magic® Expo average target
8701 * and position difference target using duty cycle control.
8702 *
8703 * - Diff_MotionMagicExpoDutyCycle_Position Parameters:
8704 * - AverageRequest: Average MotionMagicExpoDutyCycle request of the
8705 * mechanism.
8706 * - DifferentialRequest: Differential PositionDutyCycle request of the
8707 * mechanism.
8708 *
8709 * \param request Control object to request of the device
8710 * \returns Status Code of the request, 0 is OK
8711 */
8712 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoDutyCycle_Position &request) final;
8713
8714 /**
8715 * \brief Differential control with Motion Magic® Velocity average
8716 * target and position difference target using duty cycle control.
8717 *
8718 * - Diff_MotionMagicVelocityDutyCycle_Position Parameters:
8719 * - AverageRequest: Average MotionMagicVelocityDutyCycle request of the
8720 * mechanism.
8721 * - DifferentialRequest: Differential PositionDutyCycle request of the
8722 * mechanism.
8723 *
8724 * \param request Control object to request of the device
8725 * \returns Status Code of the request, 0 is OK
8726 */
8727 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityDutyCycle_Position &request) final;
8728
8729 /**
8730 * \brief Differential control with duty cycle average target and
8731 * velocity difference target.
8732 *
8733 * - Diff_DutyCycleOut_Velocity Parameters:
8734 * - AverageRequest: Average DutyCycleOut request of the mechanism.
8735 * - DifferentialRequest: Differential VelocityDutyCycle request of the
8736 * mechanism.
8737 *
8738 * \param request Control object to request of the device
8739 * \returns Status Code of the request, 0 is OK
8740 */
8741 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_DutyCycleOut_Velocity &request) final;
8742
8743 /**
8744 * \brief Differential control with position average target and
8745 * velocity difference target using duty cycle control.
8746 *
8747 * - Diff_PositionDutyCycle_Velocity Parameters:
8748 * - AverageRequest: Average PositionDutyCycle request of the mechanism.
8749 * - DifferentialRequest: Differential VelocityDutyCycle request of the
8750 * mechanism.
8751 *
8752 * \param request Control object to request of the device
8753 * \returns Status Code of the request, 0 is OK
8754 */
8755 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionDutyCycle_Velocity &request) final;
8756
8757 /**
8758 * \brief Differential control with velocity average target and
8759 * velocity difference target using duty cycle control.
8760 *
8761 * - Diff_VelocityDutyCycle_Velocity Parameters:
8762 * - AverageRequest: Average VelocityDutyCycle request of the mechanism.
8763 * - DifferentialRequest: Differential VelocityDutyCycle request of the
8764 * mechanism.
8765 *
8766 * \param request Control object to request of the device
8767 * \returns Status Code of the request, 0 is OK
8768 */
8769 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityDutyCycle_Velocity &request) final;
8770
8771 /**
8772 * \brief Differential control with Motion Magic® average target and
8773 * velocity difference target using duty cycle control.
8774 *
8775 * - Diff_MotionMagicDutyCycle_Velocity Parameters:
8776 * - AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
8777 * - DifferentialRequest: Differential VelocityDutyCycle request of the
8778 * mechanism.
8779 *
8780 * \param request Control object to request of the device
8781 * \returns Status Code of the request, 0 is OK
8782 */
8783 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicDutyCycle_Velocity &request) final;
8784
8785 /**
8786 * \brief Differential control with Motion Magic® Expo average target
8787 * and velocity difference target using duty cycle control.
8788 *
8789 * - Diff_MotionMagicExpoDutyCycle_Velocity Parameters:
8790 * - AverageRequest: Average MotionMagicExpoDutyCycle request of the
8791 * mechanism.
8792 * - DifferentialRequest: Differential VelocityDutyCycle request of the
8793 * mechanism.
8794 *
8795 * \param request Control object to request of the device
8796 * \returns Status Code of the request, 0 is OK
8797 */
8798 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoDutyCycle_Velocity &request) final;
8799
8800 /**
8801 * \brief Differential control with Motion Magic® Velocity average
8802 * target and velocity difference target using duty cycle control.
8803 *
8804 * - Diff_MotionMagicVelocityDutyCycle_Velocity Parameters:
8805 * - AverageRequest: Average MotionMagicVelocityDutyCycle request of the
8806 * mechanism.
8807 * - DifferentialRequest: Differential VelocityDutyCycle request of the
8808 * mechanism.
8809 *
8810 * \param request Control object to request of the device
8811 * \returns Status Code of the request, 0 is OK
8812 */
8813 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityDutyCycle_Velocity &request) final;
8814
8815 /**
8816 * \brief Differential control with duty cycle average target and duty
8817 * cycle difference target.
8818 *
8819 * - Diff_DutyCycleOut_Open Parameters:
8820 * - AverageRequest: Average DutyCycleOut request of the mechanism.
8821 * - DifferentialRequest: Differential DutyCycleOut request of the mechanism.
8822 *
8823 * \param request Control object to request of the device
8824 * \returns Status Code of the request, 0 is OK
8825 */
8826 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_DutyCycleOut_Open &request) final;
8827
8828 /**
8829 * \brief Differential control with position average target and duty
8830 * cycle difference target.
8831 *
8832 * - Diff_PositionDutyCycle_Open Parameters:
8833 * - AverageRequest: Average PositionDutyCycle request of the mechanism.
8834 * - DifferentialRequest: Differential DutyCycleOut request of the mechanism.
8835 *
8836 * \param request Control object to request of the device
8837 * \returns Status Code of the request, 0 is OK
8838 */
8839 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionDutyCycle_Open &request) final;
8840
8841 /**
8842 * \brief Differential control with velocity average target and duty
8843 * cycle difference target.
8844 *
8845 * - Diff_VelocityDutyCycle_Open Parameters:
8846 * - AverageRequest: Average VelocityDutyCYcle request of the mechanism.
8847 * - DifferentialRequest: Differential DutyCycleOut request of the mechanism.
8848 *
8849 * \param request Control object to request of the device
8850 * \returns Status Code of the request, 0 is OK
8851 */
8852 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityDutyCycle_Open &request) final;
8853
8854 /**
8855 * \brief Differential control with Motion Magic® average target and
8856 * duty cycle difference target.
8857 *
8858 * - Diff_MotionMagicDutyCycle_Open Parameters:
8859 * - AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
8860 * - DifferentialRequest: Differential DutyCycleOut request of the mechanism.
8861 *
8862 * \param request Control object to request of the device
8863 * \returns Status Code of the request, 0 is OK
8864 */
8865 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicDutyCycle_Open &request) final;
8866
8867 /**
8868 * \brief Differential control with Motion Magic® Expo average target
8869 * and duty cycle difference target.
8870 *
8871 * - Diff_MotionMagicExpoDutyCycle_Open Parameters:
8872 * - AverageRequest: Average MotionMagicExpoDutyCycle request of the
8873 * mechanism.
8874 * - DifferentialRequest: Differential DutyCycleOut request of the mechanism.
8875 *
8876 * \param request Control object to request of the device
8877 * \returns Status Code of the request, 0 is OK
8878 */
8879 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoDutyCycle_Open &request) final;
8880
8881 /**
8882 * \brief Differential control with Motion Magic® Velocity average
8883 * target and duty cycle difference target.
8884 *
8885 * - Diff_MotionMagicVelocityDutyCycle_Open Parameters:
8886 * - AverageRequest: Average MotionMagicVelocityDutyCycle request of the
8887 * mechanism.
8888 * - DifferentialRequest: Differential DutyCycleOut request of the mechanism.
8889 *
8890 * \param request Control object to request of the device
8891 * \returns Status Code of the request, 0 is OK
8892 */
8893 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityDutyCycle_Open &request) final;
8894
8895 /**
8896 * \brief Differential control with voltage average target and
8897 * position difference target.
8898 *
8899 * - Diff_VoltageOut_Position Parameters:
8900 * - AverageRequest: Average VoltageOut request of the mechanism.
8901 * - DifferentialRequest: Differential PositionVoltage request of the
8902 * mechanism.
8903 *
8904 * \param request Control object to request of the device
8905 * \returns Status Code of the request, 0 is OK
8906 */
8907 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VoltageOut_Position &request) final;
8908
8909 /**
8910 * \brief Differential control with position average target and
8911 * position difference target using voltage control.
8912 *
8913 * - Diff_PositionVoltage_Position Parameters:
8914 * - AverageRequest: Average PositionVoltage request of the mechanism.
8915 * - DifferentialRequest: Differential PositionVoltage request of the
8916 * mechanism.
8917 *
8918 * \param request Control object to request of the device
8919 * \returns Status Code of the request, 0 is OK
8920 */
8921 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionVoltage_Position &request) final;
8922
8923 /**
8924 * \brief Differential control with velocity average target and
8925 * position difference target using voltage control.
8926 *
8927 * - Diff_VelocityVoltage_Position Parameters:
8928 * - AverageRequest: Average VelocityVoltage request of the mechanism.
8929 * - DifferentialRequest: Differential PositionVoltage request of the
8930 * mechanism.
8931 *
8932 * \param request Control object to request of the device
8933 * \returns Status Code of the request, 0 is OK
8934 */
8935 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityVoltage_Position &request) final;
8936
8937 /**
8938 * \brief Differential control with Motion Magic® average target and
8939 * position difference target using voltage control.
8940 *
8941 * - Diff_MotionMagicVoltage_Position Parameters:
8942 * - AverageRequest: Average MotionMagicVoltage request of the mechanism.
8943 * - DifferentialRequest: Differential PositionVoltage request of the
8944 * mechanism.
8945 *
8946 * \param request Control object to request of the device
8947 * \returns Status Code of the request, 0 is OK
8948 */
8949 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVoltage_Position &request) final;
8950
8951 /**
8952 * \brief Differential control with Motion Magic® Expo average target
8953 * and position difference target using voltage control.
8954 *
8955 * - Diff_MotionMagicExpoVoltage_Position Parameters:
8956 * - AverageRequest: Average MotionMagicExpoVoltage request of the mechanism.
8957 * - DifferentialRequest: Differential PositionVoltage request of the
8958 * mechanism.
8959 *
8960 * \param request Control object to request of the device
8961 * \returns Status Code of the request, 0 is OK
8962 */
8963 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoVoltage_Position &request) final;
8964
8965 /**
8966 * \brief Differential control with Motion Magic® Velocity average
8967 * target and position difference target using voltage control.
8968 *
8969 * - Diff_MotionMagicVelocityVoltage_Position Parameters:
8970 * - AverageRequest: Average MotionMagicVelocityVoltage request of the
8971 * mechanism.
8972 * - DifferentialRequest: Differential PositionVoltage request of the
8973 * mechanism.
8974 *
8975 * \param request Control object to request of the device
8976 * \returns Status Code of the request, 0 is OK
8977 */
8978 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityVoltage_Position &request) final;
8979
8980 /**
8981 * \brief Differential control with voltage average target and
8982 * velocity difference target.
8983 *
8984 * - Diff_VoltageOut_Velocity Parameters:
8985 * - AverageRequest: Average VoltageOut request of the mechanism.
8986 * - DifferentialRequest: Differential VelocityVoltage request of the
8987 * mechanism.
8988 *
8989 * \param request Control object to request of the device
8990 * \returns Status Code of the request, 0 is OK
8991 */
8992 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VoltageOut_Velocity &request) final;
8993
8994 /**
8995 * \brief Differential control with position average target and
8996 * velocity difference target using voltage control.
8997 *
8998 * - Diff_PositionVoltage_Velocity Parameters:
8999 * - AverageRequest: Average PositionVoltage request of the mechanism.
9000 * - DifferentialRequest: Differential VelocityVoltage request of the
9001 * mechanism.
9002 *
9003 * \param request Control object to request of the device
9004 * \returns Status Code of the request, 0 is OK
9005 */
9006 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionVoltage_Velocity &request) final;
9007
9008 /**
9009 * \brief Differential control with velocity average target and
9010 * velocity difference target using voltage control.
9011 *
9012 * - Diff_VelocityVoltage_Velocity Parameters:
9013 * - AverageRequest: Average VelocityVoltage request of the mechanism.
9014 * - DifferentialRequest: Differential VelocityVoltage request of the
9015 * mechanism.
9016 *
9017 * \param request Control object to request of the device
9018 * \returns Status Code of the request, 0 is OK
9019 */
9020 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityVoltage_Velocity &request) final;
9021
9022 /**
9023 * \brief Differential control with Motion Magic® average target and
9024 * velocity difference target using voltage control.
9025 *
9026 * - Diff_MotionMagicVoltage_Velocity Parameters:
9027 * - AverageRequest: Average MotionMagicVoltage request of the mechanism.
9028 * - DifferentialRequest: Differential VelocityVoltage request of the
9029 * mechanism.
9030 *
9031 * \param request Control object to request of the device
9032 * \returns Status Code of the request, 0 is OK
9033 */
9034 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVoltage_Velocity &request) final;
9035
9036 /**
9037 * \brief Differential control with Motion Magic® Expo average target
9038 * and velocity difference target using voltage control.
9039 *
9040 * - Diff_MotionMagicExpoVoltage_Velocity Parameters:
9041 * - AverageRequest: Average MotionMagicExpoVoltage request of the mechanism.
9042 * - DifferentialRequest: Differential VelocityVoltage request of the
9043 * mechanism.
9044 *
9045 * \param request Control object to request of the device
9046 * \returns Status Code of the request, 0 is OK
9047 */
9048 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoVoltage_Velocity &request) final;
9049
9050 /**
9051 * \brief Differential control with Motion Magic® Velocity average
9052 * target and velocity difference target using voltage control.
9053 *
9054 * - Diff_MotionMagicVelocityVoltage_Velocity Parameters:
9055 * - AverageRequest: Average MotionMagicVelocityVoltage request of the
9056 * mechanism.
9057 * - DifferentialRequest: Differential VelocityVoltage request of the
9058 * mechanism.
9059 *
9060 * \param request Control object to request of the device
9061 * \returns Status Code of the request, 0 is OK
9062 */
9063 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityVoltage_Velocity &request) final;
9064
9065 /**
9066 * \brief Differential control with voltage average target and voltage
9067 * difference target.
9068 *
9069 * - Diff_VoltageOut_Open Parameters:
9070 * - AverageRequest: Average VoltageOut request of the mechanism.
9071 * - DifferentialRequest: Differential VoltageOut request of the mechanism.
9072 *
9073 * \param request Control object to request of the device
9074 * \returns Status Code of the request, 0 is OK
9075 */
9076 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VoltageOut_Open &request) final;
9077
9078 /**
9079 * \brief Differential control with position average target and
9080 * voltage difference target.
9081 *
9082 * - Diff_PositionVoltage_Open Parameters:
9083 * - AverageRequest: Average PositionVoltage request of the mechanism.
9084 * - DifferentialRequest: Differential VoltageOut request of the mechanism.
9085 *
9086 * \param request Control object to request of the device
9087 * \returns Status Code of the request, 0 is OK
9088 */
9089 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_PositionVoltage_Open &request) final;
9090
9091 /**
9092 * \brief Differential control with velocity average target and
9093 * voltage difference target.
9094 *
9095 * - Diff_VelocityVoltage_Open Parameters:
9096 * - AverageRequest: Average VelocityVoltage request of the mechanism.
9097 * - DifferentialRequest: Differential VoltageOut request of the mechanism.
9098 *
9099 * \param request Control object to request of the device
9100 * \returns Status Code of the request, 0 is OK
9101 */
9102 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_VelocityVoltage_Open &request) final;
9103
9104 /**
9105 * \brief Differential control with Motion Magic® average target and
9106 * voltage difference target.
9107 *
9108 * - Diff_MotionMagicVoltage_Open Parameters:
9109 * - AverageRequest: Average MotionMagicVoltage request of the mechanism.
9110 * - DifferentialRequest: Differential VoltageOut request of the mechanism.
9111 *
9112 * \param request Control object to request of the device
9113 * \returns Status Code of the request, 0 is OK
9114 */
9115 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVoltage_Open &request) final;
9116
9117 /**
9118 * \brief Differential control with Motion Magic® Expo average target
9119 * and voltage difference target.
9120 *
9121 * - Diff_MotionMagicExpoVoltage_Open Parameters:
9122 * - AverageRequest: Average MotionMagicExpoVoltage request of the mechanism.
9123 * - DifferentialRequest: Differential VoltageOut request of the mechanism.
9124 *
9125 * \param request Control object to request of the device
9126 * \returns Status Code of the request, 0 is OK
9127 */
9128 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicExpoVoltage_Open &request) final;
9129
9130 /**
9131 * \brief Differential control with Motion Magic® Velocity average
9132 * target and voltage difference target.
9133 *
9134 * - Diff_MotionMagicVelocityVoltage_Open Parameters:
9135 * - AverageRequest: Average MotionMagicVelocityVoltage request of the
9136 * mechanism.
9137 * - DifferentialRequest: Differential VoltageOut request of the mechanism.
9138 *
9139 * \param request Control object to request of the device
9140 * \returns Status Code of the request, 0 is OK
9141 */
9142 ctre::phoenix::StatusCode SetControl(const controls::compound::Diff_MotionMagicVelocityVoltage_Open &request) final;
9143
9144 /**
9145 * \brief Control device with generic control request object. User must make
9146 * sure the specified object is castable to a valid control request,
9147 * otherwise this function will fail at run-time and return the NotSupported
9148 * StatusCode
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(controls::ControlRequest const &request) final;
9154
9155
9156 /**
9157 * \brief Sets the mechanism position of the device in mechanism
9158 * rotations.
9159 *
9160 * \param newValue Value to set to. Units are in rotations.
9161 * \param timeoutSeconds Maximum time to wait up to in seconds.
9162 * \returns StatusCode of the set command
9163 */
9164 ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds) final
9165 {
9166 return GetConfigurator().SetPosition(newValue, timeoutSeconds);
9167 }
9168 /**
9169 * \brief Sets the mechanism position of the device in mechanism
9170 * rotations.
9171 *
9172 * This will wait up to 0.100 seconds (100ms) by default.
9173 *
9174 * \param newValue Value to set to. Units are in rotations.
9175 * \returns StatusCode of the set command
9176 */
9177 ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue) final
9178 {
9179 return SetPosition(newValue, 0.100_s);
9180 }
9181
9182 /**
9183 * \brief Clear the sticky faults in the device.
9184 *
9185 * \details This typically has no impact on the device functionality.
9186 * Instead, it just clears telemetry faults that are accessible via
9187 * API and Tuner Self-Test.
9188 *
9189 * \param timeoutSeconds Maximum time to wait up to in seconds.
9190 * \returns StatusCode of the set command
9191 */
9192 ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds) final
9193 {
9194 return GetConfigurator().ClearStickyFaults(timeoutSeconds);
9195 }
9196 /**
9197 * \brief Clear the sticky faults in the device.
9198 *
9199 * \details This typically has no impact on the device functionality.
9200 * Instead, it just clears telemetry faults that are accessible via
9201 * API and Tuner Self-Test.
9202 *
9203 * This will wait up to 0.100 seconds (100ms) by default.
9204 *
9205 * \returns StatusCode of the set command
9206 */
9208 {
9209 return ClearStickyFaults(0.100_s);
9210 }
9211
9212 /**
9213 * \brief Clear sticky fault: Hardware fault occurred
9214 *
9215 * \param timeoutSeconds Maximum time to wait up to in seconds.
9216 * \returns StatusCode of the set command
9217 */
9218 ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds) final
9219 {
9220 return GetConfigurator().ClearStickyFault_Hardware(timeoutSeconds);
9221 }
9222 /**
9223 * \brief Clear sticky fault: Hardware fault occurred
9224 *
9225 * This will wait up to 0.100 seconds (100ms) by default.
9226 *
9227 * \returns StatusCode of the set command
9228 */
9230 {
9231 return ClearStickyFault_Hardware(0.100_s);
9232 }
9233
9234 /**
9235 * \brief Clear sticky fault: Processor temperature exceeded limit
9236 *
9237 * \param timeoutSeconds Maximum time to wait up to in seconds.
9238 * \returns StatusCode of the set command
9239 */
9240 ctre::phoenix::StatusCode ClearStickyFault_ProcTemp(units::time::second_t timeoutSeconds) final
9241 {
9242 return GetConfigurator().ClearStickyFault_ProcTemp(timeoutSeconds);
9243 }
9244 /**
9245 * \brief Clear sticky fault: Processor temperature exceeded limit
9246 *
9247 * This will wait up to 0.100 seconds (100ms) by default.
9248 *
9249 * \returns StatusCode of the set command
9250 */
9252 {
9253 return ClearStickyFault_ProcTemp(0.100_s);
9254 }
9255
9256 /**
9257 * \brief Clear sticky fault: Device temperature exceeded limit
9258 *
9259 * \param timeoutSeconds Maximum time to wait up to in seconds.
9260 * \returns StatusCode of the set command
9261 */
9262 ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp(units::time::second_t timeoutSeconds) final
9263 {
9264 return GetConfigurator().ClearStickyFault_DeviceTemp(timeoutSeconds);
9265 }
9266 /**
9267 * \brief Clear sticky fault: Device temperature exceeded limit
9268 *
9269 * This will wait up to 0.100 seconds (100ms) by default.
9270 *
9271 * \returns StatusCode of the set command
9272 */
9274 {
9275 return ClearStickyFault_DeviceTemp(0.100_s);
9276 }
9277
9278 /**
9279 * \brief Clear sticky fault: Device supply voltage dropped to near
9280 * brownout levels
9281 *
9282 * \param timeoutSeconds Maximum time to wait up to in seconds.
9283 * \returns StatusCode of the set command
9284 */
9285 ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds) final
9286 {
9287 return GetConfigurator().ClearStickyFault_Undervoltage(timeoutSeconds);
9288 }
9289 /**
9290 * \brief Clear sticky fault: Device supply voltage dropped to near
9291 * brownout levels
9292 *
9293 * This will wait up to 0.100 seconds (100ms) by default.
9294 *
9295 * \returns StatusCode of the set command
9296 */
9298 {
9299 return ClearStickyFault_Undervoltage(0.100_s);
9300 }
9301
9302 /**
9303 * \brief Clear sticky fault: Device boot while detecting the enable
9304 * signal
9305 *
9306 * \param timeoutSeconds Maximum time to wait up to in seconds.
9307 * \returns StatusCode of the set command
9308 */
9309 ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable(units::time::second_t timeoutSeconds) final
9310 {
9311 return GetConfigurator().ClearStickyFault_BootDuringEnable(timeoutSeconds);
9312 }
9313 /**
9314 * \brief Clear sticky fault: Device boot while detecting the enable
9315 * signal
9316 *
9317 * This will wait up to 0.100 seconds (100ms) by default.
9318 *
9319 * \returns StatusCode of the set command
9320 */
9322 {
9323 return ClearStickyFault_BootDuringEnable(0.100_s);
9324 }
9325
9326 /**
9327 * \brief Clear sticky fault: An unlicensed feature is in use, device
9328 * may not behave as expected.
9329 *
9330 * \param timeoutSeconds Maximum time to wait up to in seconds.
9331 * \returns StatusCode of the set command
9332 */
9333 ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse(units::time::second_t timeoutSeconds) final
9334 {
9335 return GetConfigurator().ClearStickyFault_UnlicensedFeatureInUse(timeoutSeconds);
9336 }
9337 /**
9338 * \brief Clear sticky fault: An unlicensed feature is in use, device
9339 * may not behave as expected.
9340 *
9341 * This will wait up to 0.100 seconds (100ms) by default.
9342 *
9343 * \returns StatusCode of the set command
9344 */
9346 {
9347 return ClearStickyFault_UnlicensedFeatureInUse(0.100_s);
9348 }
9349
9350 /**
9351 * \brief Clear sticky fault: Bridge was disabled most likely due to
9352 * supply voltage dropping too low.
9353 *
9354 * \param timeoutSeconds Maximum time to wait up to in seconds.
9355 * \returns StatusCode of the set command
9356 */
9357 ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout(units::time::second_t timeoutSeconds) final
9358 {
9359 return GetConfigurator().ClearStickyFault_BridgeBrownout(timeoutSeconds);
9360 }
9361 /**
9362 * \brief Clear sticky fault: Bridge was disabled most likely due to
9363 * supply voltage dropping too low.
9364 *
9365 * This will wait up to 0.100 seconds (100ms) by default.
9366 *
9367 * \returns StatusCode of the set command
9368 */
9370 {
9371 return ClearStickyFault_BridgeBrownout(0.100_s);
9372 }
9373
9374 /**
9375 * \brief Clear sticky fault: The remote sensor has reset.
9376 *
9377 * \param timeoutSeconds Maximum time to wait up to in seconds.
9378 * \returns StatusCode of the set command
9379 */
9380 ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset(units::time::second_t timeoutSeconds) final
9381 {
9382 return GetConfigurator().ClearStickyFault_RemoteSensorReset(timeoutSeconds);
9383 }
9384 /**
9385 * \brief Clear sticky fault: The remote sensor has reset.
9386 *
9387 * This will wait up to 0.100 seconds (100ms) by default.
9388 *
9389 * \returns StatusCode of the set command
9390 */
9392 {
9393 return ClearStickyFault_RemoteSensorReset(0.100_s);
9394 }
9395
9396 /**
9397 * \brief Clear sticky fault: The remote Talon used for differential
9398 * control is not present on CAN Bus.
9399 *
9400 * \param timeoutSeconds Maximum time to wait up to in seconds.
9401 * \returns StatusCode of the set command
9402 */
9403 ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX(units::time::second_t timeoutSeconds) final
9404 {
9405 return GetConfigurator().ClearStickyFault_MissingDifferentialFX(timeoutSeconds);
9406 }
9407 /**
9408 * \brief Clear sticky fault: The remote Talon used for differential
9409 * control is not present on CAN Bus.
9410 *
9411 * This will wait up to 0.100 seconds (100ms) by default.
9412 *
9413 * \returns StatusCode of the set command
9414 */
9416 {
9417 return ClearStickyFault_MissingDifferentialFX(0.100_s);
9418 }
9419
9420 /**
9421 * \brief Clear sticky fault: The remote sensor position has
9422 * overflowed. Because of the nature of remote sensors, it is possible
9423 * for the remote sensor position to overflow beyond what is supported
9424 * by the status signal frame. However, this is rare and cannot occur
9425 * over the course of an FRC match under normal use.
9426 *
9427 * \param timeoutSeconds Maximum time to wait up to in seconds.
9428 * \returns StatusCode of the set command
9429 */
9431 {
9432 return GetConfigurator().ClearStickyFault_RemoteSensorPosOverflow(timeoutSeconds);
9433 }
9434 /**
9435 * \brief Clear sticky fault: The remote sensor position has
9436 * overflowed. Because of the nature of remote sensors, it is possible
9437 * for the remote sensor position to overflow beyond what is supported
9438 * by the status signal frame. However, this is rare and cannot occur
9439 * over the course of an FRC match under normal use.
9440 *
9441 * This will wait up to 0.100 seconds (100ms) by default.
9442 *
9443 * \returns StatusCode of the set command
9444 */
9446 {
9447 return ClearStickyFault_RemoteSensorPosOverflow(0.100_s);
9448 }
9449
9450 /**
9451 * \brief Clear sticky fault: Supply Voltage has exceeded the maximum
9452 * voltage rating of device.
9453 *
9454 * \param timeoutSeconds Maximum time to wait up to in seconds.
9455 * \returns StatusCode of the set command
9456 */
9457 ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV(units::time::second_t timeoutSeconds) final
9458 {
9459 return GetConfigurator().ClearStickyFault_OverSupplyV(timeoutSeconds);
9460 }
9461 /**
9462 * \brief Clear sticky fault: Supply Voltage has exceeded the maximum
9463 * voltage rating of device.
9464 *
9465 * This will wait up to 0.100 seconds (100ms) by default.
9466 *
9467 * \returns StatusCode of the set command
9468 */
9470 {
9471 return ClearStickyFault_OverSupplyV(0.100_s);
9472 }
9473
9474 /**
9475 * \brief Clear sticky fault: Supply Voltage is unstable. Ensure you
9476 * are using a battery and current limited power supply.
9477 *
9478 * \param timeoutSeconds Maximum time to wait up to in seconds.
9479 * \returns StatusCode of the set command
9480 */
9481 ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV(units::time::second_t timeoutSeconds) final
9482 {
9483 return GetConfigurator().ClearStickyFault_UnstableSupplyV(timeoutSeconds);
9484 }
9485 /**
9486 * \brief Clear sticky fault: Supply Voltage is unstable. Ensure you
9487 * are using a battery and current limited power supply.
9488 *
9489 * This will wait up to 0.100 seconds (100ms) by default.
9490 *
9491 * \returns StatusCode of the set command
9492 */
9494 {
9495 return ClearStickyFault_UnstableSupplyV(0.100_s);
9496 }
9497
9498 /**
9499 * \brief Clear sticky fault: Reverse limit switch has been asserted.
9500 * Output is set to neutral.
9501 *
9502 * \param timeoutSeconds Maximum time to wait up to in seconds.
9503 * \returns StatusCode of the set command
9504 */
9505 ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit(units::time::second_t timeoutSeconds) final
9506 {
9507 return GetConfigurator().ClearStickyFault_ReverseHardLimit(timeoutSeconds);
9508 }
9509 /**
9510 * \brief Clear sticky fault: Reverse limit switch has been asserted.
9511 * Output is set to neutral.
9512 *
9513 * This will wait up to 0.100 seconds (100ms) by default.
9514 *
9515 * \returns StatusCode of the set command
9516 */
9518 {
9519 return ClearStickyFault_ReverseHardLimit(0.100_s);
9520 }
9521
9522 /**
9523 * \brief Clear sticky fault: Forward limit switch has been asserted.
9524 * Output is set to neutral.
9525 *
9526 * \param timeoutSeconds Maximum time to wait up to in seconds.
9527 * \returns StatusCode of the set command
9528 */
9529 ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit(units::time::second_t timeoutSeconds) final
9530 {
9531 return GetConfigurator().ClearStickyFault_ForwardHardLimit(timeoutSeconds);
9532 }
9533 /**
9534 * \brief Clear sticky fault: Forward limit switch has been asserted.
9535 * Output is set to neutral.
9536 *
9537 * This will wait up to 0.100 seconds (100ms) by default.
9538 *
9539 * \returns StatusCode of the set command
9540 */
9542 {
9543 return ClearStickyFault_ForwardHardLimit(0.100_s);
9544 }
9545
9546 /**
9547 * \brief Clear sticky fault: Reverse soft limit has been asserted.
9548 * Output is set to neutral.
9549 *
9550 * \param timeoutSeconds Maximum time to wait up to in seconds.
9551 * \returns StatusCode of the set command
9552 */
9553 ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit(units::time::second_t timeoutSeconds) final
9554 {
9555 return GetConfigurator().ClearStickyFault_ReverseSoftLimit(timeoutSeconds);
9556 }
9557 /**
9558 * \brief Clear sticky fault: Reverse soft limit has been asserted.
9559 * Output is set to neutral.
9560 *
9561 * This will wait up to 0.100 seconds (100ms) by default.
9562 *
9563 * \returns StatusCode of the set command
9564 */
9566 {
9567 return ClearStickyFault_ReverseSoftLimit(0.100_s);
9568 }
9569
9570 /**
9571 * \brief Clear sticky fault: Forward soft limit has been asserted.
9572 * Output is set to neutral.
9573 *
9574 * \param timeoutSeconds Maximum time to wait up to in seconds.
9575 * \returns StatusCode of the set command
9576 */
9577 ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit(units::time::second_t timeoutSeconds) final
9578 {
9579 return GetConfigurator().ClearStickyFault_ForwardSoftLimit(timeoutSeconds);
9580 }
9581 /**
9582 * \brief Clear sticky fault: Forward soft limit has been asserted.
9583 * Output is set to neutral.
9584 *
9585 * This will wait up to 0.100 seconds (100ms) by default.
9586 *
9587 * \returns StatusCode of the set command
9588 */
9590 {
9591 return ClearStickyFault_ForwardSoftLimit(0.100_s);
9592 }
9593
9594 /**
9595 * \brief Clear sticky fault: The remote soft limit device is not
9596 * present on CAN Bus.
9597 *
9598 * \param timeoutSeconds Maximum time to wait up to in seconds.
9599 * \returns StatusCode of the set command
9600 */
9601 ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote(units::time::second_t timeoutSeconds) final
9602 {
9603 return GetConfigurator().ClearStickyFault_MissingSoftLimitRemote(timeoutSeconds);
9604 }
9605 /**
9606 * \brief Clear sticky fault: The remote soft limit device is not
9607 * present on CAN Bus.
9608 *
9609 * This will wait up to 0.100 seconds (100ms) by default.
9610 *
9611 * \returns StatusCode of the set command
9612 */
9614 {
9615 return ClearStickyFault_MissingSoftLimitRemote(0.100_s);
9616 }
9617
9618 /**
9619 * \brief Clear sticky fault: The remote limit switch device is not
9620 * present on CAN Bus.
9621 *
9622 * \param timeoutSeconds Maximum time to wait up to in seconds.
9623 * \returns StatusCode of the set command
9624 */
9625 ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote(units::time::second_t timeoutSeconds) final
9626 {
9627 return GetConfigurator().ClearStickyFault_MissingHardLimitRemote(timeoutSeconds);
9628 }
9629 /**
9630 * \brief Clear sticky fault: The remote limit switch device is not
9631 * present on CAN Bus.
9632 *
9633 * This will wait up to 0.100 seconds (100ms) by default.
9634 *
9635 * \returns StatusCode of the set command
9636 */
9638 {
9639 return ClearStickyFault_MissingHardLimitRemote(0.100_s);
9640 }
9641
9642 /**
9643 * \brief Clear sticky fault: The remote sensor's data is no longer
9644 * trusted. This can happen if the remote sensor disappears from the
9645 * CAN bus or if the remote sensor indicates its data is no longer
9646 * valid, such as when a CANcoder's magnet strength falls into the
9647 * "red" range.
9648 *
9649 * \param timeoutSeconds Maximum time to wait up to in seconds.
9650 * \returns StatusCode of the set command
9651 */
9653 {
9654 return GetConfigurator().ClearStickyFault_RemoteSensorDataInvalid(timeoutSeconds);
9655 }
9656 /**
9657 * \brief Clear sticky fault: The remote sensor's data is no longer
9658 * trusted. This can happen if the remote sensor disappears from the
9659 * CAN bus or if the remote sensor indicates its data is no longer
9660 * valid, such as when a CANcoder's magnet strength falls into the
9661 * "red" range.
9662 *
9663 * This will wait up to 0.100 seconds (100ms) by default.
9664 *
9665 * \returns StatusCode of the set command
9666 */
9668 {
9669 return ClearStickyFault_RemoteSensorDataInvalid(0.100_s);
9670 }
9671
9672 /**
9673 * \brief Clear sticky fault: The remote sensor used for fusion has
9674 * fallen out of sync to the local sensor. A re-synchronization has
9675 * occurred, which may cause a discontinuity. This typically happens
9676 * if there is significant slop in the mechanism, or if the
9677 * RotorToSensorRatio configuration parameter is incorrect.
9678 *
9679 * \param timeoutSeconds Maximum time to wait up to in seconds.
9680 * \returns StatusCode of the set command
9681 */
9682 ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync(units::time::second_t timeoutSeconds) final
9683 {
9684 return GetConfigurator().ClearStickyFault_FusedSensorOutOfSync(timeoutSeconds);
9685 }
9686 /**
9687 * \brief Clear sticky fault: The remote sensor used for fusion has
9688 * fallen out of sync to the local sensor. A re-synchronization has
9689 * occurred, which may cause a discontinuity. This typically happens
9690 * if there is significant slop in the mechanism, or if the
9691 * RotorToSensorRatio configuration parameter is incorrect.
9692 *
9693 * This will wait up to 0.100 seconds (100ms) by default.
9694 *
9695 * \returns StatusCode of the set command
9696 */
9698 {
9699 return ClearStickyFault_FusedSensorOutOfSync(0.100_s);
9700 }
9701
9702 /**
9703 * \brief Clear sticky fault: Stator current limit occured.
9704 *
9705 * \param timeoutSeconds Maximum time to wait up to in seconds.
9706 * \returns StatusCode of the set command
9707 */
9708 ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit(units::time::second_t timeoutSeconds) final
9709 {
9710 return GetConfigurator().ClearStickyFault_StatorCurrLimit(timeoutSeconds);
9711 }
9712 /**
9713 * \brief Clear sticky fault: Stator current limit occured.
9714 *
9715 * This will wait up to 0.100 seconds (100ms) by default.
9716 *
9717 * \returns StatusCode of the set command
9718 */
9720 {
9721 return ClearStickyFault_StatorCurrLimit(0.100_s);
9722 }
9723
9724 /**
9725 * \brief Clear sticky fault: Supply current limit occured.
9726 *
9727 * \param timeoutSeconds Maximum time to wait up to in seconds.
9728 * \returns StatusCode of the set command
9729 */
9730 ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit(units::time::second_t timeoutSeconds) final
9731 {
9732 return GetConfigurator().ClearStickyFault_SupplyCurrLimit(timeoutSeconds);
9733 }
9734 /**
9735 * \brief Clear sticky fault: Supply current limit occured.
9736 *
9737 * This will wait up to 0.100 seconds (100ms) by default.
9738 *
9739 * \returns StatusCode of the set command
9740 */
9742 {
9743 return ClearStickyFault_SupplyCurrLimit(0.100_s);
9744 }
9745
9746 /**
9747 * \brief Clear sticky fault: Using Fused CANcoder feature while
9748 * unlicensed. Device has fallen back to remote CANcoder.
9749 *
9750 * \param timeoutSeconds Maximum time to wait up to in seconds.
9751 * \returns StatusCode of the set command
9752 */
9754 {
9755 return GetConfigurator().ClearStickyFault_UsingFusedCANcoderWhileUnlicensed(timeoutSeconds);
9756 }
9757 /**
9758 * \brief Clear sticky fault: Using Fused CANcoder feature while
9759 * unlicensed. Device has fallen back to remote CANcoder.
9760 *
9761 * This will wait up to 0.100 seconds (100ms) by default.
9762 *
9763 * \returns StatusCode of the set command
9764 */
9766 {
9767 return ClearStickyFault_UsingFusedCANcoderWhileUnlicensed(0.100_s);
9768 }
9769
9770 /**
9771 * \brief Clear sticky fault: Static brake was momentarily disabled
9772 * due to excessive braking current while disabled.
9773 *
9774 * \param timeoutSeconds Maximum time to wait up to in seconds.
9775 * \returns StatusCode of the set command
9776 */
9777 ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled(units::time::second_t timeoutSeconds) final
9778 {
9779 return GetConfigurator().ClearStickyFault_StaticBrakeDisabled(timeoutSeconds);
9780 }
9781 /**
9782 * \brief Clear sticky fault: Static brake was momentarily disabled
9783 * due to excessive braking current while disabled.
9784 *
9785 * This will wait up to 0.100 seconds (100ms) by default.
9786 *
9787 * \returns StatusCode of the set command
9788 */
9790 {
9791 return ClearStickyFault_StaticBrakeDisabled(0.100_s);
9792 }
9793
9794 /**
9795 * \brief Clear sticky fault: Bridge was disabled most likely due to a
9796 * short in the motor leads.
9797 *
9798 * \param timeoutSeconds Maximum time to wait up to in seconds.
9799 * \returns StatusCode of the set command
9800 */
9801 ctre::phoenix::StatusCode ClearStickyFault_BridgeShort(units::time::second_t timeoutSeconds) final
9802 {
9803 return GetConfigurator().ClearStickyFault_BridgeShort(timeoutSeconds);
9804 }
9805 /**
9806 * \brief Clear sticky fault: Bridge was disabled most likely due to a
9807 * short in the motor leads.
9808 *
9809 * This will wait up to 0.100 seconds (100ms) by default.
9810 *
9811 * \returns StatusCode of the set command
9812 */
9814 {
9815 return ClearStickyFault_BridgeShort(0.100_s);
9816 }
9817
9818 /**
9819 * \brief Clear sticky fault: Hall sensor signals are invalid. Check
9820 * hall sensor and cabling. This fault can be used to detect when
9821 * hall cable is unplugged.
9822 *
9823 * \param timeoutSeconds Maximum time to wait up to in seconds.
9824 * \returns StatusCode of the set command
9825 */
9826 ctre::phoenix::StatusCode ClearStickyFault_HallSensorMissing(units::time::second_t timeoutSeconds) final
9827 {
9828 return GetConfigurator().ClearStickyFault_HallSensorMissing(timeoutSeconds);
9829 }
9830 /**
9831 * \brief Clear sticky fault: Hall sensor signals are invalid. Check
9832 * hall sensor and cabling. This fault can be used to detect when
9833 * hall cable is unplugged.
9834 *
9835 * This will wait up to 0.100 seconds (100ms) by default.
9836 *
9837 * \returns StatusCode of the set command
9838 */
9840 {
9841 return ClearStickyFault_HallSensorMissing(0.100_s);
9842 }
9843
9844 /**
9845 * \brief Clear sticky fault: Hall sensor signals are invalid during
9846 * motor drive, so motor was disabled. Check hall sensor and cabling.
9847 *
9848 * \param timeoutSeconds Maximum time to wait up to in seconds.
9849 * \returns StatusCode of the set command
9850 */
9852 {
9853 return GetConfigurator().ClearStickyFault_DriveDisabledHallSensor(timeoutSeconds);
9854 }
9855 /**
9856 * \brief Clear sticky fault: Hall sensor signals are invalid during
9857 * motor drive, so motor was disabled. Check hall sensor and cabling.
9858 *
9859 * This will wait up to 0.100 seconds (100ms) by default.
9860 *
9861 * \returns StatusCode of the set command
9862 */
9864 {
9865 return ClearStickyFault_DriveDisabledHallSensor(0.100_s);
9866 }
9867
9868 /**
9869 * \brief Clear sticky fault: Motor temperature signal appears to not
9870 * be connected.
9871 *
9872 * \param timeoutSeconds Maximum time to wait up to in seconds.
9873 * \returns StatusCode of the set command
9874 */
9875 ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorMissing(units::time::second_t timeoutSeconds) final
9876 {
9877 return GetConfigurator().ClearStickyFault_MotorTempSensorMissing(timeoutSeconds);
9878 }
9879 /**
9880 * \brief Clear sticky fault: Motor temperature signal appears to not
9881 * be connected.
9882 *
9883 * This will wait up to 0.100 seconds (100ms) by default.
9884 *
9885 * \returns StatusCode of the set command
9886 */
9888 {
9889 return ClearStickyFault_MotorTempSensorMissing(0.100_s);
9890 }
9891
9892 /**
9893 * \brief Clear sticky fault: Motor temperature signal indicates motor
9894 * is too hot.
9895 *
9896 * \param timeoutSeconds Maximum time to wait up to in seconds.
9897 * \returns StatusCode of the set command
9898 */
9899 ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorTooHot(units::time::second_t timeoutSeconds) final
9900 {
9901 return GetConfigurator().ClearStickyFault_MotorTempSensorTooHot(timeoutSeconds);
9902 }
9903 /**
9904 * \brief Clear sticky fault: Motor temperature signal indicates motor
9905 * is too hot.
9906 *
9907 * This will wait up to 0.100 seconds (100ms) by default.
9908 *
9909 * \returns StatusCode of the set command
9910 */
9912 {
9913 return ClearStickyFault_MotorTempSensorTooHot(0.100_s);
9914 }
9915
9916 /**
9917 * \brief Clear sticky fault: Motor arrangement has not been set in
9918 * configuration.
9919 *
9920 * \param timeoutSeconds Maximum time to wait up to in seconds.
9921 * \returns StatusCode of the set command
9922 */
9924 {
9925 return GetConfigurator().ClearStickyFault_MotorArrangementNotSelected(timeoutSeconds);
9926 }
9927 /**
9928 * \brief Clear sticky fault: Motor arrangement has not been set in
9929 * configuration.
9930 *
9931 * This will wait up to 0.100 seconds (100ms) by default.
9932 *
9933 * \returns StatusCode of the set command
9934 */
9936 {
9937 return ClearStickyFault_MotorArrangementNotSelected(0.100_s);
9938 }
9939};
9940
9941#if defined(_WIN32) || defined(_WIN64)
9942#pragma warning(pop)
9943#endif
9944
9945}
9946}
9947
9948}
9949}
9950
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:9697
ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV() final
Clear sticky fault: Supply Voltage is unstable.
Definition CoreTalonFXS.hpp:9493
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow() final
Clear sticky fault: The remote sensor position has overflowed.
Definition CoreTalonFXS.hpp:9445
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:9777
ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds) final
Clear sticky fault: Hardware fault occurred.
Definition CoreTalonFXS.hpp:9218
ctre::phoenix::StatusCode ClearStickyFault_HallSensorMissing() final
Clear sticky fault: Hall sensor signals are invalid.
Definition CoreTalonFXS.hpp:9839
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:9875
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid() final
Clear sticky fault: The remote sensor's data is no longer trusted.
Definition CoreTalonFXS.hpp:9667
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable() final
Clear sticky fault: Device boot while detecting the enable signal.
Definition CoreTalonFXS.hpp:9321
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow(units::time::second_t timeoutSeconds) final
Clear sticky fault: The remote sensor position has overflowed.
Definition CoreTalonFXS.hpp:9430
ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit(units::time::second_t timeoutSeconds) final
Clear sticky fault: Reverse soft limit has been asserted.
Definition CoreTalonFXS.hpp:9553
ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit() final
Clear sticky fault: Forward limit switch has been asserted.
Definition CoreTalonFXS.hpp:9541
ctre::phoenix::StatusCode ClearStickyFaults() final
Clear the sticky faults in the device.
Definition CoreTalonFXS.hpp:9207
ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed(units::time::second_t timeoutSeconds) final
Clear sticky fault: Using Fused CANcoder feature while unlicensed.
Definition CoreTalonFXS.hpp:9753
ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit() final
Clear sticky fault: Stator current limit occured.
Definition CoreTalonFXS.hpp:9719
ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit(units::time::second_t timeoutSeconds) final
Clear sticky fault: Stator current limit occured.
Definition CoreTalonFXS.hpp:9708
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:9923
ctre::phoenix::StatusCode ClearStickyFault_DriveDisabledHallSensor() final
Clear sticky fault: Hall sensor signals are invalid during motor drive, so motor was disabled.
Definition CoreTalonFXS.hpp:9863
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:9601
ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds) final
Clear the sticky faults in the device.
Definition CoreTalonFXS.hpp:9192
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:9415
ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit() final
Clear sticky fault: Reverse limit switch has been asserted.
Definition CoreTalonFXS.hpp:9517
ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled() final
Clear sticky fault: Static brake was momentarily disabled due to excessive braking current while disa...
Definition CoreTalonFXS.hpp:9789
ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote() final
Clear sticky fault: The remote soft limit device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:9613
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:9652
ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV(units::time::second_t timeoutSeconds) final
Clear sticky fault: Supply Voltage is unstable.
Definition CoreTalonFXS.hpp:9481
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:9357
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp(units::time::second_t timeoutSeconds) final
Clear sticky fault: Device temperature exceeded limit.
Definition CoreTalonFXS.hpp:9262
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:9403
ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit() final
Clear sticky fault: Reverse soft limit has been asserted.
Definition CoreTalonFXS.hpp:9565
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:9625
ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit(units::time::second_t timeoutSeconds) final
Clear sticky fault: Reverse limit switch has been asserted.
Definition CoreTalonFXS.hpp:9505
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:9935
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:9240
ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote() final
Clear sticky fault: The remote limit switch device is not present on CAN Bus.
Definition CoreTalonFXS.hpp:9637
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorTooHot() final
Clear sticky fault: Motor temperature signal indicates motor is too hot.
Definition CoreTalonFXS.hpp:9911
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset() final
Clear sticky fault: The remote sensor has reset.
Definition CoreTalonFXS.hpp:9391
ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit(units::time::second_t timeoutSeconds) final
Clear sticky fault: Forward limit switch has been asserted.
Definition CoreTalonFXS.hpp:9529
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:9801
ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout() final
Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low.
Definition CoreTalonFXS.hpp:9369
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:9899
ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit() final
Clear sticky fault: Forward soft limit has been asserted.
Definition CoreTalonFXS.hpp:9589
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:9285
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse() final
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
Definition CoreTalonFXS.hpp:9345
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:9682
ctre::phoenix::StatusCode ClearStickyFault_HallSensorMissing(units::time::second_t timeoutSeconds) final
Clear sticky fault: Hall sensor signals are invalid.
Definition CoreTalonFXS.hpp:9826
ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV() final
Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device.
Definition CoreTalonFXS.hpp:9469
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:9730
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage() final
Clear sticky fault: Device supply voltage dropped to near brownout levels.
Definition CoreTalonFXS.hpp:9297
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:9457
ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit() final
Clear sticky fault: Supply current limit occured.
Definition CoreTalonFXS.hpp:9741
ctre::phoenix::StatusCode ClearStickyFault_ProcTemp() final
Clear sticky fault: Processor temperature exceeded limit.
Definition CoreTalonFXS.hpp:9251
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:9851
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset(units::time::second_t timeoutSeconds) final
Clear sticky fault: The remote sensor has reset.
Definition CoreTalonFXS.hpp:9380
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:9333
ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed() final
Clear sticky fault: Using Fused CANcoder feature while unlicensed.
Definition CoreTalonFXS.hpp:9765
ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue) final
Sets the mechanism position of the device in mechanism rotations.
Definition CoreTalonFXS.hpp:9177
ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit(units::time::second_t timeoutSeconds) final
Clear sticky fault: Forward soft limit has been asserted.
Definition CoreTalonFXS.hpp:9577
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp() final
Clear sticky fault: Device temperature exceeded limit.
Definition CoreTalonFXS.hpp:9273
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable(units::time::second_t timeoutSeconds) final
Clear sticky fault: Device boot while detecting the enable signal.
Definition CoreTalonFXS.hpp:9309
ctre::phoenix::StatusCode ClearStickyFault_Hardware() final
Clear sticky fault: Hardware fault occurred.
Definition CoreTalonFXS.hpp:9229
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:9813
ctre::phoenix::StatusCode ClearStickyFault_MotorTempSensorMissing() final
Clear sticky fault: Motor temperature signal appears to not be connected.
Definition CoreTalonFXS.hpp:9887
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