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