CTRE Phoenix 6 C++ 26.0.0-beta-1
Loading...
Searching...
No Matches
HasTalonSignals.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
13
15#include <units/angle.h>
16#include <units/angular_acceleration.h>
17#include <units/angular_velocity.h>
18#include <units/current.h>
19#include <units/dimensionless.h>
20#include <units/temperature.h>
21#include <units/voltage.h>
22
23namespace ctre {
24namespace phoenix6 {
25namespace hardware {
26namespace traits {
27
28/**
29 * Contains all status signals available for devices that support Talon signals.
30 */
31class HasTalonSignals : public virtual CommonDevice
32{
33public:
34 virtual ~HasTalonSignals() = default;
35
36 /**
37 * \brief App Major Version number.
38 *
39 * - Minimum Value: 0
40 * - Maximum Value: 255
41 * - Default Value: 0
42 * - Units:
43 *
44 * This refreshes and returns a cached StatusSignal object.
45 *
46 * \param refresh Whether to refresh the StatusSignal before returning it;
47 * defaults to true
48 * \returns VersionMajor Status Signal Object
49 */
50 virtual StatusSignal<int> &GetVersionMajor(bool refresh = true) = 0;
51
52 /**
53 * \brief App Minor Version number.
54 *
55 * - Minimum Value: 0
56 * - Maximum Value: 255
57 * - Default Value: 0
58 * - Units:
59 *
60 * This refreshes and returns a cached StatusSignal object.
61 *
62 * \param refresh Whether to refresh the StatusSignal before returning it;
63 * defaults to true
64 * \returns VersionMinor Status Signal Object
65 */
66 virtual StatusSignal<int> &GetVersionMinor(bool refresh = true) = 0;
67
68 /**
69 * \brief App Bugfix Version number.
70 *
71 * - Minimum Value: 0
72 * - Maximum Value: 255
73 * - Default Value: 0
74 * - Units:
75 *
76 * This refreshes and returns a cached StatusSignal object.
77 *
78 * \param refresh Whether to refresh the StatusSignal before returning it;
79 * defaults to true
80 * \returns VersionBugfix Status Signal Object
81 */
82 virtual StatusSignal<int> &GetVersionBugfix(bool refresh = true) = 0;
83
84 /**
85 * \brief App Build Version number.
86 *
87 * - Minimum Value: 0
88 * - Maximum Value: 255
89 * - Default Value: 0
90 * - Units:
91 *
92 * This refreshes and returns a cached StatusSignal object.
93 *
94 * \param refresh Whether to refresh the StatusSignal before returning it;
95 * defaults to true
96 * \returns VersionBuild Status Signal Object
97 */
98 virtual StatusSignal<int> &GetVersionBuild(bool refresh = true) = 0;
99
100 /**
101 * \brief Full Version of firmware in device. The format is a four
102 * byte value.
103 *
104 * - Minimum Value: 0
105 * - Maximum Value: 4294967295
106 * - Default Value: 0
107 * - Units:
108 *
109 * This refreshes and returns a cached StatusSignal object.
110 *
111 * \param refresh Whether to refresh the StatusSignal before returning it;
112 * defaults to true
113 * \returns Version Status Signal Object
114 */
115 virtual StatusSignal<int> &GetVersion(bool refresh = true) = 0;
116
117 /**
118 * \brief Integer representing all fault flags reported by the device.
119 *
120 * \details These are device specific and are not used directly in
121 * typical applications. Use the signal specific GetFault_*() methods
122 * instead.
123 *
124 * - Minimum Value: 0
125 * - Maximum Value: 4294967295
126 * - Default Value: 0
127 * - Units:
128 *
129 * This refreshes and returns a cached StatusSignal object.
130 *
131 * \param refresh Whether to refresh the StatusSignal before returning it;
132 * defaults to true
133 * \returns FaultField Status Signal Object
134 */
135 virtual StatusSignal<int> &GetFaultField(bool refresh = true) = 0;
136
137 /**
138 * \brief Integer representing all (persistent) sticky fault flags
139 * reported by the device.
140 *
141 * \details These are device specific and are not used directly in
142 * typical applications. Use the signal specific GetStickyFault_*()
143 * methods instead.
144 *
145 * - Minimum Value: 0
146 * - Maximum Value: 4294967295
147 * - Default Value: 0
148 * - Units:
149 *
150 * This refreshes and returns a cached StatusSignal object.
151 *
152 * \param refresh Whether to refresh the StatusSignal before returning it;
153 * defaults to true
154 * \returns StickyFaultField Status Signal Object
155 */
156 virtual StatusSignal<int> &GetStickyFaultField(bool refresh = true) = 0;
157
158 /**
159 * \brief The applied (output) motor voltage.
160 *
161 * - Minimum Value: -40.96
162 * - Maximum Value: 40.95
163 * - Default Value: 0
164 * - Units: V
165 *
166 * This refreshes and returns a cached StatusSignal object.
167 *
168 * \param refresh Whether to refresh the StatusSignal before returning it;
169 * defaults to true
170 * \returns MotorVoltage Status Signal Object
171 */
172 virtual StatusSignal<units::voltage::volt_t> &GetMotorVoltage(bool refresh = true) = 0;
173
174 /**
175 * \brief Forward Limit Pin.
176 *
177 *
178 * This refreshes and returns a cached StatusSignal object.
179 *
180 * \param refresh Whether to refresh the StatusSignal before returning it;
181 * defaults to true
182 * \returns ForwardLimit Status Signal Object
183 */
185
186 /**
187 * \brief Reverse Limit Pin.
188 *
189 *
190 * This refreshes and returns a cached StatusSignal object.
191 *
192 * \param refresh Whether to refresh the StatusSignal before returning it;
193 * defaults to true
194 * \returns ReverseLimit Status Signal Object
195 */
197
198 /**
199 * \brief The applied rotor polarity as seen from the front of the
200 * motor. This typically is determined by the Inverted config, but
201 * can be overridden if using Follower features.
202 *
203 *
204 * This refreshes and returns a cached StatusSignal object.
205 *
206 * \param refresh Whether to refresh the StatusSignal before returning it;
207 * defaults to true
208 * \returns AppliedRotorPolarity Status Signal Object
209 */
211
212 /**
213 * \brief The applied motor duty cycle.
214 *
215 * - Minimum Value: -2.0
216 * - Maximum Value: 1.9990234375
217 * - Default Value: 0
218 * - Units: fractional
219 *
220 * This refreshes and returns a cached StatusSignal object.
221 *
222 * \param refresh Whether to refresh the StatusSignal before returning it;
223 * defaults to true
224 * \returns DutyCycle Status Signal Object
225 */
227
228 /**
229 * \brief Current corresponding to the torque output by the motor.
230 * Similar to StatorCurrent. Users will likely prefer this current to
231 * calculate the applied torque to the rotor.
232 *
233 * \details Stator current where positive current means torque is
234 * applied in the forward direction as determined by the Inverted
235 * setting.
236 *
237 * - Minimum Value: -327.68
238 * - Maximum Value: 327.67
239 * - Default Value: 0
240 * - Units: A
241 *
242 * This refreshes and returns a cached StatusSignal object.
243 *
244 * \param refresh Whether to refresh the StatusSignal before returning it;
245 * defaults to true
246 * \returns TorqueCurrent Status Signal Object
247 */
249
250 /**
251 * \brief Current corresponding to the stator windings. Similar to
252 * TorqueCurrent. Users will likely prefer TorqueCurrent over
253 * StatorCurrent.
254 *
255 * \details Stator current where Positive current indicates motoring
256 * regardless of direction. Negative current indicates regenerative
257 * braking regardless of direction.
258 *
259 * - Minimum Value: -327.68
260 * - Maximum Value: 327.66
261 * - Default Value: 0
262 * - Units: A
263 *
264 * This refreshes and returns a cached StatusSignal object.
265 *
266 * \param refresh Whether to refresh the StatusSignal before returning it;
267 * defaults to true
268 * \returns StatorCurrent Status Signal Object
269 */
271
272 /**
273 * \brief Measured supply side current.
274 *
275 * - Minimum Value: -327.68
276 * - Maximum Value: 327.66
277 * - Default Value: 0
278 * - Units: A
279 *
280 * This refreshes and returns a cached StatusSignal object.
281 *
282 * \param refresh Whether to refresh the StatusSignal before returning it;
283 * defaults to true
284 * \returns SupplyCurrent Status Signal Object
285 */
287
288 /**
289 * \brief Measured supply voltage to the device.
290 *
291 * - Minimum Value: 4
292 * - Maximum Value: 29.575
293 * - Default Value: 4
294 * - Units: V
295 *
296 * This refreshes and returns a cached StatusSignal object.
297 *
298 * \param refresh Whether to refresh the StatusSignal before returning it;
299 * defaults to true
300 * \returns SupplyVoltage Status Signal Object
301 */
303
304 /**
305 * \brief Temperature of device.
306 *
307 * \details This is the temperature that the device measures itself to
308 * be at. Similar to Processor Temperature.
309 *
310 * - Minimum Value: 0.0
311 * - Maximum Value: 255.0
312 * - Default Value: 0
313 * - Units: ℃
314 *
315 * This refreshes and returns a cached StatusSignal object.
316 *
317 * \param refresh Whether to refresh the StatusSignal before returning it;
318 * defaults to true
319 * \returns DeviceTemp Status Signal Object
320 */
322
323 /**
324 * \brief Temperature of the processor.
325 *
326 * \details This is the temperature that the processor measures itself
327 * to be at. Similar to Device Temperature.
328 *
329 * - Minimum Value: 0.0
330 * - Maximum Value: 255.0
331 * - Default Value: 0
332 * - Units: ℃
333 *
334 * This refreshes and returns a cached StatusSignal object.
335 *
336 * \param refresh Whether to refresh the StatusSignal before returning it;
337 * defaults to true
338 * \returns ProcessorTemp Status Signal Object
339 */
341
342 /**
343 * \brief Velocity of the motor rotor. This velocity is not affected
344 * by any feedback configs.
345 *
346 * - Minimum Value: -512.0
347 * - Maximum Value: 511.998046875
348 * - Default Value: 0
349 * - Units: rotations per second
350 *
351 * This refreshes and returns a cached StatusSignal object.
352 *
353 * \param refresh Whether to refresh the StatusSignal before returning it;
354 * defaults to true
355 * \returns RotorVelocity Status Signal Object
356 */
358
359 /**
360 * \brief Position of the motor rotor. This position is only affected
361 * by the RotorOffset config and calls to setPosition.
362 *
363 * - Minimum Value: -16384.0
364 * - Maximum Value: 16383.999755859375
365 * - Default Value: 0
366 * - Units: rotations
367 *
368 * This refreshes and returns a cached StatusSignal object.
369 *
370 * \param refresh Whether to refresh the StatusSignal before returning it;
371 * defaults to true
372 * \returns RotorPosition Status Signal Object
373 */
374 virtual StatusSignal<units::angle::turn_t> &GetRotorPosition(bool refresh = true) = 0;
375
376 /**
377 * \brief Velocity of the device in mechanism rotations per second.
378 * This can be the velocity of a remote sensor and is affected by the
379 * RotorToSensorRatio and SensorToMechanismRatio configs.
380 *
381 * - Minimum Value: -512.0
382 * - Maximum Value: 511.998046875
383 * - Default Value: 0
384 * - Units: rotations per second
385 *
386 * This refreshes and returns a cached StatusSignal object.
387 *
388 * \param refresh Whether to refresh the StatusSignal before returning it;
389 * defaults to true
390 * \returns Velocity Status Signal Object
391 */
393
394 /**
395 * \brief Position of the device in mechanism rotations. This can be
396 * the position of a remote sensor and is affected by the
397 * RotorToSensorRatio and SensorToMechanismRatio configs, as well as
398 * calls to setPosition.
399 *
400 * - Minimum Value: -16384.0
401 * - Maximum Value: 16383.999755859375
402 * - Default Value: 0
403 * - Units: rotations
404 *
405 * This refreshes and returns a cached StatusSignal object.
406 *
407 * \param refresh Whether to refresh the StatusSignal before returning it;
408 * defaults to true
409 * \returns Position Status Signal Object
410 */
411 virtual StatusSignal<units::angle::turn_t> &GetPosition(bool refresh = true) = 0;
412
413 /**
414 * \brief Acceleration of the device in mechanism rotations per
415 * second². This can be the acceleration of a remote sensor and is
416 * affected by the RotorToSensorRatio and SensorToMechanismRatio
417 * configs.
418 *
419 * - Minimum Value: -2048.0
420 * - Maximum Value: 2047.75
421 * - Default Value: 0
422 * - Units: rotations per second²
423 *
424 * This refreshes and returns a cached StatusSignal object.
425 *
426 * \param refresh Whether to refresh the StatusSignal before returning it;
427 * defaults to true
428 * \returns Acceleration Status Signal Object
429 */
431
432 /**
433 * \brief The active control mode of the motor controller.
434 *
435 *
436 * This refreshes and returns a cached StatusSignal object.
437 *
438 * \param refresh Whether to refresh the StatusSignal before returning it;
439 * defaults to true
440 * \returns ControlMode Status Signal Object
441 */
443
444 /**
445 * \brief Check if the Motion Magic® profile has reached the target.
446 * This is equivalent to checking that MotionMagicIsRunning, the
447 * ClosedLoopReference is the target, and the ClosedLoopReferenceSlope
448 * is 0.
449 *
450 * - Default Value: False
451 *
452 * This refreshes and returns a cached StatusSignal object.
453 *
454 * \param refresh Whether to refresh the StatusSignal before returning it;
455 * defaults to true
456 * \returns MotionMagicAtTarget Status Signal Object
457 */
458 virtual StatusSignal<bool> &GetMotionMagicAtTarget(bool refresh = true) = 0;
459
460 /**
461 * \brief Check if Motion Magic® is running. This is equivalent to
462 * checking that the reported control mode is a Motion Magic® based
463 * mode.
464 *
465 * - Default Value: False
466 *
467 * This refreshes and returns a cached StatusSignal object.
468 *
469 * \param refresh Whether to refresh the StatusSignal before returning it;
470 * defaults to true
471 * \returns MotionMagicIsRunning Status Signal Object
472 */
473 virtual StatusSignal<bool> &GetMotionMagicIsRunning(bool refresh = true) = 0;
474
475 /**
476 * \brief Indicates if the robot is enabled.
477 *
478 *
479 * This refreshes and returns a cached StatusSignal object.
480 *
481 * \param refresh Whether to refresh the StatusSignal before returning it;
482 * defaults to true
483 * \returns RobotEnable Status Signal Object
484 */
486
487 /**
488 * \brief Indicates if device is actuator enabled.
489 *
490 *
491 * This refreshes and returns a cached StatusSignal object.
492 *
493 * \param refresh Whether to refresh the StatusSignal before returning it;
494 * defaults to true
495 * \returns DeviceEnable Status Signal Object
496 */
498
499 /**
500 * \brief The slot that the closed-loop PID is using.
501 *
502 * - Minimum Value: 0
503 * - Maximum Value: 2
504 * - Default Value: 0
505 * - Units:
506 *
507 * This refreshes and returns a cached StatusSignal object.
508 *
509 * \param refresh Whether to refresh the StatusSignal before returning it;
510 * defaults to true
511 * \returns ClosedLoopSlot Status Signal Object
512 */
513 virtual StatusSignal<int> &GetClosedLoopSlot(bool refresh = true) = 0;
514
515 /**
516 * \brief Assess the status of the motor output with respect to load
517 * and supply.
518 *
519 * \details This routine can be used to determine the general status
520 * of motor commutation.
521 *
522 *
523 * This refreshes and returns a cached StatusSignal object.
524 *
525 * \param refresh Whether to refresh the StatusSignal before returning it;
526 * defaults to true
527 * \returns MotorOutputStatus Status Signal Object
528 */
530
531 /**
532 * \brief The active control mode of the differential controller.
533 *
534 *
535 * This refreshes and returns a cached StatusSignal object.
536 *
537 * \param refresh Whether to refresh the StatusSignal before returning it;
538 * defaults to true
539 * \returns DifferentialControlMode Status Signal Object
540 */
542
543 /**
544 * \brief Average component of the differential velocity of device.
545 *
546 * - Minimum Value: -512.0
547 * - Maximum Value: 511.998046875
548 * - Default Value: 0
549 * - Units: rotations per second
550 *
551 * This refreshes and returns a cached StatusSignal object.
552 *
553 * \param refresh Whether to refresh the StatusSignal before returning it;
554 * defaults to true
555 * \returns DifferentialAverageVelocity Status Signal Object
556 */
558
559 /**
560 * \brief Average component of the differential position of device.
561 *
562 * - Minimum Value: -16384.0
563 * - Maximum Value: 16383.999755859375
564 * - Default Value: 0
565 * - Units: rotations
566 *
567 * This refreshes and returns a cached StatusSignal object.
568 *
569 * \param refresh Whether to refresh the StatusSignal before returning it;
570 * defaults to true
571 * \returns DifferentialAveragePosition Status Signal Object
572 */
574
575 /**
576 * \brief Difference component of the differential velocity of device.
577 *
578 * - Minimum Value: -512.0
579 * - Maximum Value: 511.998046875
580 * - Default Value: 0
581 * - Units: rotations per second
582 *
583 * This refreshes and returns a cached StatusSignal object.
584 *
585 * \param refresh Whether to refresh the StatusSignal before returning it;
586 * defaults to true
587 * \returns DifferentialDifferenceVelocity Status Signal Object
588 */
590
591 /**
592 * \brief Difference component of the differential position of device.
593 *
594 * - Minimum Value: -16384.0
595 * - Maximum Value: 16383.999755859375
596 * - Default Value: 0
597 * - Units: rotations
598 *
599 * This refreshes and returns a cached StatusSignal object.
600 *
601 * \param refresh Whether to refresh the StatusSignal before returning it;
602 * defaults to true
603 * \returns DifferentialDifferencePosition Status Signal Object
604 */
606
607 /**
608 * \brief The slot that the closed-loop differential PID is using.
609 *
610 * - Minimum Value: 0
611 * - Maximum Value: 2
612 * - Default Value: 0
613 * - Units:
614 *
615 * This refreshes and returns a cached StatusSignal object.
616 *
617 * \param refresh Whether to refresh the StatusSignal before returning it;
618 * defaults to true
619 * \returns DifferentialClosedLoopSlot Status Signal Object
620 */
621 virtual StatusSignal<int> &GetDifferentialClosedLoopSlot(bool refresh = true) = 0;
622
623 /**
624 * \brief The torque constant (K_T) of the motor.
625 *
626 * - Minimum Value: 0.0
627 * - Maximum Value: 0.025500000000000002
628 * - Default Value: 0
629 * - Units: Nm/A
630 *
631 * This refreshes and returns a cached StatusSignal object.
632 *
633 * \param refresh Whether to refresh the StatusSignal before returning it;
634 * defaults to true
635 * \returns MotorKT Status Signal Object
636 */
638
639 /**
640 * \brief The velocity constant (K_V) of the motor.
641 *
642 * - Minimum Value: 0.0
643 * - Maximum Value: 2047.0
644 * - Default Value: 0
645 * - Units: RPM/V
646 *
647 * This refreshes and returns a cached StatusSignal object.
648 *
649 * \param refresh Whether to refresh the StatusSignal before returning it;
650 * defaults to true
651 * \returns MotorKV Status Signal Object
652 */
653 virtual StatusSignal<ctre::unit::rpm_per_volt_t> &GetMotorKV(bool refresh = true) = 0;
654
655 /**
656 * \brief The stall current of the motor at 12 V output.
657 *
658 * - Minimum Value: 0.0
659 * - Maximum Value: 1023.0
660 * - Default Value: 0
661 * - Units: A
662 *
663 * This refreshes and returns a cached StatusSignal object.
664 *
665 * \param refresh Whether to refresh the StatusSignal before returning it;
666 * defaults to true
667 * \returns MotorStallCurrent Status Signal Object
668 */
670
671 /**
672 * \brief The applied output of the bridge.
673 *
674 *
675 * This refreshes and returns a cached StatusSignal object.
676 *
677 * \param refresh Whether to refresh the StatusSignal before returning it;
678 * defaults to true
679 * \returns BridgeOutput Status Signal Object
680 */
682
683 /**
684 * \brief Whether the device is Phoenix Pro licensed.
685 *
686 * - Default Value: False
687 *
688 * This refreshes and returns a cached StatusSignal object.
689 *
690 * \param refresh Whether to refresh the StatusSignal before returning it;
691 * defaults to true
692 * \returns IsProLicensed Status Signal Object
693 */
694 virtual StatusSignal<bool> &GetIsProLicensed(bool refresh = true) = 0;
695
696 /**
697 * \brief Temperature of device from second sensor.
698 *
699 * \details Newer versions of Talon have multiple temperature
700 * measurement methods.
701 *
702 * - Minimum Value: 0.0
703 * - Maximum Value: 255.0
704 * - Default Value: 0
705 * - Units: ℃
706 *
707 * This refreshes and returns a cached StatusSignal object.
708 *
709 * \param refresh Whether to refresh the StatusSignal before returning it;
710 * defaults to true
711 * \returns AncillaryDeviceTemp Status Signal Object
712 */
714
715 /**
716 * \brief The type of motor attached to the Talon.
717 *
718 * \details This can be used to determine what motor is attached to
719 * the Talon FX. Return will be "Unknown" if firmware is too old or
720 * device is not present.
721 *
722 *
723 * This refreshes and returns a cached StatusSignal object.
724 *
725 * \param refresh Whether to refresh the StatusSignal before returning it;
726 * defaults to true
727 * \returns ConnectedMotor Status Signal Object
728 */
730
731 /**
732 * \brief Hardware fault occurred
733 *
734 * - Default Value: False
735 *
736 * This refreshes and returns a cached StatusSignal object.
737 *
738 * \param refresh Whether to refresh the StatusSignal before returning it;
739 * defaults to true
740 * \returns Fault_Hardware Status Signal Object
741 */
742 virtual StatusSignal<bool> &GetFault_Hardware(bool refresh = true) = 0;
743
744 /**
745 * \brief Hardware fault occurred
746 *
747 * - Default Value: False
748 *
749 * This refreshes and returns a cached StatusSignal object.
750 *
751 * \param refresh Whether to refresh the StatusSignal before returning it;
752 * defaults to true
753 * \returns StickyFault_Hardware Status Signal Object
754 */
755 virtual StatusSignal<bool> &GetStickyFault_Hardware(bool refresh = true) = 0;
756
757 /**
758 * \brief Processor temperature exceeded limit
759 *
760 * - Default Value: False
761 *
762 * This refreshes and returns a cached StatusSignal object.
763 *
764 * \param refresh Whether to refresh the StatusSignal before returning it;
765 * defaults to true
766 * \returns Fault_ProcTemp Status Signal Object
767 */
768 virtual StatusSignal<bool> &GetFault_ProcTemp(bool refresh = true) = 0;
769
770 /**
771 * \brief Processor temperature exceeded limit
772 *
773 * - Default Value: False
774 *
775 * This refreshes and returns a cached StatusSignal object.
776 *
777 * \param refresh Whether to refresh the StatusSignal before returning it;
778 * defaults to true
779 * \returns StickyFault_ProcTemp Status Signal Object
780 */
781 virtual StatusSignal<bool> &GetStickyFault_ProcTemp(bool refresh = true) = 0;
782
783 /**
784 * \brief Device temperature exceeded limit
785 *
786 * - Default Value: False
787 *
788 * This refreshes and returns a cached StatusSignal object.
789 *
790 * \param refresh Whether to refresh the StatusSignal before returning it;
791 * defaults to true
792 * \returns Fault_DeviceTemp Status Signal Object
793 */
794 virtual StatusSignal<bool> &GetFault_DeviceTemp(bool refresh = true) = 0;
795
796 /**
797 * \brief Device temperature exceeded limit
798 *
799 * - Default Value: False
800 *
801 * This refreshes and returns a cached StatusSignal object.
802 *
803 * \param refresh Whether to refresh the StatusSignal before returning it;
804 * defaults to true
805 * \returns StickyFault_DeviceTemp Status Signal Object
806 */
807 virtual StatusSignal<bool> &GetStickyFault_DeviceTemp(bool refresh = true) = 0;
808
809 /**
810 * \brief Device supply voltage dropped to near brownout levels
811 *
812 * - Default Value: False
813 *
814 * This refreshes and returns a cached StatusSignal object.
815 *
816 * \param refresh Whether to refresh the StatusSignal before returning it;
817 * defaults to true
818 * \returns Fault_Undervoltage Status Signal Object
819 */
820 virtual StatusSignal<bool> &GetFault_Undervoltage(bool refresh = true) = 0;
821
822 /**
823 * \brief Device supply voltage dropped to near brownout levels
824 *
825 * - Default Value: False
826 *
827 * This refreshes and returns a cached StatusSignal object.
828 *
829 * \param refresh Whether to refresh the StatusSignal before returning it;
830 * defaults to true
831 * \returns StickyFault_Undervoltage Status Signal Object
832 */
833 virtual StatusSignal<bool> &GetStickyFault_Undervoltage(bool refresh = true) = 0;
834
835 /**
836 * \brief Device boot while detecting the enable signal
837 *
838 * - Default Value: False
839 *
840 * This refreshes and returns a cached StatusSignal object.
841 *
842 * \param refresh Whether to refresh the StatusSignal before returning it;
843 * defaults to true
844 * \returns Fault_BootDuringEnable Status Signal Object
845 */
846 virtual StatusSignal<bool> &GetFault_BootDuringEnable(bool refresh = true) = 0;
847
848 /**
849 * \brief Device boot while detecting the enable signal
850 *
851 * - Default Value: False
852 *
853 * This refreshes and returns a cached StatusSignal object.
854 *
855 * \param refresh Whether to refresh the StatusSignal before returning it;
856 * defaults to true
857 * \returns StickyFault_BootDuringEnable Status Signal Object
858 */
859 virtual StatusSignal<bool> &GetStickyFault_BootDuringEnable(bool refresh = true) = 0;
860
861 /**
862 * \brief An unlicensed feature is in use, device may not behave as
863 * expected.
864 *
865 * - Default Value: False
866 *
867 * This refreshes and returns a cached StatusSignal object.
868 *
869 * \param refresh Whether to refresh the StatusSignal before returning it;
870 * defaults to true
871 * \returns Fault_UnlicensedFeatureInUse Status Signal Object
872 */
873 virtual StatusSignal<bool> &GetFault_UnlicensedFeatureInUse(bool refresh = true) = 0;
874
875 /**
876 * \brief An unlicensed feature is in use, device may not behave as
877 * expected.
878 *
879 * - Default Value: False
880 *
881 * This refreshes and returns a cached StatusSignal object.
882 *
883 * \param refresh Whether to refresh the StatusSignal before returning it;
884 * defaults to true
885 * \returns StickyFault_UnlicensedFeatureInUse Status Signal Object
886 */
888
889 /**
890 * \brief Bridge was disabled most likely due to supply voltage
891 * dropping too low.
892 *
893 * - Default Value: False
894 *
895 * This refreshes and returns a cached StatusSignal object.
896 *
897 * \param refresh Whether to refresh the StatusSignal before returning it;
898 * defaults to true
899 * \returns Fault_BridgeBrownout Status Signal Object
900 */
901 virtual StatusSignal<bool> &GetFault_BridgeBrownout(bool refresh = true) = 0;
902
903 /**
904 * \brief Bridge was disabled most likely due to supply voltage
905 * dropping too low.
906 *
907 * - Default Value: False
908 *
909 * This refreshes and returns a cached StatusSignal object.
910 *
911 * \param refresh Whether to refresh the StatusSignal before returning it;
912 * defaults to true
913 * \returns StickyFault_BridgeBrownout Status Signal Object
914 */
915 virtual StatusSignal<bool> &GetStickyFault_BridgeBrownout(bool refresh = true) = 0;
916
917 /**
918 * \brief The remote sensor has reset.
919 *
920 * - Default Value: False
921 *
922 * This refreshes and returns a cached StatusSignal object.
923 *
924 * \param refresh Whether to refresh the StatusSignal before returning it;
925 * defaults to true
926 * \returns Fault_RemoteSensorReset Status Signal Object
927 */
928 virtual StatusSignal<bool> &GetFault_RemoteSensorReset(bool refresh = true) = 0;
929
930 /**
931 * \brief The remote sensor has reset.
932 *
933 * - Default Value: False
934 *
935 * This refreshes and returns a cached StatusSignal object.
936 *
937 * \param refresh Whether to refresh the StatusSignal before returning it;
938 * defaults to true
939 * \returns StickyFault_RemoteSensorReset Status Signal Object
940 */
941 virtual StatusSignal<bool> &GetStickyFault_RemoteSensorReset(bool refresh = true) = 0;
942
943 /**
944 * \brief The remote Talon used for differential control is not
945 * present on CAN Bus.
946 *
947 * - Default Value: False
948 *
949 * This refreshes and returns a cached StatusSignal object.
950 *
951 * \param refresh Whether to refresh the StatusSignal before returning it;
952 * defaults to true
953 * \returns Fault_MissingDifferentialFX Status Signal Object
954 */
955 virtual StatusSignal<bool> &GetFault_MissingDifferentialFX(bool refresh = true) = 0;
956
957 /**
958 * \brief The remote Talon used for differential control is not
959 * present on CAN Bus.
960 *
961 * - Default Value: False
962 *
963 * This refreshes and returns a cached StatusSignal object.
964 *
965 * \param refresh Whether to refresh the StatusSignal before returning it;
966 * defaults to true
967 * \returns StickyFault_MissingDifferentialFX Status Signal Object
968 */
970
971 /**
972 * \brief The remote sensor position has overflowed. Because of the
973 * nature of remote sensors, it is possible for the remote sensor
974 * position to overflow beyond what is supported by the status signal
975 * frame. However, this is rare and cannot occur over the course of an
976 * FRC match under normal use.
977 *
978 * - Default Value: False
979 *
980 * This refreshes and returns a cached StatusSignal object.
981 *
982 * \param refresh Whether to refresh the StatusSignal before returning it;
983 * defaults to true
984 * \returns Fault_RemoteSensorPosOverflow Status Signal Object
985 */
986 virtual StatusSignal<bool> &GetFault_RemoteSensorPosOverflow(bool refresh = true) = 0;
987
988 /**
989 * \brief The remote sensor position has overflowed. Because of the
990 * nature of remote sensors, it is possible for the remote sensor
991 * position to overflow beyond what is supported by the status signal
992 * frame. However, this is rare and cannot occur over the course of an
993 * FRC match under normal use.
994 *
995 * - Default Value: False
996 *
997 * This refreshes and returns a cached StatusSignal object.
998 *
999 * \param refresh Whether to refresh the StatusSignal before returning it;
1000 * defaults to true
1001 * \returns StickyFault_RemoteSensorPosOverflow Status Signal Object
1002 */
1004
1005 /**
1006 * \brief Supply Voltage has exceeded the maximum voltage rating of
1007 * device.
1008 *
1009 * - Default Value: False
1010 *
1011 * This refreshes and returns a cached StatusSignal object.
1012 *
1013 * \param refresh Whether to refresh the StatusSignal before returning it;
1014 * defaults to true
1015 * \returns Fault_OverSupplyV Status Signal Object
1016 */
1017 virtual StatusSignal<bool> &GetFault_OverSupplyV(bool refresh = true) = 0;
1018
1019 /**
1020 * \brief Supply Voltage has exceeded the maximum voltage rating of
1021 * device.
1022 *
1023 * - Default Value: False
1024 *
1025 * This refreshes and returns a cached StatusSignal object.
1026 *
1027 * \param refresh Whether to refresh the StatusSignal before returning it;
1028 * defaults to true
1029 * \returns StickyFault_OverSupplyV Status Signal Object
1030 */
1031 virtual StatusSignal<bool> &GetStickyFault_OverSupplyV(bool refresh = true) = 0;
1032
1033 /**
1034 * \brief Supply Voltage is unstable. Ensure you are using a battery
1035 * and current limited power supply.
1036 *
1037 * - Default Value: False
1038 *
1039 * This refreshes and returns a cached StatusSignal object.
1040 *
1041 * \param refresh Whether to refresh the StatusSignal before returning it;
1042 * defaults to true
1043 * \returns Fault_UnstableSupplyV Status Signal Object
1044 */
1045 virtual StatusSignal<bool> &GetFault_UnstableSupplyV(bool refresh = true) = 0;
1046
1047 /**
1048 * \brief Supply Voltage is unstable. Ensure you are using a battery
1049 * and current limited power supply.
1050 *
1051 * - Default Value: False
1052 *
1053 * This refreshes and returns a cached StatusSignal object.
1054 *
1055 * \param refresh Whether to refresh the StatusSignal before returning it;
1056 * defaults to true
1057 * \returns StickyFault_UnstableSupplyV Status Signal Object
1058 */
1059 virtual StatusSignal<bool> &GetStickyFault_UnstableSupplyV(bool refresh = true) = 0;
1060
1061 /**
1062 * \brief Reverse limit switch has been asserted. Output is set to
1063 * neutral.
1064 *
1065 * - Default Value: False
1066 *
1067 * This refreshes and returns a cached StatusSignal object.
1068 *
1069 * \param refresh Whether to refresh the StatusSignal before returning it;
1070 * defaults to true
1071 * \returns Fault_ReverseHardLimit Status Signal Object
1072 */
1073 virtual StatusSignal<bool> &GetFault_ReverseHardLimit(bool refresh = true) = 0;
1074
1075 /**
1076 * \brief Reverse limit switch has been asserted. Output is set to
1077 * neutral.
1078 *
1079 * - Default Value: False
1080 *
1081 * This refreshes and returns a cached StatusSignal object.
1082 *
1083 * \param refresh Whether to refresh the StatusSignal before returning it;
1084 * defaults to true
1085 * \returns StickyFault_ReverseHardLimit Status Signal Object
1086 */
1087 virtual StatusSignal<bool> &GetStickyFault_ReverseHardLimit(bool refresh = true) = 0;
1088
1089 /**
1090 * \brief Forward limit switch has been asserted. Output is set to
1091 * neutral.
1092 *
1093 * - Default Value: False
1094 *
1095 * This refreshes and returns a cached StatusSignal object.
1096 *
1097 * \param refresh Whether to refresh the StatusSignal before returning it;
1098 * defaults to true
1099 * \returns Fault_ForwardHardLimit Status Signal Object
1100 */
1101 virtual StatusSignal<bool> &GetFault_ForwardHardLimit(bool refresh = true) = 0;
1102
1103 /**
1104 * \brief Forward limit switch has been asserted. Output is set to
1105 * neutral.
1106 *
1107 * - Default Value: False
1108 *
1109 * This refreshes and returns a cached StatusSignal object.
1110 *
1111 * \param refresh Whether to refresh the StatusSignal before returning it;
1112 * defaults to true
1113 * \returns StickyFault_ForwardHardLimit Status Signal Object
1114 */
1115 virtual StatusSignal<bool> &GetStickyFault_ForwardHardLimit(bool refresh = true) = 0;
1116
1117 /**
1118 * \brief Reverse soft limit has been asserted. Output is set to
1119 * neutral.
1120 *
1121 * - Default Value: False
1122 *
1123 * This refreshes and returns a cached StatusSignal object.
1124 *
1125 * \param refresh Whether to refresh the StatusSignal before returning it;
1126 * defaults to true
1127 * \returns Fault_ReverseSoftLimit Status Signal Object
1128 */
1129 virtual StatusSignal<bool> &GetFault_ReverseSoftLimit(bool refresh = true) = 0;
1130
1131 /**
1132 * \brief Reverse soft limit has been asserted. Output is set to
1133 * neutral.
1134 *
1135 * - Default Value: False
1136 *
1137 * This refreshes and returns a cached StatusSignal object.
1138 *
1139 * \param refresh Whether to refresh the StatusSignal before returning it;
1140 * defaults to true
1141 * \returns StickyFault_ReverseSoftLimit Status Signal Object
1142 */
1143 virtual StatusSignal<bool> &GetStickyFault_ReverseSoftLimit(bool refresh = true) = 0;
1144
1145 /**
1146 * \brief Forward soft limit has been asserted. Output is set to
1147 * neutral.
1148 *
1149 * - Default Value: False
1150 *
1151 * This refreshes and returns a cached StatusSignal object.
1152 *
1153 * \param refresh Whether to refresh the StatusSignal before returning it;
1154 * defaults to true
1155 * \returns Fault_ForwardSoftLimit Status Signal Object
1156 */
1157 virtual StatusSignal<bool> &GetFault_ForwardSoftLimit(bool refresh = true) = 0;
1158
1159 /**
1160 * \brief Forward soft limit has been asserted. Output is set to
1161 * neutral.
1162 *
1163 * - Default Value: False
1164 *
1165 * This refreshes and returns a cached StatusSignal object.
1166 *
1167 * \param refresh Whether to refresh the StatusSignal before returning it;
1168 * defaults to true
1169 * \returns StickyFault_ForwardSoftLimit Status Signal Object
1170 */
1171 virtual StatusSignal<bool> &GetStickyFault_ForwardSoftLimit(bool refresh = true) = 0;
1172
1173 /**
1174 * \brief The remote soft limit device is not present on CAN Bus.
1175 *
1176 * - Default Value: False
1177 *
1178 * This refreshes and returns a cached StatusSignal object.
1179 *
1180 * \param refresh Whether to refresh the StatusSignal before returning it;
1181 * defaults to true
1182 * \returns Fault_MissingSoftLimitRemote Status Signal Object
1183 */
1184 virtual StatusSignal<bool> &GetFault_MissingSoftLimitRemote(bool refresh = true) = 0;
1185
1186 /**
1187 * \brief The remote soft limit device is not present on CAN Bus.
1188 *
1189 * - Default Value: False
1190 *
1191 * This refreshes and returns a cached StatusSignal object.
1192 *
1193 * \param refresh Whether to refresh the StatusSignal before returning it;
1194 * defaults to true
1195 * \returns StickyFault_MissingSoftLimitRemote Status Signal Object
1196 */
1198
1199 /**
1200 * \brief The remote limit switch device is not present on CAN Bus.
1201 *
1202 * - Default Value: False
1203 *
1204 * This refreshes and returns a cached StatusSignal object.
1205 *
1206 * \param refresh Whether to refresh the StatusSignal before returning it;
1207 * defaults to true
1208 * \returns Fault_MissingHardLimitRemote Status Signal Object
1209 */
1210 virtual StatusSignal<bool> &GetFault_MissingHardLimitRemote(bool refresh = true) = 0;
1211
1212 /**
1213 * \brief The remote limit switch device is not present on CAN Bus.
1214 *
1215 * - Default Value: False
1216 *
1217 * This refreshes and returns a cached StatusSignal object.
1218 *
1219 * \param refresh Whether to refresh the StatusSignal before returning it;
1220 * defaults to true
1221 * \returns StickyFault_MissingHardLimitRemote Status Signal Object
1222 */
1224
1225 /**
1226 * \brief The remote sensor's data is no longer trusted. This can
1227 * happen if the remote sensor disappears from the CAN bus or if the
1228 * remote sensor indicates its data is no longer valid, such as when a
1229 * CANcoder's magnet strength falls into the "red" range.
1230 *
1231 * - Default Value: False
1232 *
1233 * This refreshes and returns a cached StatusSignal object.
1234 *
1235 * \param refresh Whether to refresh the StatusSignal before returning it;
1236 * defaults to true
1237 * \returns Fault_RemoteSensorDataInvalid Status Signal Object
1238 */
1239 virtual StatusSignal<bool> &GetFault_RemoteSensorDataInvalid(bool refresh = true) = 0;
1240
1241 /**
1242 * \brief The remote sensor's data is no longer trusted. This can
1243 * happen if the remote sensor disappears from the CAN bus or if the
1244 * remote sensor indicates its data is no longer valid, such as when a
1245 * CANcoder's magnet strength falls into the "red" range.
1246 *
1247 * - Default Value: False
1248 *
1249 * This refreshes and returns a cached StatusSignal object.
1250 *
1251 * \param refresh Whether to refresh the StatusSignal before returning it;
1252 * defaults to true
1253 * \returns StickyFault_RemoteSensorDataInvalid Status Signal Object
1254 */
1256
1257 /**
1258 * \brief The remote sensor used for fusion has fallen out of sync to
1259 * the local sensor. A re-synchronization has occurred, which may
1260 * cause a discontinuity. This typically happens if there is
1261 * significant slop in the mechanism, or if the RotorToSensorRatio
1262 * configuration parameter is incorrect.
1263 *
1264 * - Default Value: False
1265 *
1266 * This refreshes and returns a cached StatusSignal object.
1267 *
1268 * \param refresh Whether to refresh the StatusSignal before returning it;
1269 * defaults to true
1270 * \returns Fault_FusedSensorOutOfSync Status Signal Object
1271 */
1272 virtual StatusSignal<bool> &GetFault_FusedSensorOutOfSync(bool refresh = true) = 0;
1273
1274 /**
1275 * \brief The remote sensor used for fusion has fallen out of sync to
1276 * the local sensor. A re-synchronization has occurred, which may
1277 * cause a discontinuity. This typically happens if there is
1278 * significant slop in the mechanism, or if the RotorToSensorRatio
1279 * configuration parameter is incorrect.
1280 *
1281 * - Default Value: False
1282 *
1283 * This refreshes and returns a cached StatusSignal object.
1284 *
1285 * \param refresh Whether to refresh the StatusSignal before returning it;
1286 * defaults to true
1287 * \returns StickyFault_FusedSensorOutOfSync Status Signal Object
1288 */
1290
1291 /**
1292 * \brief Stator current limit occured.
1293 *
1294 * - Default Value: False
1295 *
1296 * This refreshes and returns a cached StatusSignal object.
1297 *
1298 * \param refresh Whether to refresh the StatusSignal before returning it;
1299 * defaults to true
1300 * \returns Fault_StatorCurrLimit Status Signal Object
1301 */
1302 virtual StatusSignal<bool> &GetFault_StatorCurrLimit(bool refresh = true) = 0;
1303
1304 /**
1305 * \brief Stator current limit occured.
1306 *
1307 * - Default Value: False
1308 *
1309 * This refreshes and returns a cached StatusSignal object.
1310 *
1311 * \param refresh Whether to refresh the StatusSignal before returning it;
1312 * defaults to true
1313 * \returns StickyFault_StatorCurrLimit Status Signal Object
1314 */
1315 virtual StatusSignal<bool> &GetStickyFault_StatorCurrLimit(bool refresh = true) = 0;
1316
1317 /**
1318 * \brief Supply current limit occured.
1319 *
1320 * - Default Value: False
1321 *
1322 * This refreshes and returns a cached StatusSignal object.
1323 *
1324 * \param refresh Whether to refresh the StatusSignal before returning it;
1325 * defaults to true
1326 * \returns Fault_SupplyCurrLimit Status Signal Object
1327 */
1328 virtual StatusSignal<bool> &GetFault_SupplyCurrLimit(bool refresh = true) = 0;
1329
1330 /**
1331 * \brief Supply current limit occured.
1332 *
1333 * - Default Value: False
1334 *
1335 * This refreshes and returns a cached StatusSignal object.
1336 *
1337 * \param refresh Whether to refresh the StatusSignal before returning it;
1338 * defaults to true
1339 * \returns StickyFault_SupplyCurrLimit Status Signal Object
1340 */
1341 virtual StatusSignal<bool> &GetStickyFault_SupplyCurrLimit(bool refresh = true) = 0;
1342
1343 /**
1344 * \brief Using Fused CANcoder feature while unlicensed. Device has
1345 * fallen back to remote CANcoder.
1346 *
1347 * - Default Value: False
1348 *
1349 * This refreshes and returns a cached StatusSignal object.
1350 *
1351 * \param refresh Whether to refresh the StatusSignal before returning it;
1352 * defaults to true
1353 * \returns Fault_UsingFusedCANcoderWhileUnlicensed Status Signal Object
1354 */
1356
1357 /**
1358 * \brief Using Fused CANcoder feature while unlicensed. Device has
1359 * fallen back to remote CANcoder.
1360 *
1361 * - Default Value: False
1362 *
1363 * This refreshes and returns a cached StatusSignal object.
1364 *
1365 * \param refresh Whether to refresh the StatusSignal before returning it;
1366 * defaults to true
1367 * \returns StickyFault_UsingFusedCANcoderWhileUnlicensed Status Signal Object
1368 */
1370
1371 /**
1372 * \brief Static brake was momentarily disabled due to excessive
1373 * braking current while disabled.
1374 *
1375 * - Default Value: False
1376 *
1377 * This refreshes and returns a cached StatusSignal object.
1378 *
1379 * \param refresh Whether to refresh the StatusSignal before returning it;
1380 * defaults to true
1381 * \returns Fault_StaticBrakeDisabled Status Signal Object
1382 */
1383 virtual StatusSignal<bool> &GetFault_StaticBrakeDisabled(bool refresh = true) = 0;
1384
1385 /**
1386 * \brief Static brake was momentarily disabled due to excessive
1387 * braking current while disabled.
1388 *
1389 * - Default Value: False
1390 *
1391 * This refreshes and returns a cached StatusSignal object.
1392 *
1393 * \param refresh Whether to refresh the StatusSignal before returning it;
1394 * defaults to true
1395 * \returns StickyFault_StaticBrakeDisabled Status Signal Object
1396 */
1398
1399 /**
1400 * \brief Closed loop proportional component.
1401 *
1402 * \details The portion of the closed loop output that is proportional
1403 * to the error. Alternatively, the kP contribution of the closed loop
1404 * output.
1405 *
1406 * When using differential control, this applies to the average axis.
1407 *
1408 * This refreshes and returns a cached StatusSignal object.
1409 *
1410 * \param refresh Whether to refresh the StatusSignal before returning it;
1411 * defaults to true
1412 * \returns ClosedLoopProportionalOutput Status Signal object
1413 */
1415
1416 /**
1417 * \brief Closed loop integrated component.
1418 *
1419 * \details The portion of the closed loop output that is proportional
1420 * to the integrated error. Alternatively, the kI contribution of the
1421 * closed loop output.
1422 *
1423 * When using differential control, this applies to the average axis.
1424 *
1425 * This refreshes and returns a cached StatusSignal object.
1426 *
1427 * \param refresh Whether to refresh the StatusSignal before returning it;
1428 * defaults to true
1429 * \returns ClosedLoopIntegratedOutput Status Signal object
1430 */
1431 virtual StatusSignal<double> &GetClosedLoopIntegratedOutput(bool refresh = true) = 0;
1432
1433 /**
1434 * \brief Feedforward passed by the user.
1435 *
1436 * \details This is the general feedforward that the user provides for
1437 * the closed loop.
1438 *
1439 * When using differential control, this applies to the average axis.
1440 *
1441 * This refreshes and returns a cached StatusSignal object.
1442 *
1443 * \param refresh Whether to refresh the StatusSignal before returning it;
1444 * defaults to true
1445 * \returns ClosedLoopFeedForward Status Signal object
1446 */
1447 virtual StatusSignal<double> &GetClosedLoopFeedForward(bool refresh = true) = 0;
1448
1449 /**
1450 * \brief Closed loop derivative component.
1451 *
1452 * \details The portion of the closed loop output that is proportional
1453 * to the deriviative of error. Alternatively, the kD contribution of
1454 * the closed loop output.
1455 *
1456 * When using differential control, this applies to the average axis.
1457 *
1458 * This refreshes and returns a cached StatusSignal object.
1459 *
1460 * \param refresh Whether to refresh the StatusSignal before returning it;
1461 * defaults to true
1462 * \returns ClosedLoopDerivativeOutput Status Signal object
1463 */
1464 virtual StatusSignal<double> &GetClosedLoopDerivativeOutput(bool refresh = true) = 0;
1465
1466 /**
1467 * \brief Closed loop total output.
1468 *
1469 * \details The total output of the closed loop output.
1470 *
1471 * When using differential control, this applies to the average axis.
1472 *
1473 * This refreshes and returns a cached StatusSignal object.
1474 *
1475 * \param refresh Whether to refresh the StatusSignal before returning it;
1476 * defaults to true
1477 * \returns ClosedLoopOutput Status Signal object
1478 */
1479 virtual StatusSignal<double> &GetClosedLoopOutput(bool refresh = true) = 0;
1480
1481 /**
1482 * \brief Value that the closed loop is targeting.
1483 *
1484 * \details This is the value that the closed loop PID controller
1485 * targets.
1486 *
1487 * When using differential control, this applies to the average axis.
1488 *
1489 * This refreshes and returns a cached StatusSignal object.
1490 *
1491 * \param refresh Whether to refresh the StatusSignal before returning it;
1492 * defaults to true
1493 * \returns ClosedLoopReference Status Signal object
1494 */
1495 virtual StatusSignal<double> &GetClosedLoopReference(bool refresh = true) = 0;
1496
1497 /**
1498 * \brief Derivative of the target that the closed loop is targeting.
1499 *
1500 * \details This is the change in the closed loop reference. This may
1501 * be used in the feed-forward calculation, the derivative-error, or
1502 * in application of the signage for kS. Typically, this represents
1503 * the target velocity during Motion Magic®.
1504 *
1505 * When using differential control, this applies to the average axis.
1506 *
1507 * This refreshes and returns a cached StatusSignal object.
1508 *
1509 * \param refresh Whether to refresh the StatusSignal before returning it;
1510 * defaults to true
1511 * \returns ClosedLoopReferenceSlope Status Signal object
1512 */
1513 virtual StatusSignal<double> &GetClosedLoopReferenceSlope(bool refresh = true) = 0;
1514
1515 /**
1516 * \brief The difference between target reference and current
1517 * measurement.
1518 *
1519 * \details This is the value that is treated as the error in the PID
1520 * loop.
1521 *
1522 * When using differential control, this applies to the average axis.
1523 *
1524 * This refreshes and returns a cached StatusSignal object.
1525 *
1526 * \param refresh Whether to refresh the StatusSignal before returning it;
1527 * defaults to true
1528 * \returns ClosedLoopError Status Signal object
1529 */
1530 virtual StatusSignal<double> &GetClosedLoopError(bool refresh = true) = 0;
1531
1532 /**
1533 * \brief The calculated motor output for differential followers.
1534 *
1535 * \details This is a torque request when using the TorqueCurrentFOC
1536 * control output type, a voltage request when using the Voltage
1537 * control output type, and a duty cycle when using the DutyCycle
1538 * control output type.
1539 *
1540 * This refreshes and returns a cached StatusSignal object.
1541 *
1542 * \param refresh Whether to refresh the StatusSignal before returning it;
1543 * defaults to true
1544 * \returns DifferentialOutput Status Signal object
1545 */
1546 virtual StatusSignal<double> &GetDifferentialOutput(bool refresh = true) = 0;
1547
1548 /**
1549 * \brief Differential closed loop proportional component.
1550 *
1551 * \details The portion of the differential closed loop output (on the
1552 * difference axis) that is proportional to the error. Alternatively,
1553 * the kP contribution of the closed loop output.
1554 *
1555 * This refreshes and returns a cached StatusSignal object.
1556 *
1557 * \param refresh Whether to refresh the StatusSignal before returning it;
1558 * defaults to true
1559 * \returns DifferentialClosedLoopProportionalOutput Status Signal object
1560 */
1562
1563 /**
1564 * \brief Differential closed loop integrated component.
1565 *
1566 * \details The portion of the differential closed loop output (on the
1567 * difference axis) that is proportional to the integrated error.
1568 * Alternatively, the kI contribution of the closed loop output.
1569 *
1570 * This refreshes and returns a cached StatusSignal object.
1571 *
1572 * \param refresh Whether to refresh the StatusSignal before returning it;
1573 * defaults to true
1574 * \returns DifferentialClosedLoopIntegratedOutput Status Signal object
1575 */
1577
1578 /**
1579 * \brief Differential Feedforward passed by the user.
1580 *
1581 * \details This is the general feedforward that the user provides for
1582 * the differential closed loop (on the difference axis).
1583 *
1584 * This refreshes and returns a cached StatusSignal object.
1585 *
1586 * \param refresh Whether to refresh the StatusSignal before returning it;
1587 * defaults to true
1588 * \returns DifferentialClosedLoopFeedForward Status Signal object
1589 */
1591
1592 /**
1593 * \brief Differential closed loop derivative component.
1594 *
1595 * \details The portion of the differential closed loop output (on the
1596 * difference axis) that is proportional to the deriviative of error.
1597 * Alternatively, the kD contribution of the closed loop output.
1598 *
1599 * This refreshes and returns a cached StatusSignal object.
1600 *
1601 * \param refresh Whether to refresh the StatusSignal before returning it;
1602 * defaults to true
1603 * \returns DifferentialClosedLoopDerivativeOutput Status Signal object
1604 */
1606
1607 /**
1608 * \brief Differential closed loop total output.
1609 *
1610 * \details The total output of the differential closed loop output
1611 * (on the difference axis).
1612 *
1613 * This refreshes and returns a cached StatusSignal object.
1614 *
1615 * \param refresh Whether to refresh the StatusSignal before returning it;
1616 * defaults to true
1617 * \returns DifferentialClosedLoopOutput Status Signal object
1618 */
1620
1621 /**
1622 * \brief Value that the differential closed loop is targeting.
1623 *
1624 * \details This is the value that the differential closed loop PID
1625 * controller targets (on the difference axis).
1626 *
1627 * This refreshes and returns a cached StatusSignal object.
1628 *
1629 * \param refresh Whether to refresh the StatusSignal before returning it;
1630 * defaults to true
1631 * \returns DifferentialClosedLoopReference Status Signal object
1632 */
1634
1635 /**
1636 * \brief Derivative of the target that the differential closed loop
1637 * is targeting.
1638 *
1639 * \details This is the change in the closed loop reference (on the
1640 * difference axis). This may be used in the feed-forward calculation,
1641 * the derivative-error, or in application of the signage for kS.
1642 * Typically, this represents the target velocity during Motion
1643 * Magic®.
1644 *
1645 * This refreshes and returns a cached StatusSignal object.
1646 *
1647 * \param refresh Whether to refresh the StatusSignal before returning it;
1648 * defaults to true
1649 * \returns DifferentialClosedLoopReferenceSlope Status Signal object
1650 */
1652
1653 /**
1654 * \brief The difference between target differential reference and
1655 * current measurement.
1656 *
1657 * \details This is the value that is treated as the error in the
1658 * differential PID loop (on the difference axis).
1659 *
1660 * This refreshes and returns a cached StatusSignal object.
1661 *
1662 * \param refresh Whether to refresh the StatusSignal before returning it;
1663 * defaults to true
1664 * \returns DifferentialClosedLoopError Status Signal object
1665 */
1666 virtual StatusSignal<double> &GetDifferentialClosedLoopError(bool refresh = true) = 0;
1667
1668
1669
1670 /**
1671 * \brief Sets the mechanism position of the device in mechanism
1672 * rotations.
1673 *
1674 * \param newValue Value to set to. Units are in rotations.
1675 * \param timeoutSeconds Maximum time to wait up to in seconds.
1676 * \returns StatusCode of the set command
1677 */
1678 virtual ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds) = 0;
1679 /**
1680 * \brief Sets the mechanism position of the device in mechanism
1681 * rotations.
1682 *
1683 * This will wait up to 0.100 seconds (100ms) by default.
1684 *
1685 * \param newValue Value to set to. Units are in rotations.
1686 * \returns StatusCode of the set command
1687 */
1688 virtual ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue) = 0;
1689
1690 /**
1691 * \brief Clear the sticky faults in the device.
1692 *
1693 * \details This typically has no impact on the device functionality.
1694 * Instead, it just clears telemetry faults that are accessible via
1695 * API and Tuner Self-Test.
1696 *
1697 * \param timeoutSeconds Maximum time to wait up to in seconds.
1698 * \returns StatusCode of the set command
1699 */
1700 virtual ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds) = 0;
1701 /**
1702 * \brief Clear the sticky faults in the device.
1703 *
1704 * \details This typically has no impact on the device functionality.
1705 * Instead, it just clears telemetry faults that are accessible via
1706 * API and Tuner Self-Test.
1707 *
1708 * This will wait up to 0.100 seconds (100ms) by default.
1709 *
1710 * \returns StatusCode of the set command
1711 */
1713
1714 /**
1715 * \brief Clear sticky fault: Hardware fault occurred
1716 *
1717 * \param timeoutSeconds Maximum time to wait up to in seconds.
1718 * \returns StatusCode of the set command
1719 */
1720 virtual ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds) = 0;
1721 /**
1722 * \brief Clear sticky fault: Hardware fault occurred
1723 *
1724 * This will wait up to 0.100 seconds (100ms) by default.
1725 *
1726 * \returns StatusCode of the set command
1727 */
1729
1730 /**
1731 * \brief Clear sticky fault: Processor temperature exceeded limit
1732 *
1733 * \param timeoutSeconds Maximum time to wait up to in seconds.
1734 * \returns StatusCode of the set command
1735 */
1736 virtual ctre::phoenix::StatusCode ClearStickyFault_ProcTemp(units::time::second_t timeoutSeconds) = 0;
1737 /**
1738 * \brief Clear sticky fault: Processor temperature exceeded limit
1739 *
1740 * This will wait up to 0.100 seconds (100ms) by default.
1741 *
1742 * \returns StatusCode of the set command
1743 */
1745
1746 /**
1747 * \brief Clear sticky fault: Device temperature exceeded limit
1748 *
1749 * \param timeoutSeconds Maximum time to wait up to in seconds.
1750 * \returns StatusCode of the set command
1751 */
1752 virtual ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp(units::time::second_t timeoutSeconds) = 0;
1753 /**
1754 * \brief Clear sticky fault: Device temperature exceeded limit
1755 *
1756 * This will wait up to 0.100 seconds (100ms) by default.
1757 *
1758 * \returns StatusCode of the set command
1759 */
1761
1762 /**
1763 * \brief Clear sticky fault: Device supply voltage dropped to near
1764 * brownout levels
1765 *
1766 * \param timeoutSeconds Maximum time to wait up to in seconds.
1767 * \returns StatusCode of the set command
1768 */
1769 virtual ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds) = 0;
1770 /**
1771 * \brief Clear sticky fault: Device supply voltage dropped to near
1772 * brownout levels
1773 *
1774 * This will wait up to 0.100 seconds (100ms) by default.
1775 *
1776 * \returns StatusCode of the set command
1777 */
1779
1780 /**
1781 * \brief Clear sticky fault: Device boot while detecting the enable
1782 * signal
1783 *
1784 * \param timeoutSeconds Maximum time to wait up to in seconds.
1785 * \returns StatusCode of the set command
1786 */
1787 virtual ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable(units::time::second_t timeoutSeconds) = 0;
1788 /**
1789 * \brief Clear sticky fault: Device boot while detecting the enable
1790 * signal
1791 *
1792 * This will wait up to 0.100 seconds (100ms) by default.
1793 *
1794 * \returns StatusCode of the set command
1795 */
1797
1798 /**
1799 * \brief Clear sticky fault: An unlicensed feature is in use, device
1800 * may not behave as expected.
1801 *
1802 * \param timeoutSeconds Maximum time to wait up to in seconds.
1803 * \returns StatusCode of the set command
1804 */
1805 virtual ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse(units::time::second_t timeoutSeconds) = 0;
1806 /**
1807 * \brief Clear sticky fault: An unlicensed feature is in use, device
1808 * may not behave as expected.
1809 *
1810 * This will wait up to 0.100 seconds (100ms) by default.
1811 *
1812 * \returns StatusCode of the set command
1813 */
1815
1816 /**
1817 * \brief Clear sticky fault: Bridge was disabled most likely due to
1818 * supply voltage dropping too low.
1819 *
1820 * \param timeoutSeconds Maximum time to wait up to in seconds.
1821 * \returns StatusCode of the set command
1822 */
1823 virtual ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout(units::time::second_t timeoutSeconds) = 0;
1824 /**
1825 * \brief Clear sticky fault: Bridge was disabled most likely due to
1826 * supply voltage dropping too low.
1827 *
1828 * This will wait up to 0.100 seconds (100ms) by default.
1829 *
1830 * \returns StatusCode of the set command
1831 */
1833
1834 /**
1835 * \brief Clear sticky fault: The remote sensor has reset.
1836 *
1837 * \param timeoutSeconds Maximum time to wait up to in seconds.
1838 * \returns StatusCode of the set command
1839 */
1840 virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset(units::time::second_t timeoutSeconds) = 0;
1841 /**
1842 * \brief Clear sticky fault: The remote sensor has reset.
1843 *
1844 * This will wait up to 0.100 seconds (100ms) by default.
1845 *
1846 * \returns StatusCode of the set command
1847 */
1849
1850 /**
1851 * \brief Clear sticky fault: The remote Talon used for differential
1852 * control is not present on CAN Bus.
1853 *
1854 * \param timeoutSeconds Maximum time to wait up to in seconds.
1855 * \returns StatusCode of the set command
1856 */
1857 virtual ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX(units::time::second_t timeoutSeconds) = 0;
1858 /**
1859 * \brief Clear sticky fault: The remote Talon used for differential
1860 * control is not present on CAN Bus.
1861 *
1862 * This will wait up to 0.100 seconds (100ms) by default.
1863 *
1864 * \returns StatusCode of the set command
1865 */
1867
1868 /**
1869 * \brief Clear sticky fault: The remote sensor position has
1870 * overflowed. Because of the nature of remote sensors, it is possible
1871 * for the remote sensor position to overflow beyond what is supported
1872 * by the status signal frame. However, this is rare and cannot occur
1873 * over the course of an FRC match under normal use.
1874 *
1875 * \param timeoutSeconds Maximum time to wait up to in seconds.
1876 * \returns StatusCode of the set command
1877 */
1878 virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow(units::time::second_t timeoutSeconds) = 0;
1879 /**
1880 * \brief Clear sticky fault: The remote sensor position has
1881 * overflowed. Because of the nature of remote sensors, it is possible
1882 * for the remote sensor position to overflow beyond what is supported
1883 * by the status signal frame. However, this is rare and cannot occur
1884 * over the course of an FRC match under normal use.
1885 *
1886 * This will wait up to 0.100 seconds (100ms) by default.
1887 *
1888 * \returns StatusCode of the set command
1889 */
1891
1892 /**
1893 * \brief Clear sticky fault: Supply Voltage has exceeded the maximum
1894 * voltage rating of device.
1895 *
1896 * \param timeoutSeconds Maximum time to wait up to in seconds.
1897 * \returns StatusCode of the set command
1898 */
1899 virtual ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV(units::time::second_t timeoutSeconds) = 0;
1900 /**
1901 * \brief Clear sticky fault: Supply Voltage has exceeded the maximum
1902 * voltage rating of device.
1903 *
1904 * This will wait up to 0.100 seconds (100ms) by default.
1905 *
1906 * \returns StatusCode of the set command
1907 */
1909
1910 /**
1911 * \brief Clear sticky fault: Supply Voltage is unstable. Ensure you
1912 * are using a battery and current limited power supply.
1913 *
1914 * \param timeoutSeconds Maximum time to wait up to in seconds.
1915 * \returns StatusCode of the set command
1916 */
1917 virtual ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV(units::time::second_t timeoutSeconds) = 0;
1918 /**
1919 * \brief Clear sticky fault: Supply Voltage is unstable. Ensure you
1920 * are using a battery and current limited power supply.
1921 *
1922 * This will wait up to 0.100 seconds (100ms) by default.
1923 *
1924 * \returns StatusCode of the set command
1925 */
1927
1928 /**
1929 * \brief Clear sticky fault: Reverse limit switch has been asserted.
1930 * Output is set to neutral.
1931 *
1932 * \param timeoutSeconds Maximum time to wait up to in seconds.
1933 * \returns StatusCode of the set command
1934 */
1935 virtual ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit(units::time::second_t timeoutSeconds) = 0;
1936 /**
1937 * \brief Clear sticky fault: Reverse limit switch has been asserted.
1938 * Output is set to neutral.
1939 *
1940 * This will wait up to 0.100 seconds (100ms) by default.
1941 *
1942 * \returns StatusCode of the set command
1943 */
1945
1946 /**
1947 * \brief Clear sticky fault: Forward limit switch has been asserted.
1948 * Output is set to neutral.
1949 *
1950 * \param timeoutSeconds Maximum time to wait up to in seconds.
1951 * \returns StatusCode of the set command
1952 */
1953 virtual ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit(units::time::second_t timeoutSeconds) = 0;
1954 /**
1955 * \brief Clear sticky fault: Forward limit switch has been asserted.
1956 * Output is set to neutral.
1957 *
1958 * This will wait up to 0.100 seconds (100ms) by default.
1959 *
1960 * \returns StatusCode of the set command
1961 */
1963
1964 /**
1965 * \brief Clear sticky fault: Reverse soft limit has been asserted.
1966 * Output is set to neutral.
1967 *
1968 * \param timeoutSeconds Maximum time to wait up to in seconds.
1969 * \returns StatusCode of the set command
1970 */
1971 virtual ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit(units::time::second_t timeoutSeconds) = 0;
1972 /**
1973 * \brief Clear sticky fault: Reverse soft limit has been asserted.
1974 * Output is set to neutral.
1975 *
1976 * This will wait up to 0.100 seconds (100ms) by default.
1977 *
1978 * \returns StatusCode of the set command
1979 */
1981
1982 /**
1983 * \brief Clear sticky fault: Forward soft limit has been asserted.
1984 * Output is set to neutral.
1985 *
1986 * \param timeoutSeconds Maximum time to wait up to in seconds.
1987 * \returns StatusCode of the set command
1988 */
1989 virtual ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit(units::time::second_t timeoutSeconds) = 0;
1990 /**
1991 * \brief Clear sticky fault: Forward soft limit has been asserted.
1992 * Output is set to neutral.
1993 *
1994 * This will wait up to 0.100 seconds (100ms) by default.
1995 *
1996 * \returns StatusCode of the set command
1997 */
1999
2000 /**
2001 * \brief Clear sticky fault: The remote soft limit device is not
2002 * present on CAN Bus.
2003 *
2004 * \param timeoutSeconds Maximum time to wait up to in seconds.
2005 * \returns StatusCode of the set command
2006 */
2007 virtual ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote(units::time::second_t timeoutSeconds) = 0;
2008 /**
2009 * \brief Clear sticky fault: The remote soft limit device is not
2010 * present on CAN Bus.
2011 *
2012 * This will wait up to 0.100 seconds (100ms) by default.
2013 *
2014 * \returns StatusCode of the set command
2015 */
2017
2018 /**
2019 * \brief Clear sticky fault: The remote limit switch device is not
2020 * present on CAN Bus.
2021 *
2022 * \param timeoutSeconds Maximum time to wait up to in seconds.
2023 * \returns StatusCode of the set command
2024 */
2025 virtual ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote(units::time::second_t timeoutSeconds) = 0;
2026 /**
2027 * \brief Clear sticky fault: The remote limit switch device is not
2028 * present on CAN Bus.
2029 *
2030 * This will wait up to 0.100 seconds (100ms) by default.
2031 *
2032 * \returns StatusCode of the set command
2033 */
2035
2036 /**
2037 * \brief Clear sticky fault: The remote sensor's data is no longer
2038 * trusted. This can happen if the remote sensor disappears from the
2039 * CAN bus or if the remote sensor indicates its data is no longer
2040 * valid, such as when a CANcoder's magnet strength falls into the
2041 * "red" range.
2042 *
2043 * \param timeoutSeconds Maximum time to wait up to in seconds.
2044 * \returns StatusCode of the set command
2045 */
2046 virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid(units::time::second_t timeoutSeconds) = 0;
2047 /**
2048 * \brief Clear sticky fault: The remote sensor's data is no longer
2049 * trusted. This can happen if the remote sensor disappears from the
2050 * CAN bus or if the remote sensor indicates its data is no longer
2051 * valid, such as when a CANcoder's magnet strength falls into the
2052 * "red" range.
2053 *
2054 * This will wait up to 0.100 seconds (100ms) by default.
2055 *
2056 * \returns StatusCode of the set command
2057 */
2059
2060 /**
2061 * \brief Clear sticky fault: The remote sensor used for fusion has
2062 * fallen out of sync to the local sensor. A re-synchronization has
2063 * occurred, which may cause a discontinuity. This typically happens
2064 * if there is significant slop in the mechanism, or if the
2065 * RotorToSensorRatio configuration parameter is incorrect.
2066 *
2067 * \param timeoutSeconds Maximum time to wait up to in seconds.
2068 * \returns StatusCode of the set command
2069 */
2070 virtual ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync(units::time::second_t timeoutSeconds) = 0;
2071 /**
2072 * \brief Clear sticky fault: The remote sensor used for fusion has
2073 * fallen out of sync to the local sensor. A re-synchronization has
2074 * occurred, which may cause a discontinuity. This typically happens
2075 * if there is significant slop in the mechanism, or if the
2076 * RotorToSensorRatio configuration parameter is incorrect.
2077 *
2078 * This will wait up to 0.100 seconds (100ms) by default.
2079 *
2080 * \returns StatusCode of the set command
2081 */
2083
2084 /**
2085 * \brief Clear sticky fault: Stator current limit occured.
2086 *
2087 * \param timeoutSeconds Maximum time to wait up to in seconds.
2088 * \returns StatusCode of the set command
2089 */
2090 virtual ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit(units::time::second_t timeoutSeconds) = 0;
2091 /**
2092 * \brief Clear sticky fault: Stator current limit occured.
2093 *
2094 * This will wait up to 0.100 seconds (100ms) by default.
2095 *
2096 * \returns StatusCode of the set command
2097 */
2099
2100 /**
2101 * \brief Clear sticky fault: Supply current limit occured.
2102 *
2103 * \param timeoutSeconds Maximum time to wait up to in seconds.
2104 * \returns StatusCode of the set command
2105 */
2106 virtual ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit(units::time::second_t timeoutSeconds) = 0;
2107 /**
2108 * \brief Clear sticky fault: Supply current limit occured.
2109 *
2110 * This will wait up to 0.100 seconds (100ms) by default.
2111 *
2112 * \returns StatusCode of the set command
2113 */
2115
2116 /**
2117 * \brief Clear sticky fault: Using Fused CANcoder feature while
2118 * unlicensed. Device has fallen back to remote CANcoder.
2119 *
2120 * \param timeoutSeconds Maximum time to wait up to in seconds.
2121 * \returns StatusCode of the set command
2122 */
2124 /**
2125 * \brief Clear sticky fault: Using Fused CANcoder feature while
2126 * unlicensed. Device has fallen back to remote CANcoder.
2127 *
2128 * This will wait up to 0.100 seconds (100ms) by default.
2129 *
2130 * \returns StatusCode of the set command
2131 */
2133
2134 /**
2135 * \brief Clear sticky fault: Static brake was momentarily disabled
2136 * due to excessive braking current while disabled.
2137 *
2138 * \param timeoutSeconds Maximum time to wait up to in seconds.
2139 * \returns StatusCode of the set command
2140 */
2141 virtual ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled(units::time::second_t timeoutSeconds) = 0;
2142 /**
2143 * \brief Clear sticky fault: Static brake was momentarily disabled
2144 * due to excessive braking current while disabled.
2145 *
2146 * This will wait up to 0.100 seconds (100ms) by default.
2147 *
2148 * \returns StatusCode of the set command
2149 */
2151};
2152
2153}
2154}
2155}
2156}
2157
Represents a status signal with data of type T, and operations available to retrieve information abou...
Definition StatusSignal.hpp:474
Contains everything common between Phoenix 6 devices.
Definition CommonDevice.hpp:23
Contains all status signals available for devices that support Talon signals.
Definition HasTalonSignals.hpp:32
virtual StatusSignal< int > & GetVersionBuild(bool refresh=true)=0
App Build Version number.
virtual StatusSignal< units::temperature::celsius_t > & GetAncillaryDeviceTemp(bool refresh=true)=0
Temperature of device from second sensor.
virtual ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed()=0
Clear sticky fault: Using Fused CANcoder feature while unlicensed.
virtual ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue)=0
Sets the mechanism position of the device in mechanism rotations.
virtual ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds)=0
Clear the sticky faults in the device.
virtual StatusSignal< int > & GetVersionMajor(bool refresh=true)=0
App Major Version number.
virtual ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp()=0
Clear sticky fault: Device temperature exceeded limit.
virtual StatusSignal< units::current::ampere_t > & GetTorqueCurrent(bool refresh=true)=0
Current corresponding to the torque output by the motor.
virtual StatusSignal< double > & GetClosedLoopIntegratedOutput(bool refresh=true)=0
Closed loop integrated component.
virtual ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit()=0
Clear sticky fault: Forward limit switch has been asserted.
virtual ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Forward soft limit has been asserted.
virtual StatusSignal< double > & GetDifferentialClosedLoopOutput(bool refresh=true)=0
Differential closed loop total output.
virtual ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Forward limit switch has been asserted.
virtual StatusSignal< bool > & GetStickyFault_StatorCurrLimit(bool refresh=true)=0
Stator current limit occured.
virtual StatusSignal< double > & GetDifferentialClosedLoopDerivativeOutput(bool refresh=true)=0
Differential closed loop derivative component.
virtual StatusSignal< bool > & GetFault_UnlicensedFeatureInUse(bool refresh=true)=0
An unlicensed feature is in use, device may not behave as expected.
virtual StatusSignal< bool > & GetFault_StaticBrakeDisabled(bool refresh=true)=0
Static brake was momentarily disabled due to excessive braking current while disabled.
virtual StatusSignal< double > & GetDifferentialClosedLoopReference(bool refresh=true)=0
Value that the differential closed loop is targeting.
virtual StatusSignal< bool > & GetFault_RemoteSensorPosOverflow(bool refresh=true)=0
The remote sensor position has overflowed.
virtual StatusSignal< bool > & GetStickyFault_Hardware(bool refresh=true)=0
Hardware fault occurred.
virtual ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit()=0
Clear sticky fault: Supply current limit occured.
virtual StatusSignal< ctre::unit::rpm_per_volt_t > & GetMotorKV(bool refresh=true)=0
The velocity constant (K_V) of the motor.
virtual StatusSignal< double > & GetDifferentialClosedLoopReferenceSlope(bool refresh=true)=0
Derivative of the target that the differential closed loop is targeting.
virtual StatusSignal< signals::ForwardLimitValue > & GetForwardLimit(bool refresh=true)=0
Forward Limit Pin.
virtual StatusSignal< bool > & GetMotionMagicIsRunning(bool refresh=true)=0
Check if Motion Magic® is running.
virtual ctre::phoenix::StatusCode SetPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds)=0
Sets the mechanism position of the device in mechanism rotations.
virtual StatusSignal< units::angular_velocity::turns_per_second_t > & GetDifferentialAverageVelocity(bool refresh=true)=0
Average component of the differential velocity of device.
virtual StatusSignal< double > & GetClosedLoopDerivativeOutput(bool refresh=true)=0
Closed loop derivative component.
virtual StatusSignal< bool > & GetStickyFault_BootDuringEnable(bool refresh=true)=0
Device boot while detecting the enable signal.
virtual ctre::phoenix::StatusCode ClearStickyFault_Hardware()=0
Clear sticky fault: Hardware fault occurred.
virtual StatusSignal< units::angle::turn_t > & GetPosition(bool refresh=true)=0
Position of the device in mechanism rotations.
virtual ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Using Fused CANcoder feature while unlicensed.
virtual StatusSignal< double > & GetClosedLoopProportionalOutput(bool refresh=true)=0
Closed loop proportional component.
virtual StatusSignal< units::angular_velocity::turns_per_second_t > & GetDifferentialDifferenceVelocity(bool refresh=true)=0
Difference component of the differential velocity of device.
virtual StatusSignal< units::current::ampere_t > & GetStatorCurrent(bool refresh=true)=0
Current corresponding to the stator windings.
virtual StatusSignal< units::voltage::volt_t > & GetMotorVoltage(bool refresh=true)=0
The applied (output) motor voltage.
virtual ctre::phoenix::StatusCode ClearStickyFaults()=0
Clear the sticky faults in the device.
virtual StatusSignal< units::angle::turn_t > & GetDifferentialAveragePosition(bool refresh=true)=0
Average component of the differential position of device.
virtual ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync()=0
Clear sticky fault: The remote sensor used for fusion has fallen out of sync to the local sensor.
virtual StatusSignal< bool > & GetFault_SupplyCurrLimit(bool refresh=true)=0
Supply current limit occured.
virtual StatusSignal< bool > & GetStickyFault_RemoteSensorReset(bool refresh=true)=0
The remote sensor has reset.
virtual StatusSignal< signals::BridgeOutputValue > & GetBridgeOutput(bool refresh=true)=0
The applied output of the bridge.
virtual ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Reverse soft limit has been asserted.
virtual StatusSignal< int > & GetClosedLoopSlot(bool refresh=true)=0
The slot that the closed-loop PID is using.
virtual StatusSignal< signals::DeviceEnableValue > & GetDeviceEnable(bool refresh=true)=0
Indicates if device is actuator enabled.
virtual ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX()=0
Clear sticky fault: The remote Talon used for differential control is not present on CAN Bus.
virtual ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse()=0
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
virtual StatusSignal< signals::MotorOutputStatusValue > & GetMotorOutputStatus(bool refresh=true)=0
Assess the status of the motor output with respect to load and supply.
virtual StatusSignal< units::temperature::celsius_t > & GetDeviceTemp(bool refresh=true)=0
Temperature of device.
virtual StatusSignal< bool > & GetStickyFault_RemoteSensorPosOverflow(bool refresh=true)=0
The remote sensor position has overflowed.
virtual ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled()=0
Clear sticky fault: Static brake was momentarily disabled due to excessive braking current while disa...
virtual StatusSignal< bool > & GetStickyFault_UnstableSupplyV(bool refresh=true)=0
Supply Voltage is unstable.
virtual ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low.
virtual StatusSignal< units::angular_velocity::turns_per_second_t > & GetVelocity(bool refresh=true)=0
Velocity of the device in mechanism rotations per second.
virtual StatusSignal< bool > & GetFault_UsingFusedCANcoderWhileUnlicensed(bool refresh=true)=0
Using Fused CANcoder feature while unlicensed.
virtual StatusSignal< bool > & GetMotionMagicAtTarget(bool refresh=true)=0
Check if the Motion Magic® profile has reached the target.
virtual StatusSignal< signals::DifferentialControlModeValue > & GetDifferentialControlMode(bool refresh=true)=0
The active control mode of the differential controller.
virtual StatusSignal< bool > & GetFault_OverSupplyV(bool refresh=true)=0
Supply Voltage has exceeded the maximum voltage rating of device.
virtual ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync(units::time::second_t timeoutSeconds)=0
Clear sticky fault: The remote sensor used for fusion has fallen out of sync to the local sensor.
virtual StatusSignal< double > & GetDifferentialClosedLoopProportionalOutput(bool refresh=true)=0
Differential closed loop proportional component.
virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset()=0
Clear sticky fault: The remote sensor has reset.
virtual StatusSignal< units::angle::turn_t > & GetRotorPosition(bool refresh=true)=0
Position of the motor rotor.
virtual StatusSignal< bool > & GetStickyFault_Undervoltage(bool refresh=true)=0
Device supply voltage dropped to near brownout levels.
virtual ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit()=0
Clear sticky fault: Reverse soft limit has been asserted.
virtual StatusSignal< int > & GetVersionMinor(bool refresh=true)=0
App Minor Version number.
virtual StatusSignal< signals::ReverseLimitValue > & GetReverseLimit(bool refresh=true)=0
Reverse Limit Pin.
virtual StatusSignal< ctre::unit::newton_meters_per_ampere_t > & GetMotorKT(bool refresh=true)=0
The torque constant (K_T) of the motor.
virtual StatusSignal< units::temperature::celsius_t > & GetProcessorTemp(bool refresh=true)=0
Temperature of the processor.
virtual StatusSignal< signals::ConnectedMotorValue > & GetConnectedMotor(bool refresh=true)=0
The type of motor attached to the Talon.
virtual StatusSignal< bool > & GetStickyFault_BridgeBrownout(bool refresh=true)=0
Bridge was disabled most likely due to supply voltage dropping too low.
virtual StatusSignal< bool > & GetStickyFault_UsingFusedCANcoderWhileUnlicensed(bool refresh=true)=0
Using Fused CANcoder feature while unlicensed.
virtual StatusSignal< bool > & GetStickyFault_ForwardHardLimit(bool refresh=true)=0
Forward limit switch has been asserted.
virtual ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable()=0
Clear sticky fault: Device boot while detecting the enable signal.
virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid(units::time::second_t timeoutSeconds)=0
Clear sticky fault: The remote sensor's data is no longer trusted.
virtual StatusSignal< bool > & GetFault_Hardware(bool refresh=true)=0
Hardware fault occurred.
virtual StatusSignal< bool > & GetStickyFault_ReverseSoftLimit(bool refresh=true)=0
Reverse soft limit has been asserted.
virtual StatusSignal< bool > & GetFault_StatorCurrLimit(bool refresh=true)=0
Stator current limit occured.
virtual ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote(units::time::second_t timeoutSeconds)=0
Clear sticky fault: The remote soft limit device is not present on CAN Bus.
virtual StatusSignal< bool > & GetStickyFault_ReverseHardLimit(bool refresh=true)=0
Reverse limit switch has been asserted.
virtual StatusSignal< units::angular_velocity::turns_per_second_t > & GetRotorVelocity(bool refresh=true)=0
Velocity of the motor rotor.
virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow()=0
Clear sticky fault: The remote sensor position has overflowed.
virtual StatusSignal< bool > & GetStickyFault_MissingDifferentialFX(bool refresh=true)=0
The remote Talon used for differential control is not present on CAN Bus.
virtual ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Hardware fault occurred.
virtual ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX(units::time::second_t timeoutSeconds)=0
Clear sticky fault: The remote Talon used for differential control is not present on CAN Bus.
virtual StatusSignal< bool > & GetFault_ForwardHardLimit(bool refresh=true)=0
Forward limit switch has been asserted.
virtual ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Device supply voltage dropped to near brownout levels.
virtual ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse(units::time::second_t timeoutSeconds)=0
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
virtual ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Stator current limit occured.
virtual StatusSignal< bool > & GetStickyFault_ProcTemp(bool refresh=true)=0
Processor temperature exceeded limit.
virtual StatusSignal< bool > & GetFault_BootDuringEnable(bool refresh=true)=0
Device boot while detecting the enable signal.
virtual StatusSignal< bool > & GetStickyFault_FusedSensorOutOfSync(bool refresh=true)=0
The remote sensor used for fusion has fallen out of sync to the local sensor.
virtual ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Reverse limit switch has been asserted.
virtual StatusSignal< int > & GetVersion(bool refresh=true)=0
Full Version of firmware in device.
virtual StatusSignal< bool > & GetFault_BridgeBrownout(bool refresh=true)=0
Bridge was disabled most likely due to supply voltage dropping too low.
virtual StatusSignal< double > & GetClosedLoopReferenceSlope(bool refresh=true)=0
Derivative of the target that the closed loop is targeting.
virtual ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Device boot while detecting the enable signal.
virtual StatusSignal< bool > & GetFault_Undervoltage(bool refresh=true)=0
Device supply voltage dropped to near brownout levels.
virtual StatusSignal< bool > & GetFault_UnstableSupplyV(bool refresh=true)=0
Supply Voltage is unstable.
virtual StatusSignal< signals::RobotEnableValue > & GetRobotEnable(bool refresh=true)=0
Indicates if the robot is enabled.
virtual StatusSignal< units::current::ampere_t > & GetMotorStallCurrent(bool refresh=true)=0
The stall current of the motor at 12 V output.
virtual ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout()=0
Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low.
virtual ctre::phoenix::StatusCode ClearStickyFault_ProcTemp(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Processor temperature exceeded limit.
virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow(units::time::second_t timeoutSeconds)=0
Clear sticky fault: The remote sensor position has overflowed.
virtual ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote()=0
Clear sticky fault: The remote soft limit device is not present on CAN Bus.
virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid()=0
Clear sticky fault: The remote sensor's data is no longer trusted.
virtual StatusSignal< bool > & GetStickyFault_RemoteSensorDataInvalid(bool refresh=true)=0
The remote sensor's data is no longer trusted.
virtual StatusSignal< units::current::ampere_t > & GetSupplyCurrent(bool refresh=true)=0
Measured supply side current.
virtual StatusSignal< int > & GetFaultField(bool refresh=true)=0
Integer representing all fault flags reported by the device.
virtual StatusSignal< signals::ControlModeValue > & GetControlMode(bool refresh=true)=0
The active control mode of the motor controller.
virtual StatusSignal< int > & GetDifferentialClosedLoopSlot(bool refresh=true)=0
The slot that the closed-loop differential PID is using.
virtual StatusSignal< units::voltage::volt_t > & GetSupplyVoltage(bool refresh=true)=0
Measured supply voltage to the device.
virtual StatusSignal< bool > & GetStickyFault_MissingHardLimitRemote(bool refresh=true)=0
The remote limit switch device is not present on CAN Bus.
virtual StatusSignal< bool > & GetStickyFault_UnlicensedFeatureInUse(bool refresh=true)=0
An unlicensed feature is in use, device may not behave as expected.
virtual ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Supply current limit occured.
virtual ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV()=0
Clear sticky fault: Supply Voltage is unstable.
virtual StatusSignal< bool > & GetFault_MissingHardLimitRemote(bool refresh=true)=0
The remote limit switch device is not present on CAN Bus.
virtual ctre::phoenix::StatusCode ClearStickyFault_Undervoltage()=0
Clear sticky fault: Device supply voltage dropped to near brownout levels.
virtual ctre::phoenix::StatusCode ClearStickyFault_ProcTemp()=0
Clear sticky fault: Processor temperature exceeded limit.
virtual StatusSignal< bool > & GetStickyFault_OverSupplyV(bool refresh=true)=0
Supply Voltage has exceeded the maximum voltage rating of device.
virtual StatusSignal< signals::AppliedRotorPolarityValue > & GetAppliedRotorPolarity(bool refresh=true)=0
The applied rotor polarity as seen from the front of the motor.
virtual ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Supply Voltage is unstable.
virtual StatusSignal< bool > & GetStickyFault_StaticBrakeDisabled(bool refresh=true)=0
Static brake was momentarily disabled due to excessive braking current while disabled.
virtual StatusSignal< bool > & GetFault_ProcTemp(bool refresh=true)=0
Processor temperature exceeded limit.
virtual ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit()=0
Clear sticky fault: Stator current limit occured.
virtual StatusSignal< units::angle::turn_t > & GetDifferentialDifferencePosition(bool refresh=true)=0
Difference component of the differential position of device.
virtual ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote(units::time::second_t timeoutSeconds)=0
Clear sticky fault: The remote limit switch device is not present on CAN Bus.
virtual StatusSignal< bool > & GetFault_ForwardSoftLimit(bool refresh=true)=0
Forward soft limit has been asserted.
virtual ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit()=0
Clear sticky fault: Forward soft limit has been asserted.
virtual StatusSignal< bool > & GetFault_RemoteSensorDataInvalid(bool refresh=true)=0
The remote sensor's data is no longer trusted.
virtual StatusSignal< int > & GetStickyFaultField(bool refresh=true)=0
Integer representing all (persistent) sticky fault flags reported by the device.
virtual StatusSignal< double > & GetDifferentialClosedLoopError(bool refresh=true)=0
The difference between target differential reference and current measurement.
virtual StatusSignal< bool > & GetStickyFault_DeviceTemp(bool refresh=true)=0
Device temperature exceeded limit.
virtual ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device.
virtual ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Device temperature exceeded limit.
virtual StatusSignal< double > & GetClosedLoopOutput(bool refresh=true)=0
Closed loop total output.
virtual StatusSignal< bool > & GetIsProLicensed(bool refresh=true)=0
Whether the device is Phoenix Pro licensed.
virtual StatusSignal< bool > & GetStickyFault_MissingSoftLimitRemote(bool refresh=true)=0
The remote soft limit device is not present on CAN Bus.
virtual StatusSignal< bool > & GetFault_FusedSensorOutOfSync(bool refresh=true)=0
The remote sensor used for fusion has fallen out of sync to the local sensor.
virtual StatusSignal< bool > & GetFault_DeviceTemp(bool refresh=true)=0
Device temperature exceeded limit.
virtual StatusSignal< units::dimensionless::scalar_t > & GetDutyCycle(bool refresh=true)=0
The applied motor duty cycle.
virtual ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV()=0
Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device.
virtual StatusSignal< bool > & GetFault_RemoteSensorReset(bool refresh=true)=0
The remote sensor has reset.
virtual StatusSignal< double > & GetClosedLoopReference(bool refresh=true)=0
Value that the closed loop is targeting.
virtual ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit()=0
Clear sticky fault: Reverse limit switch has been asserted.
virtual ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled(units::time::second_t timeoutSeconds)=0
Clear sticky fault: Static brake was momentarily disabled due to excessive braking current while disa...
virtual StatusSignal< units::angular_acceleration::turns_per_second_squared_t > & GetAcceleration(bool refresh=true)=0
Acceleration of the device in mechanism rotations per second².
virtual StatusSignal< bool > & GetFault_ReverseHardLimit(bool refresh=true)=0
Reverse limit switch has been asserted.
virtual StatusSignal< double > & GetDifferentialClosedLoopFeedForward(bool refresh=true)=0
Differential Feedforward passed by the user.
virtual StatusSignal< double > & GetClosedLoopError(bool refresh=true)=0
The difference between target reference and current measurement.
virtual StatusSignal< bool > & GetFault_MissingDifferentialFX(bool refresh=true)=0
The remote Talon used for differential control is not present on CAN Bus.
virtual StatusSignal< int > & GetVersionBugfix(bool refresh=true)=0
App Bugfix Version number.
virtual StatusSignal< double > & GetDifferentialClosedLoopIntegratedOutput(bool refresh=true)=0
Differential closed loop integrated component.
virtual ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote()=0
Clear sticky fault: The remote limit switch device is not present on CAN Bus.
virtual StatusSignal< bool > & GetFault_MissingSoftLimitRemote(bool refresh=true)=0
The remote soft limit device is not present on CAN Bus.
virtual StatusSignal< double > & GetClosedLoopFeedForward(bool refresh=true)=0
Feedforward passed by the user.
virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset(units::time::second_t timeoutSeconds)=0
Clear sticky fault: The remote sensor has reset.
virtual StatusSignal< bool > & GetFault_ReverseSoftLimit(bool refresh=true)=0
Reverse soft limit has been asserted.
virtual StatusSignal< bool > & GetStickyFault_SupplyCurrLimit(bool refresh=true)=0
Supply current limit occured.
virtual StatusSignal< double > & GetDifferentialOutput(bool refresh=true)=0
The calculated motor output for differential followers.
virtual StatusSignal< bool > & GetStickyFault_ForwardSoftLimit(bool refresh=true)=0
Forward soft limit has been asserted.
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:28
Definition motor_constants.h:14