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