CTRE Phoenix 6 C++ 26.0.0-beta-1
Loading...
Searching...
No Matches
Pigeon2FeaturesConfigs.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
10
11
12namespace ctre {
13namespace phoenix6 {
14
15
16namespace configs {
17
18/**
19 * \brief Configs to enable/disable various features of the Pigeon2.
20 *
21 * \details These configs allow the user to enable or disable various
22 * aspects of the Pigeon2.
23 */
25public:
26 constexpr Pigeon2FeaturesConfigs() = default;
27
28 /**
29 * \brief Turns on or off the magnetometer fusing for 9-axis. FRC
30 * users are not recommended to turn this on, as the magnetic
31 * influence of the robot will likely negatively affect the
32 * performance of the Pigeon2.
33 *
34 * - Default Value: False
35 */
36 bool EnableCompass = false;
37 /**
38 * \brief Disables using the temperature compensation feature.
39 *
40 * - Default Value: False
41 */
43 /**
44 * \brief Disables using the no-motion calibration feature.
45 *
46 * - Default Value: False
47 */
49
50 /**
51 * \brief Modifies this configuration's EnableCompass parameter and returns itself for
52 * method-chaining and easier to use config API.
53 *
54 * Turns on or off the magnetometer fusing for 9-axis. FRC users are
55 * not recommended to turn this on, as the magnetic influence of the
56 * robot will likely negatively affect the performance of the Pigeon2.
57 *
58 * - Default Value: False
59 *
60 * \param newEnableCompass Parameter to modify
61 * \returns Itself
62 */
63 constexpr Pigeon2FeaturesConfigs &WithEnableCompass(bool newEnableCompass)
64 {
65 EnableCompass = std::move(newEnableCompass);
66 return *this;
67 }
68
69 /**
70 * \brief Modifies this configuration's DisableTemperatureCompensation parameter and returns itself for
71 * method-chaining and easier to use config API.
72 *
73 * Disables using the temperature compensation feature.
74 *
75 * - Default Value: False
76 *
77 * \param newDisableTemperatureCompensation Parameter to modify
78 * \returns Itself
79 */
80 constexpr Pigeon2FeaturesConfigs &WithDisableTemperatureCompensation(bool newDisableTemperatureCompensation)
81 {
82 DisableTemperatureCompensation = std::move(newDisableTemperatureCompensation);
83 return *this;
84 }
85
86 /**
87 * \brief Modifies this configuration's DisableNoMotionCalibration parameter and returns itself for
88 * method-chaining and easier to use config API.
89 *
90 * Disables using the no-motion calibration feature.
91 *
92 * - Default Value: False
93 *
94 * \param newDisableNoMotionCalibration Parameter to modify
95 * \returns Itself
96 */
97 constexpr Pigeon2FeaturesConfigs &WithDisableNoMotionCalibration(bool newDisableNoMotionCalibration)
98 {
99 DisableNoMotionCalibration = std::move(newDisableNoMotionCalibration);
100 return *this;
101 }
102
103
104
105 std::string ToString() const override;
106
107 std::string Serialize() const final;
108 ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final;
109};
110
111}
112}
113}
Definition Configuration.hpp:17
Configs to enable/disable various features of the Pigeon2.
Definition Pigeon2FeaturesConfigs.hpp:24
constexpr Pigeon2FeaturesConfigs & WithEnableCompass(bool newEnableCompass)
Modifies this configuration's EnableCompass parameter and returns itself for method-chaining and easi...
Definition Pigeon2FeaturesConfigs.hpp:63
bool DisableTemperatureCompensation
Disables using the temperature compensation feature.
Definition Pigeon2FeaturesConfigs.hpp:42
constexpr Pigeon2FeaturesConfigs & WithDisableTemperatureCompensation(bool newDisableTemperatureCompensation)
Modifies this configuration's DisableTemperatureCompensation parameter and returns itself for method-...
Definition Pigeon2FeaturesConfigs.hpp:80
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
bool DisableNoMotionCalibration
Disables using the no-motion calibration feature.
Definition Pigeon2FeaturesConfigs.hpp:48
constexpr Pigeon2FeaturesConfigs & WithDisableNoMotionCalibration(bool newDisableNoMotionCalibration)
Modifies this configuration's DisableNoMotionCalibration parameter and returns itself for method-chai...
Definition Pigeon2FeaturesConfigs.hpp:97
bool EnableCompass
Turns on or off the magnetometer fusing for 9-axis.
Definition Pigeon2FeaturesConfigs.hpp:36
Definition motor_constants.h:14