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