CTRE Phoenix 6 C++ 26.3.0
Loading...
Searching...
No Matches
CorePigeon2.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
18
20#include <units/acceleration.h>
21#include <units/angle.h>
22#include <units/angular_velocity.h>
23#include <units/dimensionless.h>
24#include <units/magnetic_field_strength.h>
25#include <units/temperature.h>
26#include <units/time.h>
27#include <units/voltage.h>
28
29namespace ctre {
30namespace phoenix6 {
31
32namespace hardware {
33namespace core {
34 class CorePigeon2;
35}
36}
37
38namespace configs {
39
40/**
41 * Class description for the Pigeon 2 IMU sensor that measures orientation.
42 *
43 * This defines all configurations for the hardware#Pigeon2.
44 */
46{
47public:
48 constexpr Pigeon2Configuration() = default;
49
50 /**
51 * \brief True if we should factory default newer unsupported configs,
52 * false to leave newer unsupported configs alone.
53 *
54 * \details This flag addresses a corner case where the device may have
55 * firmware with newer configs that didn't exist when this
56 * version of the API was built. If this occurs and this
57 * flag is true, unsupported new configs will be factory
58 * defaulted to avoid unexpected behavior.
59 *
60 * This is also the behavior in Phoenix 5, so this flag
61 * is defaulted to true to match.
62 */
64
65
66 /**
67 * \brief Configs for Pigeon 2's Mount Pose configuration.
68 *
69 * \details These configs allow the Pigeon2 to be mounted in whatever
70 * orientation that's desired and ensure the reported
71 * Yaw/Pitch/Roll is from the robot's reference.
72 *
73 * Parameter list:
74 *
75 * - MountPoseConfigs#MountPoseYaw
76 * - MountPoseConfigs#MountPosePitch
77 * - MountPoseConfigs#MountPoseRoll
78 *
79 */
81
82 /**
83 * \brief Configs to trim the Pigeon2's gyroscope.
84 *
85 * \details Pigeon2 allows the user to trim the gyroscope's
86 * sensitivity. While this isn't necessary for the Pigeon2,
87 * as it comes calibrated out-of-the-box, users can make use
88 * of this to make the Pigeon2 even more accurate for their
89 * application.
90 *
91 * Parameter list:
92 *
93 * - GyroTrimConfigs#GyroScalarX
94 * - GyroTrimConfigs#GyroScalarY
95 * - GyroTrimConfigs#GyroScalarZ
96 *
97 */
99
100 /**
101 * \brief Configs to enable/disable various features of the Pigeon2.
102 *
103 * \details These configs allow the user to enable or disable various
104 * aspects of the Pigeon2.
105 *
106 * Parameter list:
107 *
108 * - Pigeon2FeaturesConfigs#EnableCompass
109 * - Pigeon2FeaturesConfigs#DisableTemperatureCompensation
110 * - Pigeon2FeaturesConfigs#DisableNoMotionCalibration
111 *
112 */
114
115 /**
116 * \brief Custom Params.
117 *
118 * \details Custom paramaters that have no real impact on controller.
119 *
120 * Parameter list:
121 *
122 * - CustomParamsConfigs#CustomParam0
123 * - CustomParamsConfigs#CustomParam1
124 *
125 */
127
128 /**
129 * \brief Modifies this configuration's MountPose parameter and returns itself for
130 * method-chaining and easier to use config API.
131 *
132 * Configs for Pigeon 2's Mount Pose configuration.
133 *
134 * \details These configs allow the Pigeon2 to be mounted in whatever
135 * orientation that's desired and ensure the reported
136 * Yaw/Pitch/Roll is from the robot's reference.
137 *
138 * Parameter list:
139 *
140 * - MountPoseConfigs#MountPoseYaw
141 * - MountPoseConfigs#MountPosePitch
142 * - MountPoseConfigs#MountPoseRoll
143 *
144 *
145 * \param newMountPose Parameter to modify
146 * \returns Itself
147 */
149 {
150 MountPose = std::move(newMountPose);
151 return *this;
152 }
153
154 /**
155 * \brief Modifies this configuration's GyroTrim parameter and returns itself for
156 * method-chaining and easier to use config API.
157 *
158 * Configs to trim the Pigeon2's gyroscope.
159 *
160 * \details Pigeon2 allows the user to trim the gyroscope's
161 * sensitivity. While this isn't necessary for the Pigeon2,
162 * as it comes calibrated out-of-the-box, users can make use
163 * of this to make the Pigeon2 even more accurate for their
164 * application.
165 *
166 * Parameter list:
167 *
168 * - GyroTrimConfigs#GyroScalarX
169 * - GyroTrimConfigs#GyroScalarY
170 * - GyroTrimConfigs#GyroScalarZ
171 *
172 *
173 * \param newGyroTrim Parameter to modify
174 * \returns Itself
175 */
177 {
178 GyroTrim = std::move(newGyroTrim);
179 return *this;
180 }
181
182 /**
183 * \brief Modifies this configuration's Pigeon2Features parameter and returns itself for
184 * method-chaining and easier to use config API.
185 *
186 * Configs to enable/disable various features of the Pigeon2.
187 *
188 * \details These configs allow the user to enable or disable various
189 * aspects of the Pigeon2.
190 *
191 * Parameter list:
192 *
193 * - Pigeon2FeaturesConfigs#EnableCompass
194 * - Pigeon2FeaturesConfigs#DisableTemperatureCompensation
195 * - Pigeon2FeaturesConfigs#DisableNoMotionCalibration
196 *
197 *
198 * \param newPigeon2Features Parameter to modify
199 * \returns Itself
200 */
202 {
203 Pigeon2Features = std::move(newPigeon2Features);
204 return *this;
205 }
206
207 /**
208 * \brief Modifies this configuration's CustomParams parameter and returns itself for
209 * method-chaining and easier to use config API.
210 *
211 * Custom Params.
212 *
213 * \details Custom paramaters that have no real impact on controller.
214 *
215 * Parameter list:
216 *
217 * - CustomParamsConfigs#CustomParam0
218 * - CustomParamsConfigs#CustomParam1
219 *
220 *
221 * \param newCustomParams Parameter to modify
222 * \returns Itself
223 */
225 {
226 CustomParams = std::move(newCustomParams);
227 return *this;
228 }
229
230 /**
231 * \brief Get the string representation of this configuration
232 */
233 std::string ToString() const override;
234
235 /**
236 * \brief Get the serialized form of this configuration
237 */
238 std::string Serialize() const final;
239 /**
240 * \brief Take a string and deserialize it to this configuration
241 */
242 ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final;
243};
244
245/**
246 * Class description for the Pigeon 2 IMU sensor that measures orientation.
247 *
248 * This handles applying and refreshing configurations for the hardware#Pigeon2.
249 */
251{
252private:
254 ParentConfigurator{std::move(id)}
255 {}
256
258
259public:
260 /**
261 * \brief Applies the contents of the specified config to the device.
262 *
263 * This will wait up to #DefaultTimeoutSeconds.
264 *
265 * \details Call to apply the selected configs.
266 *
267 * \param configs Configs to apply against.
268 * \returns Status code of applying the configs
269 */
271 {
272 return Apply(configs, DefaultTimeoutSeconds);
273 }
274
275 /**
276 * \brief Applies the contents of the specified config to the device.
277 *
278 * \details Call to apply the selected configs.
279 *
280 * \param configs Configs to apply against.
281 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
282 * \returns Status code of applying the configs
283 */
284 ctre::phoenix::StatusCode Apply(const Pigeon2Configuration &configs, units::time::second_t timeoutSeconds)
285 {
286 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, configs.FutureProofConfigs, false);
287 }
288
289 /**
290 * \brief Applies the contents of the specified config to the device.
291 *
292 * This will wait up to #DefaultTimeoutSeconds.
293 *
294 * \details Call to apply the selected configs.
295 *
296 * \param configs Configs to apply against.
297 * \returns Status code of applying the configs
298 */
300 {
301 return Apply(configs, DefaultTimeoutSeconds);
302 }
303
304 /**
305 * \brief Applies the contents of the specified config to the device.
306 *
307 * \details Call to apply the selected configs.
308 *
309 * \param configs Configs to apply against.
310 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
311 * \returns Status code of applying the configs
312 */
313 ctre::phoenix::StatusCode Apply(const MountPoseConfigs &configs, units::time::second_t timeoutSeconds)
314 {
315 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
316 }
317
318 /**
319 * \brief Applies the contents of the specified config to the device.
320 *
321 * This will wait up to #DefaultTimeoutSeconds.
322 *
323 * \details Call to apply the selected configs.
324 *
325 * \param configs Configs to apply against.
326 * \returns Status code of applying the configs
327 */
329 {
330 return Apply(configs, DefaultTimeoutSeconds);
331 }
332
333 /**
334 * \brief Applies the contents of the specified config to the device.
335 *
336 * \details Call to apply the selected configs.
337 *
338 * \param configs Configs to apply against.
339 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
340 * \returns Status code of applying the configs
341 */
342 ctre::phoenix::StatusCode Apply(const GyroTrimConfigs &configs, units::time::second_t timeoutSeconds)
343 {
344 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
345 }
346
347 /**
348 * \brief Applies the contents of the specified config to the device.
349 *
350 * This will wait up to #DefaultTimeoutSeconds.
351 *
352 * \details Call to apply the selected configs.
353 *
354 * \param configs Configs to apply against.
355 * \returns Status code of applying the configs
356 */
358 {
359 return Apply(configs, DefaultTimeoutSeconds);
360 }
361
362 /**
363 * \brief Applies the contents of the specified config to the device.
364 *
365 * \details Call to apply the selected configs.
366 *
367 * \param configs Configs to apply against.
368 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
369 * \returns Status code of applying the configs
370 */
371 ctre::phoenix::StatusCode Apply(const Pigeon2FeaturesConfigs &configs, units::time::second_t timeoutSeconds)
372 {
373 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
374 }
375
376 /**
377 * \brief Applies the contents of the specified config to the device.
378 *
379 * This will wait up to #DefaultTimeoutSeconds.
380 *
381 * \details Call to apply the selected configs.
382 *
383 * \param configs Configs to apply against.
384 * \returns Status code of applying the configs
385 */
387 {
388 return Apply(configs, DefaultTimeoutSeconds);
389 }
390
391 /**
392 * \brief Applies the contents of the specified config to the device.
393 *
394 * \details Call to apply the selected configs.
395 *
396 * \param configs Configs to apply against.
397 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
398 * \returns Status code of applying the configs
399 */
400 ctre::phoenix::StatusCode Apply(const CustomParamsConfigs &configs, units::time::second_t timeoutSeconds)
401 {
402 return SetConfigsPrivate(configs.Serialize(), timeoutSeconds, false, false);
403 }
404
405 /**
406 * \brief Refreshes the values of the specified config group.
407 *
408 * This will wait up to #DefaultTimeoutSeconds.
409 *
410 * \details Call to refresh the selected configs from the device.
411 *
412 * \param configs The configs to refresh
413 * \returns Status code of refreshing the configs
414 */
416 {
417 return Refresh(configs, DefaultTimeoutSeconds);
418 }
419
420 /**
421 * \brief Refreshes the values of the specified config group.
422 *
423 * \details Call to refresh the selected configs from the device.
424 *
425 * \param configs The configs to refresh
426 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
427 * \returns Status code of refreshing the configs
428 */
429 ctre::phoenix::StatusCode Refresh(Pigeon2Configuration &configs, units::time::second_t timeoutSeconds) const
430 {
431 std::string ref;
432 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
433 configs.Deserialize(ref);
434 return ret;
435 }
436
437 /**
438 * \brief Refreshes the values of the specified config group.
439 *
440 * This will wait up to #DefaultTimeoutSeconds.
441 *
442 * \details Call to refresh the selected configs from the device.
443 *
444 * \param configs The configs to refresh
445 * \returns Status code of refreshing the configs
446 */
448 {
449 return Refresh(configs, DefaultTimeoutSeconds);
450 }
451 /**
452 * \brief Refreshes the values of the specified config group.
453 *
454 * \details Call to refresh the selected configs from the device.
455 *
456 * \param configs The configs to refresh
457 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
458 * \returns Status code of refreshing the configs
459 */
460 ctre::phoenix::StatusCode Refresh(MountPoseConfigs &configs, units::time::second_t timeoutSeconds) const
461 {
462 std::string ref;
463 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
464 configs.Deserialize(ref);
465 return ret;
466 }
467
468 /**
469 * \brief Refreshes the values of the specified config group.
470 *
471 * This will wait up to #DefaultTimeoutSeconds.
472 *
473 * \details Call to refresh the selected configs from the device.
474 *
475 * \param configs The configs to refresh
476 * \returns Status code of refreshing the configs
477 */
479 {
480 return Refresh(configs, DefaultTimeoutSeconds);
481 }
482 /**
483 * \brief Refreshes the values of the specified config group.
484 *
485 * \details Call to refresh the selected configs from the device.
486 *
487 * \param configs The configs to refresh
488 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
489 * \returns Status code of refreshing the configs
490 */
491 ctre::phoenix::StatusCode Refresh(GyroTrimConfigs &configs, units::time::second_t timeoutSeconds) const
492 {
493 std::string ref;
494 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
495 configs.Deserialize(ref);
496 return ret;
497 }
498
499 /**
500 * \brief Refreshes the values of the specified config group.
501 *
502 * This will wait up to #DefaultTimeoutSeconds.
503 *
504 * \details Call to refresh the selected configs from the device.
505 *
506 * \param configs The configs to refresh
507 * \returns Status code of refreshing the configs
508 */
510 {
511 return Refresh(configs, DefaultTimeoutSeconds);
512 }
513 /**
514 * \brief Refreshes the values of the specified config group.
515 *
516 * \details Call to refresh the selected configs from the device.
517 *
518 * \param configs The configs to refresh
519 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
520 * \returns Status code of refreshing the configs
521 */
522 ctre::phoenix::StatusCode Refresh(Pigeon2FeaturesConfigs &configs, units::time::second_t timeoutSeconds) const
523 {
524 std::string ref;
525 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
526 configs.Deserialize(ref);
527 return ret;
528 }
529
530 /**
531 * \brief Refreshes the values of the specified config group.
532 *
533 * This will wait up to #DefaultTimeoutSeconds.
534 *
535 * \details Call to refresh the selected configs from the device.
536 *
537 * \param configs The configs to refresh
538 * \returns Status code of refreshing the configs
539 */
541 {
542 return Refresh(configs, DefaultTimeoutSeconds);
543 }
544 /**
545 * \brief Refreshes the values of the specified config group.
546 *
547 * \details Call to refresh the selected configs from the device.
548 *
549 * \param configs The configs to refresh
550 * \param timeoutSeconds Maximum amount of time to wait when performing configuration
551 * \returns Status code of refreshing the configs
552 */
553 ctre::phoenix::StatusCode Refresh(CustomParamsConfigs &configs, units::time::second_t timeoutSeconds) const
554 {
555 std::string ref;
556 ctre::phoenix::StatusCode ret = GetConfigsPrivate(ref, timeoutSeconds);
557 configs.Deserialize(ref);
558 return ret;
559 }
560
561
562 /**
563 * \brief The yaw to set the Pigeon2 to right now.
564 *
565 * This will wait up to #DefaultTimeoutSeconds.
566 *
567 * This is available in the configurator in case the user wants
568 * to initialize their device entirely without passing a device
569 * reference down to the code that performs the initialization.
570 * In this case, the user passes down the configurator object
571 * and performs all the initialization code on the object.
572 *
573 * \param newValue Value to set to. Units are in deg.
574 * \returns StatusCode of the set command
575 */
576 ctre::phoenix::StatusCode SetYaw(units::angle::degree_t newValue)
577 {
578 return SetYaw(newValue, DefaultTimeoutSeconds);
579 }
580 /**
581 * \brief The yaw to set the Pigeon2 to right now.
582 *
583 * This is available in the configurator in case the user wants
584 * to initialize their device entirely without passing a device
585 * reference down to the code that performs the initialization.
586 * In this case, the user passes down the configurator object
587 * and performs all the initialization code on the object.
588 *
589 * \param newValue Value to set to. Units are in deg.
590 * \param timeoutSeconds Maximum time to wait up to in seconds.
591 * \returns StatusCode of the set command
592 */
593 ctre::phoenix::StatusCode SetYaw(units::angle::degree_t newValue, units::time::second_t timeoutSeconds);
594
595 /**
596 * \brief Clear the sticky faults in the device.
597 *
598 * \details This typically has no impact on the device functionality.
599 * Instead, it just clears telemetry faults that are accessible via
600 * API and Tuner Self-Test.
601 *
602 * This will wait up to #DefaultTimeoutSeconds.
603 *
604 * This is available in the configurator in case the user wants
605 * to initialize their device entirely without passing a device
606 * reference down to the code that performs the initialization.
607 * In this case, the user passes down the configurator object
608 * and performs all the initialization code on the object.
609 *
610 * \returns StatusCode of the set command
611 */
613 {
614 return ClearStickyFaults(DefaultTimeoutSeconds);
615 }
616 /**
617 * \brief Clear the sticky faults in the device.
618 *
619 * \details This typically has no impact on the device functionality.
620 * Instead, it just clears telemetry faults that are accessible via
621 * API and Tuner Self-Test.
622 *
623 * This is available in the configurator in case the user wants
624 * to initialize their device entirely without passing a device
625 * reference down to the code that performs the initialization.
626 * In this case, the user passes down the configurator object
627 * and performs all the initialization code on the object.
628 *
629 * \param timeoutSeconds Maximum time to wait up to in seconds.
630 * \returns StatusCode of the set command
631 */
632 ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds);
633
634 /**
635 * \brief Clear sticky fault: Hardware fault occurred
636 *
637 * This will wait up to #DefaultTimeoutSeconds.
638 *
639 * This is available in the configurator in case the user wants
640 * to initialize their device entirely without passing a device
641 * reference down to the code that performs the initialization.
642 * In this case, the user passes down the configurator object
643 * and performs all the initialization code on the object.
644 *
645 * \returns StatusCode of the set command
646 */
648 {
649 return ClearStickyFault_Hardware(DefaultTimeoutSeconds);
650 }
651 /**
652 * \brief Clear sticky fault: Hardware fault occurred
653 *
654 * This is available in the configurator in case the user wants
655 * to initialize their device entirely without passing a device
656 * reference down to the code that performs the initialization.
657 * In this case, the user passes down the configurator object
658 * and performs all the initialization code on the object.
659 *
660 * \param timeoutSeconds Maximum time to wait up to in seconds.
661 * \returns StatusCode of the set command
662 */
663 ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds);
664
665 /**
666 * \brief Clear sticky fault: Device supply voltage dropped to near
667 * brownout levels
668 *
669 * This will wait up to #DefaultTimeoutSeconds.
670 *
671 * This is available in the configurator in case the user wants
672 * to initialize their device entirely without passing a device
673 * reference down to the code that performs the initialization.
674 * In this case, the user passes down the configurator object
675 * and performs all the initialization code on the object.
676 *
677 * \returns StatusCode of the set command
678 */
680 {
681 return ClearStickyFault_Undervoltage(DefaultTimeoutSeconds);
682 }
683 /**
684 * \brief Clear sticky fault: Device supply voltage dropped to near
685 * brownout levels
686 *
687 * This is available in the configurator in case the user wants
688 * to initialize their device entirely without passing a device
689 * reference down to the code that performs the initialization.
690 * In this case, the user passes down the configurator object
691 * and performs all the initialization code on the object.
692 *
693 * \param timeoutSeconds Maximum time to wait up to in seconds.
694 * \returns StatusCode of the set command
695 */
696 ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds);
697
698 /**
699 * \brief Clear sticky fault: Device boot while detecting the enable
700 * signal
701 *
702 * This will wait up to #DefaultTimeoutSeconds.
703 *
704 * This is available in the configurator in case the user wants
705 * to initialize their device entirely without passing a device
706 * reference down to the code that performs the initialization.
707 * In this case, the user passes down the configurator object
708 * and performs all the initialization code on the object.
709 *
710 * \returns StatusCode of the set command
711 */
713 {
714 return ClearStickyFault_BootDuringEnable(DefaultTimeoutSeconds);
715 }
716 /**
717 * \brief Clear sticky fault: Device boot while detecting the enable
718 * signal
719 *
720 * This is available in the configurator in case the user wants
721 * to initialize their device entirely without passing a device
722 * reference down to the code that performs the initialization.
723 * In this case, the user passes down the configurator object
724 * and performs all the initialization code on the object.
725 *
726 * \param timeoutSeconds Maximum time to wait up to in seconds.
727 * \returns StatusCode of the set command
728 */
730
731 /**
732 * \brief Clear sticky fault: An unlicensed feature is in use, device
733 * may not behave as expected.
734 *
735 * This will wait up to #DefaultTimeoutSeconds.
736 *
737 * This is available in the configurator in case the user wants
738 * to initialize their device entirely without passing a device
739 * reference down to the code that performs the initialization.
740 * In this case, the user passes down the configurator object
741 * and performs all the initialization code on the object.
742 *
743 * \returns StatusCode of the set command
744 */
746 {
747 return ClearStickyFault_UnlicensedFeatureInUse(DefaultTimeoutSeconds);
748 }
749 /**
750 * \brief Clear sticky fault: An unlicensed feature is in use, device
751 * may not behave as expected.
752 *
753 * This is available in the configurator in case the user wants
754 * to initialize their device entirely without passing a device
755 * reference down to the code that performs the initialization.
756 * In this case, the user passes down the configurator object
757 * and performs all the initialization code on the object.
758 *
759 * \param timeoutSeconds Maximum time to wait up to in seconds.
760 * \returns StatusCode of the set command
761 */
763
764 /**
765 * \brief Clear sticky fault: Bootup checks failed: Accelerometer
766 *
767 * This will wait up to #DefaultTimeoutSeconds.
768 *
769 * This is available in the configurator in case the user wants
770 * to initialize their device entirely without passing a device
771 * reference down to the code that performs the initialization.
772 * In this case, the user passes down the configurator object
773 * and performs all the initialization code on the object.
774 *
775 * \returns StatusCode of the set command
776 */
778 {
779 return ClearStickyFault_BootupAccelerometer(DefaultTimeoutSeconds);
780 }
781 /**
782 * \brief Clear sticky fault: Bootup checks failed: Accelerometer
783 *
784 * This is available in the configurator in case the user wants
785 * to initialize their device entirely without passing a device
786 * reference down to the code that performs the initialization.
787 * In this case, the user passes down the configurator object
788 * and performs all the initialization code on the object.
789 *
790 * \param timeoutSeconds Maximum time to wait up to in seconds.
791 * \returns StatusCode of the set command
792 */
794
795 /**
796 * \brief Clear sticky fault: Bootup checks failed: Gyroscope
797 *
798 * This will wait up to #DefaultTimeoutSeconds.
799 *
800 * This is available in the configurator in case the user wants
801 * to initialize their device entirely without passing a device
802 * reference down to the code that performs the initialization.
803 * In this case, the user passes down the configurator object
804 * and performs all the initialization code on the object.
805 *
806 * \returns StatusCode of the set command
807 */
809 {
810 return ClearStickyFault_BootupGyroscope(DefaultTimeoutSeconds);
811 }
812 /**
813 * \brief Clear sticky fault: Bootup checks failed: Gyroscope
814 *
815 * This is available in the configurator in case the user wants
816 * to initialize their device entirely without passing a device
817 * reference down to the code that performs the initialization.
818 * In this case, the user passes down the configurator object
819 * and performs all the initialization code on the object.
820 *
821 * \param timeoutSeconds Maximum time to wait up to in seconds.
822 * \returns StatusCode of the set command
823 */
824 ctre::phoenix::StatusCode ClearStickyFault_BootupGyroscope(units::time::second_t timeoutSeconds);
825
826 /**
827 * \brief Clear sticky fault: Bootup checks failed: Magnetometer
828 *
829 * This will wait up to #DefaultTimeoutSeconds.
830 *
831 * This is available in the configurator in case the user wants
832 * to initialize their device entirely without passing a device
833 * reference down to the code that performs the initialization.
834 * In this case, the user passes down the configurator object
835 * and performs all the initialization code on the object.
836 *
837 * \returns StatusCode of the set command
838 */
840 {
841 return ClearStickyFault_BootupMagnetometer(DefaultTimeoutSeconds);
842 }
843 /**
844 * \brief Clear sticky fault: Bootup checks failed: Magnetometer
845 *
846 * This is available in the configurator in case the user wants
847 * to initialize their device entirely without passing a device
848 * reference down to the code that performs the initialization.
849 * In this case, the user passes down the configurator object
850 * and performs all the initialization code on the object.
851 *
852 * \param timeoutSeconds Maximum time to wait up to in seconds.
853 * \returns StatusCode of the set command
854 */
856
857 /**
858 * \brief Clear sticky fault: Motion Detected during bootup.
859 *
860 * This will wait up to #DefaultTimeoutSeconds.
861 *
862 * This is available in the configurator in case the user wants
863 * to initialize their device entirely without passing a device
864 * reference down to the code that performs the initialization.
865 * In this case, the user passes down the configurator object
866 * and performs all the initialization code on the object.
867 *
868 * \returns StatusCode of the set command
869 */
871 {
872 return ClearStickyFault_BootIntoMotion(DefaultTimeoutSeconds);
873 }
874 /**
875 * \brief Clear sticky fault: Motion Detected during bootup.
876 *
877 * This is available in the configurator in case the user wants
878 * to initialize their device entirely without passing a device
879 * reference down to the code that performs the initialization.
880 * In this case, the user passes down the configurator object
881 * and performs all the initialization code on the object.
882 *
883 * \param timeoutSeconds Maximum time to wait up to in seconds.
884 * \returns StatusCode of the set command
885 */
886 ctre::phoenix::StatusCode ClearStickyFault_BootIntoMotion(units::time::second_t timeoutSeconds);
887
888 /**
889 * \brief Clear sticky fault: Motion stack data acquisition was slower
890 * than expected
891 *
892 * This will wait up to #DefaultTimeoutSeconds.
893 *
894 * This is available in the configurator in case the user wants
895 * to initialize their device entirely without passing a device
896 * reference down to the code that performs the initialization.
897 * In this case, the user passes down the configurator object
898 * and performs all the initialization code on the object.
899 *
900 * \returns StatusCode of the set command
901 */
903 {
904 return ClearStickyFault_DataAcquiredLate(DefaultTimeoutSeconds);
905 }
906 /**
907 * \brief Clear sticky fault: Motion stack data acquisition was slower
908 * than expected
909 *
910 * This is available in the configurator in case the user wants
911 * to initialize their device entirely without passing a device
912 * reference down to the code that performs the initialization.
913 * In this case, the user passes down the configurator object
914 * and performs all the initialization code on the object.
915 *
916 * \param timeoutSeconds Maximum time to wait up to in seconds.
917 * \returns StatusCode of the set command
918 */
920
921 /**
922 * \brief Clear sticky fault: Motion stack loop time was slower than
923 * expected.
924 *
925 * This will wait up to #DefaultTimeoutSeconds.
926 *
927 * This is available in the configurator in case the user wants
928 * to initialize their device entirely without passing a device
929 * reference down to the code that performs the initialization.
930 * In this case, the user passes down the configurator object
931 * and performs all the initialization code on the object.
932 *
933 * \returns StatusCode of the set command
934 */
936 {
937 return ClearStickyFault_LoopTimeSlow(DefaultTimeoutSeconds);
938 }
939 /**
940 * \brief Clear sticky fault: Motion stack loop time was slower than
941 * expected.
942 *
943 * This is available in the configurator in case the user wants
944 * to initialize their device entirely without passing a device
945 * reference down to the code that performs the initialization.
946 * In this case, the user passes down the configurator object
947 * and performs all the initialization code on the object.
948 *
949 * \param timeoutSeconds Maximum time to wait up to in seconds.
950 * \returns StatusCode of the set command
951 */
952 ctre::phoenix::StatusCode ClearStickyFault_LoopTimeSlow(units::time::second_t timeoutSeconds);
953
954 /**
955 * \brief Clear sticky fault: Magnetometer values are saturated
956 *
957 * This will wait up to #DefaultTimeoutSeconds.
958 *
959 * This is available in the configurator in case the user wants
960 * to initialize their device entirely without passing a device
961 * reference down to the code that performs the initialization.
962 * In this case, the user passes down the configurator object
963 * and performs all the initialization code on the object.
964 *
965 * \returns StatusCode of the set command
966 */
968 {
969 return ClearStickyFault_SaturatedMagnetometer(DefaultTimeoutSeconds);
970 }
971 /**
972 * \brief Clear sticky fault: Magnetometer values are saturated
973 *
974 * This is available in the configurator in case the user wants
975 * to initialize their device entirely without passing a device
976 * reference down to the code that performs the initialization.
977 * In this case, the user passes down the configurator object
978 * and performs all the initialization code on the object.
979 *
980 * \param timeoutSeconds Maximum time to wait up to in seconds.
981 * \returns StatusCode of the set command
982 */
984
985 /**
986 * \brief Clear sticky fault: Accelerometer values are saturated
987 *
988 * This will wait up to #DefaultTimeoutSeconds.
989 *
990 * This is available in the configurator in case the user wants
991 * to initialize their device entirely without passing a device
992 * reference down to the code that performs the initialization.
993 * In this case, the user passes down the configurator object
994 * and performs all the initialization code on the object.
995 *
996 * \returns StatusCode of the set command
997 */
999 {
1000 return ClearStickyFault_SaturatedAccelerometer(DefaultTimeoutSeconds);
1001 }
1002 /**
1003 * \brief Clear sticky fault: Accelerometer values are saturated
1004 *
1005 * This is available in the configurator in case the user wants
1006 * to initialize their device entirely without passing a device
1007 * reference down to the code that performs the initialization.
1008 * In this case, the user passes down the configurator object
1009 * and performs all the initialization code on the object.
1010 *
1011 * \param timeoutSeconds Maximum time to wait up to in seconds.
1012 * \returns StatusCode of the set command
1013 */
1015
1016 /**
1017 * \brief Clear sticky fault: Gyroscope values are saturated
1018 *
1019 * This will wait up to #DefaultTimeoutSeconds.
1020 *
1021 * This is available in the configurator in case the user wants
1022 * to initialize their device entirely without passing a device
1023 * reference down to the code that performs the initialization.
1024 * In this case, the user passes down the configurator object
1025 * and performs all the initialization code on the object.
1026 *
1027 * \returns StatusCode of the set command
1028 */
1030 {
1031 return ClearStickyFault_SaturatedGyroscope(DefaultTimeoutSeconds);
1032 }
1033 /**
1034 * \brief Clear sticky fault: Gyroscope values are saturated
1035 *
1036 * This is available in the configurator in case the user wants
1037 * to initialize their device entirely without passing a device
1038 * reference down to the code that performs the initialization.
1039 * In this case, the user passes down the configurator object
1040 * and performs all the initialization code on the object.
1041 *
1042 * \param timeoutSeconds Maximum time to wait up to in seconds.
1043 * \returns StatusCode of the set command
1044 */
1046};
1047
1048}
1049
1050namespace hardware {
1051namespace core {
1052
1053#if defined(_WIN32) || defined(_WIN64)
1054#pragma warning(push)
1055#pragma warning(disable : 4250)
1056#endif
1057
1058/**
1059 * Class description for the Pigeon 2 IMU sensor that measures orientation.
1060 */
1062{
1063private:
1065
1066public:
1067 /**
1068 * \brief The configuration class for this device.
1069 */
1071
1072 /**
1073 * Constructs a new Pigeon 2 sensor object.
1074 *
1075 * \param deviceId ID of the device, as configured in Phoenix Tuner
1076 * \param canbus The CAN bus this device is on
1077 */
1078 CorePigeon2(int deviceId, CANBus canbus = {});
1079
1080 /**
1081 * Constructs a new Pigeon 2 sensor object.
1082 *
1083 * \param deviceId ID of the device, as configured in Phoenix Tuner
1084 * \param canbus Name of the CAN bus this device is on. Possible CAN bus strings are:
1085 * - "rio" for the native roboRIO CAN bus
1086 * - CANivore name or serial number
1087 * - SocketCAN interface (non-FRC Linux only)
1088 * - "*" for any CANivore seen by the program
1089 * - empty string (default) to select the default for the system:
1090 * - "rio" on roboRIO
1091 * - "can0" on Linux
1092 * - "*" on Windows
1093 *
1094 * \deprecated Constructing devices with a CAN bus string is deprecated for removal
1095 * in the 2027 season. Construct devices using a CANBus instance instead.
1096 */
1097 CorePigeon2(int deviceId, std::string canbus);
1098
1099 /**
1100 * \brief Constructs a stubbed-out CorePigeon2, where all status signals, controls,
1101 * configs, etc. perform no action and immediately return OK. This can be used to
1102 * silence error messages for devices that have been completely removed from the robot.
1103 *
1104 * \returns Stubbed-out CorePigeon2
1105 */
1107 {
1108 return CorePigeon2{-1, CANBus{}};
1109 }
1110
1111 /**
1112 * \brief Gets the configurator for this Pigeon2
1113 *
1114 * \details Gets the configurator for this Pigeon2
1115 *
1116 * \returns Configurator for this Pigeon2
1117 */
1119 {
1120 return _configs;
1121 }
1122
1123 /**
1124 * \brief Gets the configurator for this Pigeon2
1125 *
1126 * \details Gets the configurator for this Pigeon2
1127 *
1128 * \returns Configurator for this Pigeon2
1129 */
1131 {
1132 return _configs;
1133 }
1134
1135
1136private:
1137 std::unique_ptr<sim::Pigeon2SimState> _simState{};
1138public:
1139 /**
1140 * \brief Get the simulation state for this device.
1141 *
1142 * \details This function reuses an allocated simulation
1143 * state object, so it is safe to call this function multiple
1144 * times in a robot loop.
1145 *
1146 * \returns Simulation state
1147 */
1149 {
1150 if (_simState == nullptr)
1151 _simState = std::make_unique<sim::Pigeon2SimState>(*this);
1152 return *_simState;
1153 }
1154
1155
1156
1157 /**
1158 * \brief App Major Version number.
1159 *
1160 * - Minimum Value: 0
1161 * - Maximum Value: 255
1162 * - Default Value: 0
1163 * - Units:
1164 *
1165 * Default Rates:
1166 * - CAN: 4.0 Hz
1167 *
1168 * This refreshes and returns a cached StatusSignal object.
1169 *
1170 * \param refresh Whether to refresh the StatusSignal before returning it;
1171 * defaults to true
1172 * \returns VersionMajor Status Signal Object
1173 */
1174 StatusSignal<int> &GetVersionMajor(bool refresh = true);
1175
1176 /**
1177 * \brief App Minor Version number.
1178 *
1179 * - Minimum Value: 0
1180 * - Maximum Value: 255
1181 * - Default Value: 0
1182 * - Units:
1183 *
1184 * Default Rates:
1185 * - CAN: 4.0 Hz
1186 *
1187 * This refreshes and returns a cached StatusSignal object.
1188 *
1189 * \param refresh Whether to refresh the StatusSignal before returning it;
1190 * defaults to true
1191 * \returns VersionMinor Status Signal Object
1192 */
1193 StatusSignal<int> &GetVersionMinor(bool refresh = true);
1194
1195 /**
1196 * \brief App Bugfix Version number.
1197 *
1198 * - Minimum Value: 0
1199 * - Maximum Value: 255
1200 * - Default Value: 0
1201 * - Units:
1202 *
1203 * Default Rates:
1204 * - CAN: 4.0 Hz
1205 *
1206 * This refreshes and returns a cached StatusSignal object.
1207 *
1208 * \param refresh Whether to refresh the StatusSignal before returning it;
1209 * defaults to true
1210 * \returns VersionBugfix Status Signal Object
1211 */
1213
1214 /**
1215 * \brief App Build Version number.
1216 *
1217 * - Minimum Value: 0
1218 * - Maximum Value: 255
1219 * - Default Value: 0
1220 * - Units:
1221 *
1222 * Default Rates:
1223 * - CAN: 4.0 Hz
1224 *
1225 * This refreshes and returns a cached StatusSignal object.
1226 *
1227 * \param refresh Whether to refresh the StatusSignal before returning it;
1228 * defaults to true
1229 * \returns VersionBuild Status Signal Object
1230 */
1231 StatusSignal<int> &GetVersionBuild(bool refresh = true);
1232
1233 /**
1234 * \brief Full Version of firmware in device. The format is a four
1235 * byte value.
1236 *
1237 * - Minimum Value: 0
1238 * - Maximum Value: 4294967295
1239 * - Default Value: 0
1240 * - Units:
1241 *
1242 * Default Rates:
1243 * - CAN: 4.0 Hz
1244 *
1245 * This refreshes and returns a cached StatusSignal object.
1246 *
1247 * \param refresh Whether to refresh the StatusSignal before returning it;
1248 * defaults to true
1249 * \returns Version Status Signal Object
1250 */
1251 StatusSignal<int> &GetVersion(bool refresh = true);
1252
1253 /**
1254 * \brief Integer representing all fault flags reported by the device.
1255 *
1256 * \details These are device specific and are not used directly in
1257 * typical applications. Use the signal specific GetFault_*() methods
1258 * instead.
1259 *
1260 * - Minimum Value: 0
1261 * - Maximum Value: 4294967295
1262 * - Default Value: 0
1263 * - Units:
1264 *
1265 * Default Rates:
1266 * - CAN: 4.0 Hz
1267 *
1268 * This refreshes and returns a cached StatusSignal object.
1269 *
1270 * \param refresh Whether to refresh the StatusSignal before returning it;
1271 * defaults to true
1272 * \returns FaultField Status Signal Object
1273 */
1274 StatusSignal<int> &GetFaultField(bool refresh = true);
1275
1276 /**
1277 * \brief Integer representing all (persistent) sticky fault flags
1278 * reported by the device.
1279 *
1280 * \details These are device specific and are not used directly in
1281 * typical applications. Use the signal specific GetStickyFault_*()
1282 * methods instead.
1283 *
1284 * - Minimum Value: 0
1285 * - Maximum Value: 4294967295
1286 * - Default Value: 0
1287 * - Units:
1288 *
1289 * Default Rates:
1290 * - CAN: 4.0 Hz
1291 *
1292 * This refreshes and returns a cached StatusSignal object.
1293 *
1294 * \param refresh Whether to refresh the StatusSignal before returning it;
1295 * defaults to true
1296 * \returns StickyFaultField Status Signal Object
1297 */
1299
1300 /**
1301 * \brief Current reported yaw of the Pigeon2.
1302 *
1303 * - Minimum Value: -368640.0
1304 * - Maximum Value: 368639.99725341797
1305 * - Default Value: 0
1306 * - Units: deg
1307 *
1308 * Default Rates:
1309 * - CAN 2.0: 100.0 Hz
1310 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1311 *
1312 * This refreshes and returns a cached StatusSignal object.
1313 *
1314 * \param refresh Whether to refresh the StatusSignal before returning it;
1315 * defaults to true
1316 * \returns Yaw Status Signal Object
1317 */
1319
1320 /**
1321 * \brief Current reported pitch of the Pigeon2.
1322 *
1323 * - Minimum Value: -90.0
1324 * - Maximum Value: 89.9560546875
1325 * - Default Value: 0
1326 * - Units: deg
1327 *
1328 * Default Rates:
1329 * - CAN 2.0: 100.0 Hz
1330 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1331 *
1332 * This refreshes and returns a cached StatusSignal object.
1333 *
1334 * \param refresh Whether to refresh the StatusSignal before returning it;
1335 * defaults to true
1336 * \returns Pitch Status Signal Object
1337 */
1339
1340 /**
1341 * \brief Current reported roll of the Pigeon2.
1342 *
1343 * - Minimum Value: -180.0
1344 * - Maximum Value: 179.9560546875
1345 * - Default Value: 0
1346 * - Units: deg
1347 *
1348 * Default Rates:
1349 * - CAN 2.0: 100.0 Hz
1350 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1351 *
1352 * This refreshes and returns a cached StatusSignal object.
1353 *
1354 * \param refresh Whether to refresh the StatusSignal before returning it;
1355 * defaults to true
1356 * \returns Roll Status Signal Object
1357 */
1359
1360 /**
1361 * \brief The W component of the reported Quaternion.
1362 *
1363 * - Minimum Value: -1.0001220852154804
1364 * - Maximum Value: 1.0
1365 * - Default Value: 0
1366 * - Units:
1367 *
1368 * Default Rates:
1369 * - CAN 2.0: 50.0 Hz
1370 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1371 *
1372 * This refreshes and returns a cached StatusSignal object.
1373 *
1374 * \param refresh Whether to refresh the StatusSignal before returning it;
1375 * defaults to true
1376 * \returns QuatW Status Signal Object
1377 */
1379
1380 /**
1381 * \brief The X component of the reported Quaternion.
1382 *
1383 * - Minimum Value: -1.0001220852154804
1384 * - Maximum Value: 1.0
1385 * - Default Value: 0
1386 * - Units:
1387 *
1388 * Default Rates:
1389 * - CAN 2.0: 50.0 Hz
1390 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1391 *
1392 * This refreshes and returns a cached StatusSignal object.
1393 *
1394 * \param refresh Whether to refresh the StatusSignal before returning it;
1395 * defaults to true
1396 * \returns QuatX Status Signal Object
1397 */
1399
1400 /**
1401 * \brief The Y component of the reported Quaternion.
1402 *
1403 * - Minimum Value: -1.0001220852154804
1404 * - Maximum Value: 1.0
1405 * - Default Value: 0
1406 * - Units:
1407 *
1408 * Default Rates:
1409 * - CAN 2.0: 50.0 Hz
1410 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1411 *
1412 * This refreshes and returns a cached StatusSignal object.
1413 *
1414 * \param refresh Whether to refresh the StatusSignal before returning it;
1415 * defaults to true
1416 * \returns QuatY Status Signal Object
1417 */
1419
1420 /**
1421 * \brief The Z component of the reported Quaternion.
1422 *
1423 * - Minimum Value: -1.0001220852154804
1424 * - Maximum Value: 1.0
1425 * - Default Value: 0
1426 * - Units:
1427 *
1428 * Default Rates:
1429 * - CAN 2.0: 50.0 Hz
1430 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1431 *
1432 * This refreshes and returns a cached StatusSignal object.
1433 *
1434 * \param refresh Whether to refresh the StatusSignal before returning it;
1435 * defaults to true
1436 * \returns QuatZ Status Signal Object
1437 */
1439
1440 /**
1441 * \brief The X component of the gravity vector.
1442 *
1443 * \details This is the X component of the reported gravity-vector.
1444 * The gravity vector is not the acceleration experienced by the
1445 * Pigeon2, rather it is where the Pigeon2 believes "Down" is. This
1446 * can be used for mechanisms that are linearly related to gravity,
1447 * such as an arm pivoting about a point, as the contribution of
1448 * gravity to the arm is directly proportional to the contribution of
1449 * gravity about one of these primary axis.
1450 *
1451 * - Minimum Value: -1.000030518509476
1452 * - Maximum Value: 1.0
1453 * - Default Value: 0
1454 * - Units:
1455 *
1456 * Default Rates:
1457 * - CAN 2.0: 10.0 Hz
1458 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1459 *
1460 * This refreshes and returns a cached StatusSignal object.
1461 *
1462 * \param refresh Whether to refresh the StatusSignal before returning it;
1463 * defaults to true
1464 * \returns GravityVectorX Status Signal Object
1465 */
1467
1468 /**
1469 * \brief The Y component of the gravity vector.
1470 *
1471 * \details This is the X component of the reported gravity-vector.
1472 * The gravity vector is not the acceleration experienced by the
1473 * Pigeon2, rather it is where the Pigeon2 believes "Down" is. This
1474 * can be used for mechanisms that are linearly related to gravity,
1475 * such as an arm pivoting about a point, as the contribution of
1476 * gravity to the arm is directly proportional to the contribution of
1477 * gravity about one of these primary axis.
1478 *
1479 * - Minimum Value: -1.000030518509476
1480 * - Maximum Value: 1.0
1481 * - Default Value: 0
1482 * - Units:
1483 *
1484 * Default Rates:
1485 * - CAN 2.0: 10.0 Hz
1486 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1487 *
1488 * This refreshes and returns a cached StatusSignal object.
1489 *
1490 * \param refresh Whether to refresh the StatusSignal before returning it;
1491 * defaults to true
1492 * \returns GravityVectorY Status Signal Object
1493 */
1495
1496 /**
1497 * \brief The Z component of the gravity vector.
1498 *
1499 * \details This is the Z component of the reported gravity-vector.
1500 * The gravity vector is not the acceleration experienced by the
1501 * Pigeon2, rather it is where the Pigeon2 believes "Down" is. This
1502 * can be used for mechanisms that are linearly related to gravity,
1503 * such as an arm pivoting about a point, as the contribution of
1504 * gravity to the arm is directly proportional to the contribution of
1505 * gravity about one of these primary axis.
1506 *
1507 * - Minimum Value: -1.000030518509476
1508 * - Maximum Value: 1.0
1509 * - Default Value: 0
1510 * - Units:
1511 *
1512 * Default Rates:
1513 * - CAN 2.0: 10.0 Hz
1514 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1515 *
1516 * This refreshes and returns a cached StatusSignal object.
1517 *
1518 * \param refresh Whether to refresh the StatusSignal before returning it;
1519 * defaults to true
1520 * \returns GravityVectorZ Status Signal Object
1521 */
1523
1524 /**
1525 * \brief Temperature of the Pigeon 2.
1526 *
1527 * - Minimum Value: -128.0
1528 * - Maximum Value: 127.99609375
1529 * - Default Value: 0
1530 * - Units: ℃
1531 *
1532 * Default Rates:
1533 * - CAN 2.0: 4.0 Hz
1534 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1535 *
1536 * This refreshes and returns a cached StatusSignal object.
1537 *
1538 * \param refresh Whether to refresh the StatusSignal before returning it;
1539 * defaults to true
1540 * \returns Temperature Status Signal Object
1541 */
1543
1544 /**
1545 * \brief Whether the no-motion calibration feature is enabled.
1546 *
1547 * - Default Value: 0
1548 *
1549 * Default Rates:
1550 * - CAN 2.0: 4.0 Hz
1551 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1552 *
1553 * This refreshes and returns a cached StatusSignal object.
1554 *
1555 * \param refresh Whether to refresh the StatusSignal before returning it;
1556 * defaults to true
1557 * \returns NoMotionEnabled Status Signal Object
1558 */
1560
1561 /**
1562 * \brief The number of times a no-motion event occurred, wraps at 15.
1563 *
1564 * - Minimum Value: 0
1565 * - Maximum Value: 15
1566 * - Default Value: 0
1567 * - Units:
1568 *
1569 * Default Rates:
1570 * - CAN 2.0: 4.0 Hz
1571 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1572 *
1573 * This refreshes and returns a cached StatusSignal object.
1574 *
1575 * \param refresh Whether to refresh the StatusSignal before returning it;
1576 * defaults to true
1577 * \returns NoMotionCount Status Signal Object
1578 */
1580
1581 /**
1582 * \brief Whether the temperature-compensation feature is disabled.
1583 *
1584 * - Default Value: 0
1585 *
1586 * Default Rates:
1587 * - CAN 2.0: 4.0 Hz
1588 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1589 *
1590 * This refreshes and returns a cached StatusSignal object.
1591 *
1592 * \param refresh Whether to refresh the StatusSignal before returning it;
1593 * defaults to true
1594 * \returns TemperatureCompensationDisabled Status Signal Object
1595 */
1597
1598 /**
1599 * \brief How long the Pigeon 2's been up in seconds, caps at 255
1600 * seconds.
1601 *
1602 * - Minimum Value: 0
1603 * - Maximum Value: 255
1604 * - Default Value: 0
1605 * - Units: s
1606 *
1607 * Default Rates:
1608 * - CAN 2.0: 4.0 Hz
1609 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1610 *
1611 * This refreshes and returns a cached StatusSignal object.
1612 *
1613 * \param refresh Whether to refresh the StatusSignal before returning it;
1614 * defaults to true
1615 * \returns UpTime Status Signal Object
1616 */
1618
1619 /**
1620 * \brief The accumulated gyro about the X axis without any sensor
1621 * fusing.
1622 *
1623 * - Minimum Value: -23040.0
1624 * - Maximum Value: 23039.9560546875
1625 * - Default Value: 0
1626 * - Units: deg
1627 *
1628 * Default Rates:
1629 * - CAN 2.0: 4.0 Hz
1630 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1631 *
1632 * This refreshes and returns a cached StatusSignal object.
1633 *
1634 * \param refresh Whether to refresh the StatusSignal before returning it;
1635 * defaults to true
1636 * \returns AccumGyroX Status Signal Object
1637 */
1639
1640 /**
1641 * \brief The accumulated gyro about the Y axis without any sensor
1642 * fusing.
1643 *
1644 * - Minimum Value: -23040.0
1645 * - Maximum Value: 23039.9560546875
1646 * - Default Value: 0
1647 * - Units: deg
1648 *
1649 * Default Rates:
1650 * - CAN 2.0: 4.0 Hz
1651 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1652 *
1653 * This refreshes and returns a cached StatusSignal object.
1654 *
1655 * \param refresh Whether to refresh the StatusSignal before returning it;
1656 * defaults to true
1657 * \returns AccumGyroY Status Signal Object
1658 */
1660
1661 /**
1662 * \brief The accumulated gyro about the Z axis without any sensor
1663 * fusing.
1664 *
1665 * - Minimum Value: -23040.0
1666 * - Maximum Value: 23039.9560546875
1667 * - Default Value: 0
1668 * - Units: deg
1669 *
1670 * Default Rates:
1671 * - CAN 2.0: 4.0 Hz
1672 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1673 *
1674 * This refreshes and returns a cached StatusSignal object.
1675 *
1676 * \param refresh Whether to refresh the StatusSignal before returning it;
1677 * defaults to true
1678 * \returns AccumGyroZ Status Signal Object
1679 */
1681
1682 /**
1683 * \brief The angular velocity (ω) of the Pigeon 2 about the X axis
1684 * with respect to the world frame. This value is mount-calibrated.
1685 *
1686 * - Minimum Value: -2048.0
1687 * - Maximum Value: 2047.99609375
1688 * - Default Value: 0
1689 * - Units: dps
1690 *
1691 * Default Rates:
1692 * - CAN 2.0: 10.0 Hz
1693 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1694 *
1695 * This refreshes and returns a cached StatusSignal object.
1696 *
1697 * \param refresh Whether to refresh the StatusSignal before returning it;
1698 * defaults to true
1699 * \returns AngularVelocityXWorld Status Signal Object
1700 */
1702
1703 /**
1704 * \brief The angular velocity (ω) of the Pigeon 2 about the Y axis
1705 * with respect to the world frame. This value is mount-calibrated.
1706 *
1707 * - Minimum Value: -2048.0
1708 * - Maximum Value: 2047.99609375
1709 * - Default Value: 0
1710 * - Units: dps
1711 *
1712 * Default Rates:
1713 * - CAN 2.0: 10.0 Hz
1714 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1715 *
1716 * This refreshes and returns a cached StatusSignal object.
1717 *
1718 * \param refresh Whether to refresh the StatusSignal before returning it;
1719 * defaults to true
1720 * \returns AngularVelocityYWorld Status Signal Object
1721 */
1723
1724 /**
1725 * \brief The angular velocity (ω) of the Pigeon 2 about the Z axis
1726 * with respect to the world frame. This value is mount-calibrated.
1727 *
1728 * - Minimum Value: -2048.0
1729 * - Maximum Value: 2047.99609375
1730 * - Default Value: 0
1731 * - Units: dps
1732 *
1733 * Default Rates:
1734 * - CAN 2.0: 10.0 Hz
1735 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1736 *
1737 * This refreshes and returns a cached StatusSignal object.
1738 *
1739 * \param refresh Whether to refresh the StatusSignal before returning it;
1740 * defaults to true
1741 * \returns AngularVelocityZWorld Status Signal Object
1742 */
1744
1745 /**
1746 * \brief The acceleration measured by Pigeon2 in the X direction.
1747 *
1748 * \details This value includes the acceleration due to gravity. If
1749 * this is undesirable, get the gravity vector and subtract out the
1750 * contribution in this direction.
1751 *
1752 * - Minimum Value: -2.0
1753 * - Maximum Value: 1.99993896484375
1754 * - Default Value: 0
1755 * - Units: g
1756 *
1757 * Default Rates:
1758 * - CAN 2.0: 10.0 Hz
1759 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1760 *
1761 * This refreshes and returns a cached StatusSignal object.
1762 *
1763 * \param refresh Whether to refresh the StatusSignal before returning it;
1764 * defaults to true
1765 * \returns AccelerationX Status Signal Object
1766 */
1768
1769 /**
1770 * \brief The acceleration measured by Pigeon2 in the Y direction.
1771 *
1772 * \details This value includes the acceleration due to gravity. If
1773 * this is undesirable, get the gravity vector and subtract out the
1774 * contribution in this direction.
1775 *
1776 * - Minimum Value: -2.0
1777 * - Maximum Value: 1.99993896484375
1778 * - Default Value: 0
1779 * - Units: g
1780 *
1781 * Default Rates:
1782 * - CAN 2.0: 10.0 Hz
1783 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1784 *
1785 * This refreshes and returns a cached StatusSignal object.
1786 *
1787 * \param refresh Whether to refresh the StatusSignal before returning it;
1788 * defaults to true
1789 * \returns AccelerationY Status Signal Object
1790 */
1792
1793 /**
1794 * \brief The acceleration measured by Pigeon2 in the Z direction.
1795 *
1796 * \details This value includes the acceleration due to gravity. If
1797 * this is undesirable, get the gravity vector and subtract out the
1798 * contribution in this direction.
1799 *
1800 * - Minimum Value: -2.0
1801 * - Maximum Value: 1.99993896484375
1802 * - Default Value: 0
1803 * - Units: g
1804 *
1805 * Default Rates:
1806 * - CAN 2.0: 10.0 Hz
1807 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1808 *
1809 * This refreshes and returns a cached StatusSignal object.
1810 *
1811 * \param refresh Whether to refresh the StatusSignal before returning it;
1812 * defaults to true
1813 * \returns AccelerationZ Status Signal Object
1814 */
1816
1817 /**
1818 * \brief Measured supply voltage to the Pigeon2.
1819 *
1820 * - Minimum Value: 0.0
1821 * - Maximum Value: 31.99951171875
1822 * - Default Value: 0
1823 * - Units: V
1824 *
1825 * Default Rates:
1826 * - CAN 2.0: 4.0 Hz
1827 * - CAN FD: 100.0 Hz (TimeSynced with Pro)
1828 *
1829 * This refreshes and returns a cached StatusSignal object.
1830 *
1831 * \param refresh Whether to refresh the StatusSignal before returning it;
1832 * defaults to true
1833 * \returns SupplyVoltage Status Signal Object
1834 */
1836
1837 /**
1838 * \brief The angular velocity (ω) of the Pigeon 2 about the device's
1839 * X axis.
1840 *
1841 * \details This value is not mount-calibrated.
1842 *
1843 * - Minimum Value: -1998.048780487805
1844 * - Maximum Value: 1997.987804878049
1845 * - Default Value: 0
1846 * - Units: dps
1847 *
1848 * Default Rates:
1849 * - CAN: 4.0 Hz
1850 *
1851 * This refreshes and returns a cached StatusSignal object.
1852 *
1853 * \param refresh Whether to refresh the StatusSignal before returning it;
1854 * defaults to true
1855 * \returns AngularVelocityXDevice Status Signal Object
1856 */
1858
1859 /**
1860 * \brief The angular velocity (ω) of the Pigeon 2 about the device's
1861 * Y axis.
1862 *
1863 * \details This value is not mount-calibrated.
1864 *
1865 * - Minimum Value: -1998.048780487805
1866 * - Maximum Value: 1997.987804878049
1867 * - Default Value: 0
1868 * - Units: dps
1869 *
1870 * Default Rates:
1871 * - CAN: 4.0 Hz
1872 *
1873 * This refreshes and returns a cached StatusSignal object.
1874 *
1875 * \param refresh Whether to refresh the StatusSignal before returning it;
1876 * defaults to true
1877 * \returns AngularVelocityYDevice Status Signal Object
1878 */
1880
1881 /**
1882 * \brief The angular velocity (ω) of the Pigeon 2 about the device's
1883 * Z axis.
1884 *
1885 * \details This value is not mount-calibrated.
1886 *
1887 * - Minimum Value: -1998.048780487805
1888 * - Maximum Value: 1997.987804878049
1889 * - Default Value: 0
1890 * - Units: dps
1891 *
1892 * Default Rates:
1893 * - CAN: 4.0 Hz
1894 *
1895 * This refreshes and returns a cached StatusSignal object.
1896 *
1897 * \param refresh Whether to refresh the StatusSignal before returning it;
1898 * defaults to true
1899 * \returns AngularVelocityZDevice Status Signal Object
1900 */
1902
1903 /**
1904 * \brief The biased magnitude of the magnetic field measured by the
1905 * Pigeon 2 in the X direction. This is only valid after performing a
1906 * magnetometer calibration.
1907 *
1908 * - Minimum Value: -19660.8
1909 * - Maximum Value: 19660.2
1910 * - Default Value: 0
1911 * - Units: uT
1912 *
1913 * Default Rates:
1914 * - CAN: 4.0 Hz
1915 *
1916 * This refreshes and returns a cached StatusSignal object.
1917 *
1918 * \param refresh Whether to refresh the StatusSignal before returning it;
1919 * defaults to true
1920 * \returns MagneticFieldX Status Signal Object
1921 */
1923
1924 /**
1925 * \brief The biased magnitude of the magnetic field measured by the
1926 * Pigeon 2 in the Y direction. This is only valid after performing a
1927 * magnetometer calibration.
1928 *
1929 * - Minimum Value: -19660.8
1930 * - Maximum Value: 19660.2
1931 * - Default Value: 0
1932 * - Units: uT
1933 *
1934 * Default Rates:
1935 * - CAN: 4.0 Hz
1936 *
1937 * This refreshes and returns a cached StatusSignal object.
1938 *
1939 * \param refresh Whether to refresh the StatusSignal before returning it;
1940 * defaults to true
1941 * \returns MagneticFieldY Status Signal Object
1942 */
1944
1945 /**
1946 * \brief The biased magnitude of the magnetic field measured by the
1947 * Pigeon 2 in the Z direction. This is only valid after performing a
1948 * magnetometer calibration.
1949 *
1950 * - Minimum Value: -19660.8
1951 * - Maximum Value: 19660.2
1952 * - Default Value: 0
1953 * - Units: uT
1954 *
1955 * Default Rates:
1956 * - CAN: 4.0 Hz
1957 *
1958 * This refreshes and returns a cached StatusSignal object.
1959 *
1960 * \param refresh Whether to refresh the StatusSignal before returning it;
1961 * defaults to true
1962 * \returns MagneticFieldZ Status Signal Object
1963 */
1965
1966 /**
1967 * \brief The raw magnitude of the magnetic field measured by the
1968 * Pigeon 2 in the X direction. This is only valid after performing a
1969 * magnetometer calibration.
1970 *
1971 * - Minimum Value: -19660.8
1972 * - Maximum Value: 19660.2
1973 * - Default Value: 0
1974 * - Units: uT
1975 *
1976 * Default Rates:
1977 * - CAN: 4.0 Hz
1978 *
1979 * This refreshes and returns a cached StatusSignal object.
1980 *
1981 * \param refresh Whether to refresh the StatusSignal before returning it;
1982 * defaults to true
1983 * \returns RawMagneticFieldX Status Signal Object
1984 */
1986
1987 /**
1988 * \brief The raw magnitude of the magnetic field measured by the
1989 * Pigeon 2 in the Y direction. This is only valid after performing a
1990 * magnetometer calibration.
1991 *
1992 * - Minimum Value: -19660.8
1993 * - Maximum Value: 19660.2
1994 * - Default Value: 0
1995 * - Units: uT
1996 *
1997 * Default Rates:
1998 * - CAN: 4.0 Hz
1999 *
2000 * This refreshes and returns a cached StatusSignal object.
2001 *
2002 * \param refresh Whether to refresh the StatusSignal before returning it;
2003 * defaults to true
2004 * \returns RawMagneticFieldY Status Signal Object
2005 */
2007
2008 /**
2009 * \brief The raw magnitude of the magnetic field measured by the
2010 * Pigeon 2 in the Z direction. This is only valid after performing a
2011 * magnetometer calibration.
2012 *
2013 * - Minimum Value: -19660.8
2014 * - Maximum Value: 19660.2
2015 * - Default Value: 0
2016 * - Units: uT
2017 *
2018 * Default Rates:
2019 * - CAN: 4.0 Hz
2020 *
2021 * This refreshes and returns a cached StatusSignal object.
2022 *
2023 * \param refresh Whether to refresh the StatusSignal before returning it;
2024 * defaults to true
2025 * \returns RawMagneticFieldZ Status Signal Object
2026 */
2028
2029 /**
2030 * \brief Whether the device is Phoenix Pro licensed.
2031 *
2032 * - Default Value: False
2033 *
2034 * Default Rates:
2035 * - CAN: 4.0 Hz
2036 *
2037 * This refreshes and returns a cached StatusSignal object.
2038 *
2039 * \param refresh Whether to refresh the StatusSignal before returning it;
2040 * defaults to true
2041 * \returns IsProLicensed Status Signal Object
2042 */
2044
2045 /**
2046 * \brief Hardware fault occurred
2047 *
2048 * - Default Value: False
2049 *
2050 * Default Rates:
2051 * - CAN: 4.0 Hz
2052 *
2053 * This refreshes and returns a cached StatusSignal object.
2054 *
2055 * \param refresh Whether to refresh the StatusSignal before returning it;
2056 * defaults to true
2057 * \returns Fault_Hardware Status Signal Object
2058 */
2060
2061 /**
2062 * \brief Hardware fault occurred
2063 *
2064 * - Default Value: False
2065 *
2066 * Default Rates:
2067 * - CAN: 4.0 Hz
2068 *
2069 * This refreshes and returns a cached StatusSignal object.
2070 *
2071 * \param refresh Whether to refresh the StatusSignal before returning it;
2072 * defaults to true
2073 * \returns StickyFault_Hardware Status Signal Object
2074 */
2076
2077 /**
2078 * \brief Device supply voltage dropped to near brownout levels
2079 *
2080 * - Default Value: False
2081 *
2082 * Default Rates:
2083 * - CAN: 4.0 Hz
2084 *
2085 * This refreshes and returns a cached StatusSignal object.
2086 *
2087 * \param refresh Whether to refresh the StatusSignal before returning it;
2088 * defaults to true
2089 * \returns Fault_Undervoltage Status Signal Object
2090 */
2092
2093 /**
2094 * \brief Device supply voltage dropped to near brownout levels
2095 *
2096 * - Default Value: False
2097 *
2098 * Default Rates:
2099 * - CAN: 4.0 Hz
2100 *
2101 * This refreshes and returns a cached StatusSignal object.
2102 *
2103 * \param refresh Whether to refresh the StatusSignal before returning it;
2104 * defaults to true
2105 * \returns StickyFault_Undervoltage Status Signal Object
2106 */
2108
2109 /**
2110 * \brief Device boot while detecting the enable signal
2111 *
2112 * - Default Value: False
2113 *
2114 * Default Rates:
2115 * - CAN: 4.0 Hz
2116 *
2117 * This refreshes and returns a cached StatusSignal object.
2118 *
2119 * \param refresh Whether to refresh the StatusSignal before returning it;
2120 * defaults to true
2121 * \returns Fault_BootDuringEnable Status Signal Object
2122 */
2124
2125 /**
2126 * \brief Device boot while detecting the enable signal
2127 *
2128 * - Default Value: False
2129 *
2130 * Default Rates:
2131 * - CAN: 4.0 Hz
2132 *
2133 * This refreshes and returns a cached StatusSignal object.
2134 *
2135 * \param refresh Whether to refresh the StatusSignal before returning it;
2136 * defaults to true
2137 * \returns StickyFault_BootDuringEnable Status Signal Object
2138 */
2140
2141 /**
2142 * \brief An unlicensed feature is in use, device may not behave as
2143 * expected.
2144 *
2145 * - Default Value: False
2146 *
2147 * Default Rates:
2148 * - CAN: 4.0 Hz
2149 *
2150 * This refreshes and returns a cached StatusSignal object.
2151 *
2152 * \param refresh Whether to refresh the StatusSignal before returning it;
2153 * defaults to true
2154 * \returns Fault_UnlicensedFeatureInUse Status Signal Object
2155 */
2157
2158 /**
2159 * \brief An unlicensed feature is in use, device may not behave as
2160 * expected.
2161 *
2162 * - Default Value: False
2163 *
2164 * Default Rates:
2165 * - CAN: 4.0 Hz
2166 *
2167 * This refreshes and returns a cached StatusSignal object.
2168 *
2169 * \param refresh Whether to refresh the StatusSignal before returning it;
2170 * defaults to true
2171 * \returns StickyFault_UnlicensedFeatureInUse Status Signal Object
2172 */
2174
2175 /**
2176 * \brief Bootup checks failed: Accelerometer
2177 *
2178 * - Default Value: False
2179 *
2180 * Default Rates:
2181 * - CAN: 4.0 Hz
2182 *
2183 * This refreshes and returns a cached StatusSignal object.
2184 *
2185 * \param refresh Whether to refresh the StatusSignal before returning it;
2186 * defaults to true
2187 * \returns Fault_BootupAccelerometer Status Signal Object
2188 */
2190
2191 /**
2192 * \brief Bootup checks failed: Accelerometer
2193 *
2194 * - Default Value: False
2195 *
2196 * Default Rates:
2197 * - CAN: 4.0 Hz
2198 *
2199 * This refreshes and returns a cached StatusSignal object.
2200 *
2201 * \param refresh Whether to refresh the StatusSignal before returning it;
2202 * defaults to true
2203 * \returns StickyFault_BootupAccelerometer Status Signal Object
2204 */
2206
2207 /**
2208 * \brief Bootup checks failed: Gyroscope
2209 *
2210 * - Default Value: False
2211 *
2212 * Default Rates:
2213 * - CAN: 4.0 Hz
2214 *
2215 * This refreshes and returns a cached StatusSignal object.
2216 *
2217 * \param refresh Whether to refresh the StatusSignal before returning it;
2218 * defaults to true
2219 * \returns Fault_BootupGyroscope Status Signal Object
2220 */
2222
2223 /**
2224 * \brief Bootup checks failed: Gyroscope
2225 *
2226 * - Default Value: False
2227 *
2228 * Default Rates:
2229 * - CAN: 4.0 Hz
2230 *
2231 * This refreshes and returns a cached StatusSignal object.
2232 *
2233 * \param refresh Whether to refresh the StatusSignal before returning it;
2234 * defaults to true
2235 * \returns StickyFault_BootupGyroscope Status Signal Object
2236 */
2238
2239 /**
2240 * \brief Bootup checks failed: Magnetometer
2241 *
2242 * - Default Value: False
2243 *
2244 * Default Rates:
2245 * - CAN: 4.0 Hz
2246 *
2247 * This refreshes and returns a cached StatusSignal object.
2248 *
2249 * \param refresh Whether to refresh the StatusSignal before returning it;
2250 * defaults to true
2251 * \returns Fault_BootupMagnetometer Status Signal Object
2252 */
2254
2255 /**
2256 * \brief Bootup checks failed: Magnetometer
2257 *
2258 * - Default Value: False
2259 *
2260 * Default Rates:
2261 * - CAN: 4.0 Hz
2262 *
2263 * This refreshes and returns a cached StatusSignal object.
2264 *
2265 * \param refresh Whether to refresh the StatusSignal before returning it;
2266 * defaults to true
2267 * \returns StickyFault_BootupMagnetometer Status Signal Object
2268 */
2270
2271 /**
2272 * \brief Motion Detected during bootup.
2273 *
2274 * - Default Value: False
2275 *
2276 * Default Rates:
2277 * - CAN: 4.0 Hz
2278 *
2279 * This refreshes and returns a cached StatusSignal object.
2280 *
2281 * \param refresh Whether to refresh the StatusSignal before returning it;
2282 * defaults to true
2283 * \returns Fault_BootIntoMotion Status Signal Object
2284 */
2286
2287 /**
2288 * \brief Motion Detected during bootup.
2289 *
2290 * - Default Value: False
2291 *
2292 * Default Rates:
2293 * - CAN: 4.0 Hz
2294 *
2295 * This refreshes and returns a cached StatusSignal object.
2296 *
2297 * \param refresh Whether to refresh the StatusSignal before returning it;
2298 * defaults to true
2299 * \returns StickyFault_BootIntoMotion Status Signal Object
2300 */
2302
2303 /**
2304 * \brief Motion stack data acquisition was slower than expected
2305 *
2306 * - Default Value: False
2307 *
2308 * Default Rates:
2309 * - CAN: 4.0 Hz
2310 *
2311 * This refreshes and returns a cached StatusSignal object.
2312 *
2313 * \param refresh Whether to refresh the StatusSignal before returning it;
2314 * defaults to true
2315 * \returns Fault_DataAcquiredLate Status Signal Object
2316 */
2318
2319 /**
2320 * \brief Motion stack data acquisition was slower than expected
2321 *
2322 * - Default Value: False
2323 *
2324 * Default Rates:
2325 * - CAN: 4.0 Hz
2326 *
2327 * This refreshes and returns a cached StatusSignal object.
2328 *
2329 * \param refresh Whether to refresh the StatusSignal before returning it;
2330 * defaults to true
2331 * \returns StickyFault_DataAcquiredLate Status Signal Object
2332 */
2334
2335 /**
2336 * \brief Motion stack loop time was slower than expected.
2337 *
2338 * - Default Value: False
2339 *
2340 * Default Rates:
2341 * - CAN: 4.0 Hz
2342 *
2343 * This refreshes and returns a cached StatusSignal object.
2344 *
2345 * \param refresh Whether to refresh the StatusSignal before returning it;
2346 * defaults to true
2347 * \returns Fault_LoopTimeSlow Status Signal Object
2348 */
2350
2351 /**
2352 * \brief Motion stack loop time was slower than expected.
2353 *
2354 * - Default Value: False
2355 *
2356 * Default Rates:
2357 * - CAN: 4.0 Hz
2358 *
2359 * This refreshes and returns a cached StatusSignal object.
2360 *
2361 * \param refresh Whether to refresh the StatusSignal before returning it;
2362 * defaults to true
2363 * \returns StickyFault_LoopTimeSlow Status Signal Object
2364 */
2366
2367 /**
2368 * \brief Magnetometer values are saturated
2369 *
2370 * - Default Value: False
2371 *
2372 * Default Rates:
2373 * - CAN: 4.0 Hz
2374 *
2375 * This refreshes and returns a cached StatusSignal object.
2376 *
2377 * \param refresh Whether to refresh the StatusSignal before returning it;
2378 * defaults to true
2379 * \returns Fault_SaturatedMagnetometer Status Signal Object
2380 */
2382
2383 /**
2384 * \brief Magnetometer values are saturated
2385 *
2386 * - Default Value: False
2387 *
2388 * Default Rates:
2389 * - CAN: 4.0 Hz
2390 *
2391 * This refreshes and returns a cached StatusSignal object.
2392 *
2393 * \param refresh Whether to refresh the StatusSignal before returning it;
2394 * defaults to true
2395 * \returns StickyFault_SaturatedMagnetometer Status Signal Object
2396 */
2398
2399 /**
2400 * \brief Accelerometer values are saturated
2401 *
2402 * - Default Value: False
2403 *
2404 * Default Rates:
2405 * - CAN: 4.0 Hz
2406 *
2407 * This refreshes and returns a cached StatusSignal object.
2408 *
2409 * \param refresh Whether to refresh the StatusSignal before returning it;
2410 * defaults to true
2411 * \returns Fault_SaturatedAccelerometer Status Signal Object
2412 */
2414
2415 /**
2416 * \brief Accelerometer values are saturated
2417 *
2418 * - Default Value: False
2419 *
2420 * Default Rates:
2421 * - CAN: 4.0 Hz
2422 *
2423 * This refreshes and returns a cached StatusSignal object.
2424 *
2425 * \param refresh Whether to refresh the StatusSignal before returning it;
2426 * defaults to true
2427 * \returns StickyFault_SaturatedAccelerometer Status Signal Object
2428 */
2430
2431 /**
2432 * \brief Gyroscope values are saturated
2433 *
2434 * - Default Value: False
2435 *
2436 * Default Rates:
2437 * - CAN: 4.0 Hz
2438 *
2439 * This refreshes and returns a cached StatusSignal object.
2440 *
2441 * \param refresh Whether to refresh the StatusSignal before returning it;
2442 * defaults to true
2443 * \returns Fault_SaturatedGyroscope Status Signal Object
2444 */
2446
2447 /**
2448 * \brief Gyroscope values are saturated
2449 *
2450 * - Default Value: False
2451 *
2452 * Default Rates:
2453 * - CAN: 4.0 Hz
2454 *
2455 * This refreshes and returns a cached StatusSignal object.
2456 *
2457 * \param refresh Whether to refresh the StatusSignal before returning it;
2458 * defaults to true
2459 * \returns StickyFault_SaturatedGyroscope Status Signal Object
2460 */
2462
2463
2464
2465
2466 /**
2467 * \brief The yaw to set the Pigeon2 to right now.
2468 *
2469 * \param newValue Value to set to. Units are in deg.
2470 * \param timeoutSeconds Maximum time to wait up to in seconds.
2471 * \returns StatusCode of the set command
2472 */
2473 ctre::phoenix::StatusCode SetYaw(units::angle::degree_t newValue, units::time::second_t timeoutSeconds)
2474 {
2475 return GetConfigurator().SetYaw(newValue, timeoutSeconds);
2476 }
2477 /**
2478 * \brief The yaw to set the Pigeon2 to right now.
2479 *
2480 * This will wait up to 0.100 seconds (100ms) by default.
2481 *
2482 * \param newValue Value to set to. Units are in deg.
2483 * \returns StatusCode of the set command
2484 */
2485 ctre::phoenix::StatusCode SetYaw(units::angle::degree_t newValue)
2486 {
2487 return SetYaw(newValue, 0.100_s);
2488 }
2489
2490 /**
2491 * \brief Clear the sticky faults in the device.
2492 *
2493 * \details This typically has no impact on the device functionality.
2494 * Instead, it just clears telemetry faults that are accessible via
2495 * API and Tuner Self-Test.
2496 *
2497 * \param timeoutSeconds Maximum time to wait up to in seconds.
2498 * \returns StatusCode of the set command
2499 */
2500 ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds)
2501 {
2502 return GetConfigurator().ClearStickyFaults(timeoutSeconds);
2503 }
2504 /**
2505 * \brief Clear the sticky faults in the device.
2506 *
2507 * \details This typically has no impact on the device functionality.
2508 * Instead, it just clears telemetry faults that are accessible via
2509 * API and Tuner Self-Test.
2510 *
2511 * This will wait up to 0.100 seconds (100ms) by default.
2512 *
2513 * \returns StatusCode of the set command
2514 */
2516 {
2517 return ClearStickyFaults(0.100_s);
2518 }
2519
2520 /**
2521 * \brief Clear sticky fault: Hardware fault occurred
2522 *
2523 * \param timeoutSeconds Maximum time to wait up to in seconds.
2524 * \returns StatusCode of the set command
2525 */
2526 ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds)
2527 {
2528 return GetConfigurator().ClearStickyFault_Hardware(timeoutSeconds);
2529 }
2530 /**
2531 * \brief Clear sticky fault: Hardware fault occurred
2532 *
2533 * This will wait up to 0.100 seconds (100ms) by default.
2534 *
2535 * \returns StatusCode of the set command
2536 */
2538 {
2539 return ClearStickyFault_Hardware(0.100_s);
2540 }
2541
2542 /**
2543 * \brief Clear sticky fault: Device supply voltage dropped to near
2544 * brownout levels
2545 *
2546 * \param timeoutSeconds Maximum time to wait up to in seconds.
2547 * \returns StatusCode of the set command
2548 */
2549 ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds)
2550 {
2551 return GetConfigurator().ClearStickyFault_Undervoltage(timeoutSeconds);
2552 }
2553 /**
2554 * \brief Clear sticky fault: Device supply voltage dropped to near
2555 * brownout levels
2556 *
2557 * This will wait up to 0.100 seconds (100ms) by default.
2558 *
2559 * \returns StatusCode of the set command
2560 */
2562 {
2563 return ClearStickyFault_Undervoltage(0.100_s);
2564 }
2565
2566 /**
2567 * \brief Clear sticky fault: Device boot while detecting the enable
2568 * signal
2569 *
2570 * \param timeoutSeconds Maximum time to wait up to in seconds.
2571 * \returns StatusCode of the set command
2572 */
2574 {
2575 return GetConfigurator().ClearStickyFault_BootDuringEnable(timeoutSeconds);
2576 }
2577 /**
2578 * \brief Clear sticky fault: Device boot while detecting the enable
2579 * signal
2580 *
2581 * This will wait up to 0.100 seconds (100ms) by default.
2582 *
2583 * \returns StatusCode of the set command
2584 */
2586 {
2587 return ClearStickyFault_BootDuringEnable(0.100_s);
2588 }
2589
2590 /**
2591 * \brief Clear sticky fault: An unlicensed feature is in use, device
2592 * may not behave as expected.
2593 *
2594 * \param timeoutSeconds Maximum time to wait up to in seconds.
2595 * \returns StatusCode of the set command
2596 */
2598 {
2599 return GetConfigurator().ClearStickyFault_UnlicensedFeatureInUse(timeoutSeconds);
2600 }
2601 /**
2602 * \brief Clear sticky fault: An unlicensed feature is in use, device
2603 * may not behave as expected.
2604 *
2605 * This will wait up to 0.100 seconds (100ms) by default.
2606 *
2607 * \returns StatusCode of the set command
2608 */
2610 {
2611 return ClearStickyFault_UnlicensedFeatureInUse(0.100_s);
2612 }
2613
2614 /**
2615 * \brief Clear sticky fault: Bootup checks failed: Accelerometer
2616 *
2617 * \param timeoutSeconds Maximum time to wait up to in seconds.
2618 * \returns StatusCode of the set command
2619 */
2621 {
2622 return GetConfigurator().ClearStickyFault_BootupAccelerometer(timeoutSeconds);
2623 }
2624 /**
2625 * \brief Clear sticky fault: Bootup checks failed: Accelerometer
2626 *
2627 * This will wait up to 0.100 seconds (100ms) by default.
2628 *
2629 * \returns StatusCode of the set command
2630 */
2632 {
2633 return ClearStickyFault_BootupAccelerometer(0.100_s);
2634 }
2635
2636 /**
2637 * \brief Clear sticky fault: Bootup checks failed: Gyroscope
2638 *
2639 * \param timeoutSeconds Maximum time to wait up to in seconds.
2640 * \returns StatusCode of the set command
2641 */
2643 {
2644 return GetConfigurator().ClearStickyFault_BootupGyroscope(timeoutSeconds);
2645 }
2646 /**
2647 * \brief Clear sticky fault: Bootup checks failed: Gyroscope
2648 *
2649 * This will wait up to 0.100 seconds (100ms) by default.
2650 *
2651 * \returns StatusCode of the set command
2652 */
2654 {
2655 return ClearStickyFault_BootupGyroscope(0.100_s);
2656 }
2657
2658 /**
2659 * \brief Clear sticky fault: Bootup checks failed: Magnetometer
2660 *
2661 * \param timeoutSeconds Maximum time to wait up to in seconds.
2662 * \returns StatusCode of the set command
2663 */
2665 {
2666 return GetConfigurator().ClearStickyFault_BootupMagnetometer(timeoutSeconds);
2667 }
2668 /**
2669 * \brief Clear sticky fault: Bootup checks failed: Magnetometer
2670 *
2671 * This will wait up to 0.100 seconds (100ms) by default.
2672 *
2673 * \returns StatusCode of the set command
2674 */
2676 {
2677 return ClearStickyFault_BootupMagnetometer(0.100_s);
2678 }
2679
2680 /**
2681 * \brief Clear sticky fault: Motion Detected during bootup.
2682 *
2683 * \param timeoutSeconds Maximum time to wait up to in seconds.
2684 * \returns StatusCode of the set command
2685 */
2687 {
2688 return GetConfigurator().ClearStickyFault_BootIntoMotion(timeoutSeconds);
2689 }
2690 /**
2691 * \brief Clear sticky fault: Motion Detected during bootup.
2692 *
2693 * This will wait up to 0.100 seconds (100ms) by default.
2694 *
2695 * \returns StatusCode of the set command
2696 */
2698 {
2699 return ClearStickyFault_BootIntoMotion(0.100_s);
2700 }
2701
2702 /**
2703 * \brief Clear sticky fault: Motion stack data acquisition was slower
2704 * than expected
2705 *
2706 * \param timeoutSeconds Maximum time to wait up to in seconds.
2707 * \returns StatusCode of the set command
2708 */
2710 {
2711 return GetConfigurator().ClearStickyFault_DataAcquiredLate(timeoutSeconds);
2712 }
2713 /**
2714 * \brief Clear sticky fault: Motion stack data acquisition was slower
2715 * than expected
2716 *
2717 * This will wait up to 0.100 seconds (100ms) by default.
2718 *
2719 * \returns StatusCode of the set command
2720 */
2722 {
2723 return ClearStickyFault_DataAcquiredLate(0.100_s);
2724 }
2725
2726 /**
2727 * \brief Clear sticky fault: Motion stack loop time was slower than
2728 * expected.
2729 *
2730 * \param timeoutSeconds Maximum time to wait up to in seconds.
2731 * \returns StatusCode of the set command
2732 */
2733 ctre::phoenix::StatusCode ClearStickyFault_LoopTimeSlow(units::time::second_t timeoutSeconds)
2734 {
2735 return GetConfigurator().ClearStickyFault_LoopTimeSlow(timeoutSeconds);
2736 }
2737 /**
2738 * \brief Clear sticky fault: Motion stack loop time was slower than
2739 * expected.
2740 *
2741 * This will wait up to 0.100 seconds (100ms) by default.
2742 *
2743 * \returns StatusCode of the set command
2744 */
2746 {
2747 return ClearStickyFault_LoopTimeSlow(0.100_s);
2748 }
2749
2750 /**
2751 * \brief Clear sticky fault: Magnetometer values are saturated
2752 *
2753 * \param timeoutSeconds Maximum time to wait up to in seconds.
2754 * \returns StatusCode of the set command
2755 */
2757 {
2758 return GetConfigurator().ClearStickyFault_SaturatedMagnetometer(timeoutSeconds);
2759 }
2760 /**
2761 * \brief Clear sticky fault: Magnetometer values are saturated
2762 *
2763 * This will wait up to 0.100 seconds (100ms) by default.
2764 *
2765 * \returns StatusCode of the set command
2766 */
2768 {
2769 return ClearStickyFault_SaturatedMagnetometer(0.100_s);
2770 }
2771
2772 /**
2773 * \brief Clear sticky fault: Accelerometer values are saturated
2774 *
2775 * \param timeoutSeconds Maximum time to wait up to in seconds.
2776 * \returns StatusCode of the set command
2777 */
2779 {
2780 return GetConfigurator().ClearStickyFault_SaturatedAccelerometer(timeoutSeconds);
2781 }
2782 /**
2783 * \brief Clear sticky fault: Accelerometer values are saturated
2784 *
2785 * This will wait up to 0.100 seconds (100ms) by default.
2786 *
2787 * \returns StatusCode of the set command
2788 */
2790 {
2791 return ClearStickyFault_SaturatedAccelerometer(0.100_s);
2792 }
2793
2794 /**
2795 * \brief Clear sticky fault: Gyroscope values are saturated
2796 *
2797 * \param timeoutSeconds Maximum time to wait up to in seconds.
2798 * \returns StatusCode of the set command
2799 */
2801 {
2802 return GetConfigurator().ClearStickyFault_SaturatedGyroscope(timeoutSeconds);
2803 }
2804 /**
2805 * \brief Clear sticky fault: Gyroscope values are saturated
2806 *
2807 * This will wait up to 0.100 seconds (100ms) by default.
2808 *
2809 * \returns StatusCode of the set command
2810 */
2812 {
2813 return ClearStickyFault_SaturatedGyroscope(0.100_s);
2814 }
2815};
2816
2817#if defined(_WIN32) || defined(_WIN64)
2818#pragma warning(pop)
2819#endif
2820
2821}
2822}
2823
2824}
2825}
2826
Class for getting information about an available CAN bus.
Definition CANBus.hpp:19
Represents a status signal with data of type T, and operations available to retrieve information abou...
Definition StatusSignal.hpp:567
Custom Params.
Definition CustomParamsConfigs.hpp:23
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
Configs to trim the Pigeon2's gyroscope.
Definition GyroTrimConfigs.hpp:27
std::string Serialize() const final
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
Configs for Pigeon 2's Mount Pose configuration.
Definition MountPoseConfigs.hpp:25
std::string Serialize() const final
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
Definition Configuration.hpp:17
The base class for all device configurators.
Definition Configurator.hpp:21
Class description for the Pigeon 2 IMU sensor that measures orientation.
Definition CorePigeon2.hpp:46
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
Take a string and deserialize it to this configuration.
Pigeon2FeaturesConfigs Pigeon2Features
Configs to enable/disable various features of the Pigeon2.
Definition CorePigeon2.hpp:113
constexpr Pigeon2Configuration & WithGyroTrim(GyroTrimConfigs newGyroTrim)
Modifies this configuration's GyroTrim parameter and returns itself for method-chaining and easier to...
Definition CorePigeon2.hpp:176
CustomParamsConfigs CustomParams
Custom Params.
Definition CorePigeon2.hpp:126
GyroTrimConfigs GyroTrim
Configs to trim the Pigeon2's gyroscope.
Definition CorePigeon2.hpp:98
std::string ToString() const override
Get the string representation of this configuration.
bool FutureProofConfigs
True if we should factory default newer unsupported configs, false to leave newer unsupported configs...
Definition CorePigeon2.hpp:63
constexpr Pigeon2Configuration & WithMountPose(MountPoseConfigs newMountPose)
Modifies this configuration's MountPose parameter and returns itself for method-chaining and easier t...
Definition CorePigeon2.hpp:148
std::string Serialize() const final
Get the serialized form of this configuration.
MountPoseConfigs MountPose
Configs for Pigeon 2's Mount Pose configuration.
Definition CorePigeon2.hpp:80
constexpr Pigeon2Configuration & WithPigeon2Features(Pigeon2FeaturesConfigs newPigeon2Features)
Modifies this configuration's Pigeon2Features parameter and returns itself for method-chaining and ea...
Definition CorePigeon2.hpp:201
constexpr Pigeon2Configuration & WithCustomParams(CustomParamsConfigs newCustomParams)
Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easie...
Definition CorePigeon2.hpp:224
Class description for the Pigeon 2 IMU sensor that measures orientation.
Definition CorePigeon2.hpp:251
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable()
Clear sticky fault: Device boot while detecting the enable signal.
Definition CorePigeon2.hpp:712
ctre::phoenix::StatusCode Apply(const CustomParamsConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CorePigeon2.hpp:400
ctre::phoenix::StatusCode Refresh(Pigeon2FeaturesConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CorePigeon2.hpp:522
ctre::phoenix::StatusCode Apply(const MountPoseConfigs &configs)
Applies the contents of the specified config to the device.
Definition CorePigeon2.hpp:299
ctre::phoenix::StatusCode ClearStickyFault_SaturatedAccelerometer()
Clear sticky fault: Accelerometer values are saturated.
Definition CorePigeon2.hpp:998
ctre::phoenix::StatusCode ClearStickyFault_LoopTimeSlow()
Clear sticky fault: Motion stack loop time was slower than expected.
Definition CorePigeon2.hpp:935
ctre::phoenix::StatusCode ClearStickyFault_BootupMagnetometer()
Clear sticky fault: Bootup checks failed: Magnetometer.
Definition CorePigeon2.hpp:839
ctre::phoenix::StatusCode Apply(const CustomParamsConfigs &configs)
Applies the contents of the specified config to the device.
Definition CorePigeon2.hpp:386
ctre::phoenix::StatusCode ClearStickyFault_SaturatedGyroscope(units::time::second_t timeoutSeconds)
Clear sticky fault: Gyroscope values are saturated.
ctre::phoenix::StatusCode Apply(const Pigeon2Configuration &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CorePigeon2.hpp:284
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse()
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
Definition CorePigeon2.hpp:745
ctre::phoenix::StatusCode ClearStickyFault_SaturatedAccelerometer(units::time::second_t timeoutSeconds)
Clear sticky fault: Accelerometer values are saturated.
ctre::phoenix::StatusCode SetYaw(units::angle::degree_t newValue, units::time::second_t timeoutSeconds)
The yaw to set the Pigeon2 to right now.
ctre::phoenix::StatusCode ClearStickyFault_BootupGyroscope(units::time::second_t timeoutSeconds)
Clear sticky fault: Bootup checks failed: Gyroscope.
ctre::phoenix::StatusCode ClearStickyFault_BootIntoMotion(units::time::second_t timeoutSeconds)
Clear sticky fault: Motion Detected during bootup.
ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds)
Clear sticky fault: Hardware fault occurred.
ctre::phoenix::StatusCode Refresh(Pigeon2FeaturesConfigs &configs) const
Refreshes the values of the specified config group.
Definition CorePigeon2.hpp:509
ctre::phoenix::StatusCode SetYaw(units::angle::degree_t newValue)
The yaw to set the Pigeon2 to right now.
Definition CorePigeon2.hpp:576
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds)
Clear sticky fault: Device supply voltage dropped to near brownout levels.
ctre::phoenix::StatusCode Apply(const Pigeon2FeaturesConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CorePigeon2.hpp:371
ctre::phoenix::StatusCode ClearStickyFault_DataAcquiredLate(units::time::second_t timeoutSeconds)
Clear sticky fault: Motion stack data acquisition was slower than expected.
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage()
Clear sticky fault: Device supply voltage dropped to near brownout levels.
Definition CorePigeon2.hpp:679
ctre::phoenix::StatusCode ClearStickyFault_BootupMagnetometer(units::time::second_t timeoutSeconds)
Clear sticky fault: Bootup checks failed: Magnetometer.
ctre::phoenix::StatusCode ClearStickyFault_BootIntoMotion()
Clear sticky fault: Motion Detected during bootup.
Definition CorePigeon2.hpp:870
ctre::phoenix::StatusCode Apply(const Pigeon2Configuration &configs)
Applies the contents of the specified config to the device.
Definition CorePigeon2.hpp:270
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse(units::time::second_t timeoutSeconds)
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
ctre::phoenix::StatusCode Refresh(MountPoseConfigs &configs) const
Refreshes the values of the specified config group.
Definition CorePigeon2.hpp:447
ctre::phoenix::StatusCode Apply(const Pigeon2FeaturesConfigs &configs)
Applies the contents of the specified config to the device.
Definition CorePigeon2.hpp:357
ctre::phoenix::StatusCode Apply(const GyroTrimConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CorePigeon2.hpp:342
ctre::phoenix::StatusCode ClearStickyFault_SaturatedMagnetometer()
Clear sticky fault: Magnetometer values are saturated.
Definition CorePigeon2.hpp:967
ctre::phoenix::StatusCode ClearStickyFault_BootupAccelerometer()
Clear sticky fault: Bootup checks failed: Accelerometer.
Definition CorePigeon2.hpp:777
ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds)
Clear the sticky faults in the device.
ctre::phoenix::StatusCode Refresh(GyroTrimConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CorePigeon2.hpp:491
ctre::phoenix::StatusCode Refresh(CustomParamsConfigs &configs) const
Refreshes the values of the specified config group.
Definition CorePigeon2.hpp:540
ctre::phoenix::StatusCode ClearStickyFault_SaturatedMagnetometer(units::time::second_t timeoutSeconds)
Clear sticky fault: Magnetometer values are saturated.
ctre::phoenix::StatusCode Refresh(MountPoseConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CorePigeon2.hpp:460
ctre::phoenix::StatusCode Refresh(GyroTrimConfigs &configs) const
Refreshes the values of the specified config group.
Definition CorePigeon2.hpp:478
ctre::phoenix::StatusCode ClearStickyFault_SaturatedGyroscope()
Clear sticky fault: Gyroscope values are saturated.
Definition CorePigeon2.hpp:1029
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable(units::time::second_t timeoutSeconds)
Clear sticky fault: Device boot while detecting the enable signal.
ctre::phoenix::StatusCode ClearStickyFault_BootupAccelerometer(units::time::second_t timeoutSeconds)
Clear sticky fault: Bootup checks failed: Accelerometer.
ctre::phoenix::StatusCode ClearStickyFault_BootupGyroscope()
Clear sticky fault: Bootup checks failed: Gyroscope.
Definition CorePigeon2.hpp:808
ctre::phoenix::StatusCode Refresh(CustomParamsConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CorePigeon2.hpp:553
ctre::phoenix::StatusCode Refresh(Pigeon2Configuration &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition CorePigeon2.hpp:429
ctre::phoenix::StatusCode ClearStickyFault_LoopTimeSlow(units::time::second_t timeoutSeconds)
Clear sticky fault: Motion stack loop time was slower than expected.
ctre::phoenix::StatusCode ClearStickyFaults()
Clear the sticky faults in the device.
Definition CorePigeon2.hpp:612
ctre::phoenix::StatusCode Apply(const MountPoseConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition CorePigeon2.hpp:313
ctre::phoenix::StatusCode Refresh(Pigeon2Configuration &configs) const
Refreshes the values of the specified config group.
Definition CorePigeon2.hpp:415
ctre::phoenix::StatusCode ClearStickyFault_DataAcquiredLate()
Clear sticky fault: Motion stack data acquisition was slower than expected.
Definition CorePigeon2.hpp:902
ctre::phoenix::StatusCode Apply(const GyroTrimConfigs &configs)
Applies the contents of the specified config to the device.
Definition CorePigeon2.hpp:328
ctre::phoenix::StatusCode ClearStickyFault_Hardware()
Clear sticky fault: Hardware fault occurred.
Definition CorePigeon2.hpp:647
Configs to enable/disable various features of the Pigeon2.
Definition Pigeon2FeaturesConfigs.hpp:24
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
The unique identifier for a device.
Definition DeviceIdentifier.hpp:19
Parent class for all devices.
Definition ParentDevice.hpp:23
Class description for the Pigeon 2 IMU sensor that measures orientation.
Definition CorePigeon2.hpp:1062
StatusSignal< bool > & GetTemperatureCompensationDisabled(bool refresh=true)
Whether the temperature-compensation feature is disabled.
StatusSignal< units::dimensionless::scalar_t > & GetQuatX(bool refresh=true)
The X component of the reported Quaternion.
StatusSignal< units::angular_velocity::degrees_per_second_t > & GetAngularVelocityXWorld(bool refresh=true)
The angular velocity (ω) of the Pigeon 2 about the X axis with respect to the world frame.
StatusSignal< units::angle::degree_t > & GetRoll(bool refresh=true)
Current reported roll of the Pigeon2.
StatusSignal< units::acceleration::standard_gravity_t > & GetAccelerationZ(bool refresh=true)
The acceleration measured by Pigeon2 in the Z direction.
StatusSignal< units::angular_velocity::degrees_per_second_t > & GetAngularVelocityXDevice(bool refresh=true)
The angular velocity (ω) of the Pigeon 2 about the device's X axis.
static CorePigeon2 None()
Constructs a stubbed-out CorePigeon2, where all status signals, controls, configs,...
Definition CorePigeon2.hpp:1106
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage()
Clear sticky fault: Device supply voltage dropped to near brownout levels.
Definition CorePigeon2.hpp:2561
ctre::phoenix::StatusCode ClearStickyFault_BootupMagnetometer(units::time::second_t timeoutSeconds)
Clear sticky fault: Bootup checks failed: Magnetometer.
Definition CorePigeon2.hpp:2664
ctre::phoenix::StatusCode ClearStickyFault_BootupAccelerometer()
Clear sticky fault: Bootup checks failed: Accelerometer.
Definition CorePigeon2.hpp:2631
StatusSignal< units::angle::degree_t > & GetYaw(bool refresh=true)
Current reported yaw of the Pigeon2.
StatusSignal< bool > & GetFault_SaturatedMagnetometer(bool refresh=true)
Magnetometer values are saturated.
ctre::phoenix::StatusCode ClearStickyFault_DataAcquiredLate(units::time::second_t timeoutSeconds)
Clear sticky fault: Motion stack data acquisition was slower than expected.
Definition CorePigeon2.hpp:2709
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse()
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
Definition CorePigeon2.hpp:2609
StatusSignal< units::magnetic_field_strength::microtesla_t > & GetRawMagneticFieldX(bool refresh=true)
The raw magnitude of the magnetic field measured by the Pigeon 2 in the X direction.
StatusSignal< bool > & GetStickyFault_BootupGyroscope(bool refresh=true)
Bootup checks failed: Gyroscope.
StatusSignal< units::dimensionless::scalar_t > & GetQuatY(bool refresh=true)
The Y component of the reported Quaternion.
StatusSignal< bool > & GetFault_LoopTimeSlow(bool refresh=true)
Motion stack loop time was slower than expected.
StatusSignal< units::dimensionless::scalar_t > & GetGravityVectorY(bool refresh=true)
The Y component of the gravity vector.
StatusSignal< bool > & GetFault_SaturatedAccelerometer(bool refresh=true)
Accelerometer values are saturated.
StatusSignal< bool > & GetStickyFault_UnlicensedFeatureInUse(bool refresh=true)
An unlicensed feature is in use, device may not behave as expected.
StatusSignal< units::angle::degree_t > & GetAccumGyroX(bool refresh=true)
The accumulated gyro about the X axis without any sensor fusing.
StatusSignal< int > & GetVersion(bool refresh=true)
Full Version of firmware in device.
ctre::phoenix::StatusCode ClearStickyFaults()
Clear the sticky faults in the device.
Definition CorePigeon2.hpp:2515
ctre::phoenix::StatusCode ClearStickyFault_LoopTimeSlow(units::time::second_t timeoutSeconds)
Clear sticky fault: Motion stack loop time was slower than expected.
Definition CorePigeon2.hpp:2733
StatusSignal< units::angular_velocity::degrees_per_second_t > & GetAngularVelocityZWorld(bool refresh=true)
The angular velocity (ω) of the Pigeon 2 about the Z axis with respect to the world frame.
ctre::phoenix::StatusCode ClearStickyFault_DataAcquiredLate()
Clear sticky fault: Motion stack data acquisition was slower than expected.
Definition CorePigeon2.hpp:2721
StatusSignal< bool > & GetStickyFault_SaturatedMagnetometer(bool refresh=true)
Magnetometer values are saturated.
StatusSignal< bool > & GetStickyFault_BootIntoMotion(bool refresh=true)
Motion Detected during bootup.
StatusSignal< units::angular_velocity::degrees_per_second_t > & GetAngularVelocityZDevice(bool refresh=true)
The angular velocity (ω) of the Pigeon 2 about the device's Z axis.
CorePigeon2(int deviceId, CANBus canbus={})
Constructs a new Pigeon 2 sensor object.
ctre::phoenix::StatusCode ClearStickyFault_SaturatedAccelerometer()
Clear sticky fault: Accelerometer values are saturated.
Definition CorePigeon2.hpp:2789
StatusSignal< int > & GetStickyFaultField(bool refresh=true)
Integer representing all (persistent) sticky fault flags reported by the device.
StatusSignal< bool > & GetNoMotionEnabled(bool refresh=true)
Whether the no-motion calibration feature is enabled.
ctre::phoenix::StatusCode ClearStickyFault_SaturatedGyroscope()
Clear sticky fault: Gyroscope values are saturated.
Definition CorePigeon2.hpp:2811
StatusSignal< units::angle::degree_t > & GetPitch(bool refresh=true)
Current reported pitch of the Pigeon2.
configs::Pigeon2Configurator & GetConfigurator()
Gets the configurator for this Pigeon2.
Definition CorePigeon2.hpp:1118
StatusSignal< bool > & GetFault_SaturatedGyroscope(bool refresh=true)
Gyroscope values are saturated.
ctre::phoenix::StatusCode ClearStickyFault_Hardware()
Clear sticky fault: Hardware fault occurred.
Definition CorePigeon2.hpp:2537
StatusSignal< units::angle::degree_t > & GetAccumGyroY(bool refresh=true)
The accumulated gyro about the Y axis without any sensor fusing.
ctre::phoenix::StatusCode SetYaw(units::angle::degree_t newValue, units::time::second_t timeoutSeconds)
The yaw to set the Pigeon2 to right now.
Definition CorePigeon2.hpp:2473
StatusSignal< bool > & GetStickyFault_Undervoltage(bool refresh=true)
Device supply voltage dropped to near brownout levels.
StatusSignal< units::voltage::volt_t > & GetSupplyVoltage(bool refresh=true)
Measured supply voltage to the Pigeon2.
configs::Pigeon2Configurator const & GetConfigurator() const
Gets the configurator for this Pigeon2.
Definition CorePigeon2.hpp:1130
StatusSignal< bool > & GetFault_BootupGyroscope(bool refresh=true)
Bootup checks failed: Gyroscope.
StatusSignal< units::acceleration::standard_gravity_t > & GetAccelerationX(bool refresh=true)
The acceleration measured by Pigeon2 in the X direction.
ctre::phoenix::StatusCode ClearStickyFault_SaturatedGyroscope(units::time::second_t timeoutSeconds)
Clear sticky fault: Gyroscope values are saturated.
Definition CorePigeon2.hpp:2800
StatusSignal< units::dimensionless::scalar_t > & GetQuatW(bool refresh=true)
The W component of the reported Quaternion.
StatusSignal< bool > & GetStickyFault_Hardware(bool refresh=true)
Hardware fault occurred.
StatusSignal< bool > & GetStickyFault_SaturatedAccelerometer(bool refresh=true)
Accelerometer values are saturated.
StatusSignal< units::angular_velocity::degrees_per_second_t > & GetAngularVelocityYDevice(bool refresh=true)
The angular velocity (ω) of the Pigeon 2 about the device's Y axis.
ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds)
Clear the sticky faults in the device.
Definition CorePigeon2.hpp:2500
ctre::phoenix::StatusCode ClearStickyFault_SaturatedMagnetometer(units::time::second_t timeoutSeconds)
Clear sticky fault: Magnetometer values are saturated.
Definition CorePigeon2.hpp:2756
ctre::phoenix::StatusCode ClearStickyFault_BootupGyroscope()
Clear sticky fault: Bootup checks failed: Gyroscope.
Definition CorePigeon2.hpp:2653
StatusSignal< bool > & GetFault_Undervoltage(bool refresh=true)
Device supply voltage dropped to near brownout levels.
ctre::phoenix::StatusCode ClearStickyFault_BootIntoMotion()
Clear sticky fault: Motion Detected during bootup.
Definition CorePigeon2.hpp:2697
ctre::phoenix::StatusCode ClearStickyFault_SaturatedMagnetometer()
Clear sticky fault: Magnetometer values are saturated.
Definition CorePigeon2.hpp:2767
StatusSignal< units::magnetic_field_strength::microtesla_t > & GetMagneticFieldX(bool refresh=true)
The biased magnitude of the magnetic field measured by the Pigeon 2 in the X direction.
StatusSignal< units::dimensionless::scalar_t > & GetNoMotionCount(bool refresh=true)
The number of times a no-motion event occurred, wraps at 15.
StatusSignal< units::time::second_t > & GetUpTime(bool refresh=true)
How long the Pigeon 2's been up in seconds, caps at 255 seconds.
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable(units::time::second_t timeoutSeconds)
Clear sticky fault: Device boot while detecting the enable signal.
Definition CorePigeon2.hpp:2573
StatusSignal< int > & GetVersionMajor(bool refresh=true)
App Major Version number.
StatusSignal< bool > & GetFault_BootIntoMotion(bool refresh=true)
Motion Detected during bootup.
ctre::phoenix::StatusCode ClearStickyFault_LoopTimeSlow()
Clear sticky fault: Motion stack loop time was slower than expected.
Definition CorePigeon2.hpp:2745
StatusSignal< units::magnetic_field_strength::microtesla_t > & GetMagneticFieldZ(bool refresh=true)
The biased magnitude of the magnetic field measured by the Pigeon 2 in the Z direction.
StatusSignal< units::dimensionless::scalar_t > & GetGravityVectorX(bool refresh=true)
The X component of the gravity vector.
StatusSignal< bool > & GetStickyFault_SaturatedGyroscope(bool refresh=true)
Gyroscope values are saturated.
StatusSignal< bool > & GetFault_BootupAccelerometer(bool refresh=true)
Bootup checks failed: Accelerometer.
StatusSignal< bool > & GetStickyFault_BootDuringEnable(bool refresh=true)
Device boot while detecting the enable signal.
StatusSignal< int > & GetFaultField(bool refresh=true)
Integer representing all fault flags reported by the device.
StatusSignal< bool > & GetFault_BootupMagnetometer(bool refresh=true)
Bootup checks failed: Magnetometer.
StatusSignal< units::temperature::celsius_t > & GetTemperature(bool refresh=true)
Temperature of the Pigeon 2.
CorePigeon2(int deviceId, std::string canbus)
Constructs a new Pigeon 2 sensor object.
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage(units::time::second_t timeoutSeconds)
Clear sticky fault: Device supply voltage dropped to near brownout levels.
Definition CorePigeon2.hpp:2549
ctre::phoenix::StatusCode ClearStickyFault_BootupGyroscope(units::time::second_t timeoutSeconds)
Clear sticky fault: Bootup checks failed: Gyroscope.
Definition CorePigeon2.hpp:2642
ctre::phoenix::StatusCode ClearStickyFault_BootIntoMotion(units::time::second_t timeoutSeconds)
Clear sticky fault: Motion Detected during bootup.
Definition CorePigeon2.hpp:2686
StatusSignal< bool > & GetFault_UnlicensedFeatureInUse(bool refresh=true)
An unlicensed feature is in use, device may not behave as expected.
StatusSignal< int > & GetVersionBugfix(bool refresh=true)
App Bugfix Version number.
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse(units::time::second_t timeoutSeconds)
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
Definition CorePigeon2.hpp:2597
ctre::phoenix::StatusCode ClearStickyFault_Hardware(units::time::second_t timeoutSeconds)
Clear sticky fault: Hardware fault occurred.
Definition CorePigeon2.hpp:2526
StatusSignal< bool > & GetFault_BootDuringEnable(bool refresh=true)
Device boot while detecting the enable signal.
StatusSignal< bool > & GetStickyFault_LoopTimeSlow(bool refresh=true)
Motion stack loop time was slower than expected.
StatusSignal< bool > & GetFault_DataAcquiredLate(bool refresh=true)
Motion stack data acquisition was slower than expected.
StatusSignal< bool > & GetIsProLicensed(bool refresh=true)
Whether the device is Phoenix Pro licensed.
ctre::phoenix::StatusCode SetYaw(units::angle::degree_t newValue)
The yaw to set the Pigeon2 to right now.
Definition CorePigeon2.hpp:2485
StatusSignal< units::acceleration::standard_gravity_t > & GetAccelerationY(bool refresh=true)
The acceleration measured by Pigeon2 in the Y direction.
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable()
Clear sticky fault: Device boot while detecting the enable signal.
Definition CorePigeon2.hpp:2585
StatusSignal< units::dimensionless::scalar_t > & GetQuatZ(bool refresh=true)
The Z component of the reported Quaternion.
StatusSignal< units::dimensionless::scalar_t > & GetGravityVectorZ(bool refresh=true)
The Z component of the gravity vector.
StatusSignal< units::magnetic_field_strength::microtesla_t > & GetRawMagneticFieldZ(bool refresh=true)
The raw magnitude of the magnetic field measured by the Pigeon 2 in the Z direction.
StatusSignal< int > & GetVersionBuild(bool refresh=true)
App Build Version number.
ctre::phoenix::StatusCode ClearStickyFault_BootupAccelerometer(units::time::second_t timeoutSeconds)
Clear sticky fault: Bootup checks failed: Accelerometer.
Definition CorePigeon2.hpp:2620
StatusSignal< units::magnetic_field_strength::microtesla_t > & GetMagneticFieldY(bool refresh=true)
The biased magnitude of the magnetic field measured by the Pigeon 2 in the Y direction.
StatusSignal< bool > & GetStickyFault_BootupAccelerometer(bool refresh=true)
Bootup checks failed: Accelerometer.
StatusSignal< units::angle::degree_t > & GetAccumGyroZ(bool refresh=true)
The accumulated gyro about the Z axis without any sensor fusing.
StatusSignal< units::magnetic_field_strength::microtesla_t > & GetRawMagneticFieldY(bool refresh=true)
The raw magnitude of the magnetic field measured by the Pigeon 2 in the Y direction.
StatusSignal< bool > & GetStickyFault_BootupMagnetometer(bool refresh=true)
Bootup checks failed: Magnetometer.
ctre::phoenix::StatusCode ClearStickyFault_SaturatedAccelerometer(units::time::second_t timeoutSeconds)
Clear sticky fault: Accelerometer values are saturated.
Definition CorePigeon2.hpp:2778
ctre::phoenix::StatusCode ClearStickyFault_BootupMagnetometer()
Clear sticky fault: Bootup checks failed: Magnetometer.
Definition CorePigeon2.hpp:2675
StatusSignal< bool > & GetStickyFault_DataAcquiredLate(bool refresh=true)
Motion stack data acquisition was slower than expected.
StatusSignal< units::angular_velocity::degrees_per_second_t > & GetAngularVelocityYWorld(bool refresh=true)
The angular velocity (ω) of the Pigeon 2 about the Y axis with respect to the world frame.
StatusSignal< int > & GetVersionMinor(bool refresh=true)
App Minor Version number.
StatusSignal< bool > & GetFault_Hardware(bool refresh=true)
Hardware fault occurred.
sim::Pigeon2SimState & GetSimState()
Get the simulation state for this device.
Definition CorePigeon2.hpp:1148
Class to control the state of a simulated hardware::Pigeon2.
Definition Pigeon2SimState.hpp:31
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:28
Definition motor_constants.h:14