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