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