21namespace hardware {
namespace core {
class CoreCANcoder; } }
22namespace configs {
class SlotConfigs; }
35 virtual ctre::phoenix::StatusCode
Deserialize(
const std::string &
string) = 0;
78 ss <<
"{" << std::endl;
79 ss <<
"Config Group: MagnetSensor" << std::endl;
80 ss <<
"Name: \"SensorDirection\" Value: \"" <<
SensorDirection <<
"\"" << std::endl;
81 ss <<
"Name: \"MagnetOffset\" Value: \"" <<
MagnetOffset <<
"rotations\"" << std::endl;
82 ss <<
"Name: \"AbsoluteSensorRange\" Value: \"" <<
AbsoluteSensorRange <<
"\"" << std::endl;
83 ss <<
"}" << std::endl;
97 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
99 const char *string_c_str = to_deserialize.c_str();
100 size_t string_length = to_deserialize.length();
151 std::stringstream ss;
152 ss <<
"{" << std::endl;
153 ss <<
"Config Group: MountPose" << std::endl;
154 ss <<
"Name: \"MountPoseYaw\" Value: \"" <<
MountPoseYaw <<
"deg\"" << std::endl;
155 ss <<
"Name: \"MountPosePitch\" Value: \"" <<
MountPosePitch <<
"deg\"" << std::endl;
156 ss <<
"Name: \"MountPoseRoll\" Value: \"" <<
MountPoseRoll <<
"deg\"" << std::endl;
157 ss <<
"}" << std::endl;
163 std::stringstream ss;
171 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
173 const char *string_c_str = to_deserialize.c_str();
174 size_t string_length = to_deserialize.length();
227 std::stringstream ss;
228 ss <<
"{" << std::endl;
229 ss <<
"Config Group: GyroTrim" << std::endl;
230 ss <<
"Name: \"GyroScalarX\" Value: \"" <<
GyroScalarX <<
"deg per rotation\"" << std::endl;
231 ss <<
"Name: \"GyroScalarY\" Value: \"" <<
GyroScalarY <<
"deg per rotation\"" << std::endl;
232 ss <<
"Name: \"GyroScalarZ\" Value: \"" <<
GyroScalarZ <<
"deg per rotation\"" << std::endl;
233 ss <<
"}" << std::endl;
239 std::stringstream ss;
247 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
249 const char *string_c_str = to_deserialize.c_str();
250 size_t string_length = to_deserialize.length();
294 std::stringstream ss;
295 ss <<
"{" << std::endl;
296 ss <<
"Config Group: Pigeon2Features" << std::endl;
297 ss <<
"Name: \"EnableCompass\" Value: \"" <<
EnableCompass <<
"\"" << std::endl;
300 ss <<
"}" << std::endl;
306 std::stringstream ss;
314 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
316 const char *string_c_str = to_deserialize.c_str();
317 size_t string_length = to_deserialize.length();
379 std::stringstream ss;
380 ss <<
"{" << std::endl;
381 ss <<
"Config Group: MotorOutput" << std::endl;
382 ss <<
"Name: \"Inverted\" Value: \"" <<
Inverted <<
"\"" << std::endl;
383 ss <<
"Name: \"NeutralMode\" Value: \"" <<
NeutralMode <<
"\"" << std::endl;
385 ss <<
"Name: \"PeakForwardDutyCycle\" Value: \"" <<
PeakForwardDutyCycle <<
"fractional\"" << std::endl;
386 ss <<
"Name: \"PeakReverseDutyCycle\" Value: \"" <<
PeakReverseDutyCycle <<
"fractional\"" << std::endl;
387 ss <<
"}" << std::endl;
393 std::stringstream ss;
403 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
405 const char *string_c_str = to_deserialize.c_str();
406 size_t string_length = to_deserialize.length();
491 std::stringstream ss;
492 ss <<
"{" << std::endl;
493 ss <<
"Config Group: CurrentLimits" << std::endl;
494 ss <<
"Name: \"StatorCurrentLimit\" Value: \"" <<
StatorCurrentLimit <<
"A\"" << std::endl;
496 ss <<
"Name: \"SupplyCurrentLimit\" Value: \"" <<
SupplyCurrentLimit <<
"A\"" << std::endl;
499 ss <<
"Name: \"SupplyTimeThreshold\" Value: \"" <<
SupplyTimeThreshold <<
"sec\"" << std::endl;
500 ss <<
"}" << std::endl;
506 std::stringstream ss;
517 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
519 const char *string_c_str = to_deserialize.c_str();
520 size_t string_length = to_deserialize.length();
577 std::stringstream ss;
578 ss <<
"{" << std::endl;
579 ss <<
"Config Group: Voltage" << std::endl;
581 ss <<
"Name: \"PeakForwardVoltage\" Value: \"" <<
PeakForwardVoltage <<
"V\"" << std::endl;
582 ss <<
"Name: \"PeakReverseVoltage\" Value: \"" <<
PeakReverseVoltage <<
"V\"" << std::endl;
583 ss <<
"}" << std::endl;
589 std::stringstream ss;
597 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
599 const char *string_c_str = to_deserialize.c_str();
600 size_t string_length = to_deserialize.length();
654 std::stringstream ss;
655 ss <<
"{" << std::endl;
656 ss <<
"Config Group: TorqueCurrent" << std::endl;
660 ss <<
"}" << std::endl;
666 std::stringstream ss;
674 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
676 const char *string_c_str = to_deserialize.c_str();
677 size_t string_length = to_deserialize.length();
801 std::stringstream ss;
802 ss <<
"{" << std::endl;
803 ss <<
"Config Group: Feedback" << std::endl;
804 ss <<
"Name: \"FeedbackRotorOffset\" Value: \"" <<
FeedbackRotorOffset <<
"rotations\"" << std::endl;
806 ss <<
"Name: \"RotorToSensorRatio\" Value: \"" <<
RotorToSensorRatio <<
"scalar\"" << std::endl;
809 ss <<
"}" << std::endl;
815 std::stringstream ss;
825 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
827 const char *string_c_str = to_deserialize.c_str();
828 size_t string_length = to_deserialize.length();
899 std::stringstream ss;
900 ss <<
"{" << std::endl;
901 ss <<
"Config Group: DifferentialSensors" << std::endl;
905 ss <<
"}" << std::endl;
911 std::stringstream ss;
919 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
921 const char *string_c_str = to_deserialize.c_str();
922 size_t string_length = to_deserialize.length();
975 std::stringstream ss;
976 ss <<
"{" << std::endl;
977 ss <<
"Config Group: DifferentialConstants" << std::endl;
981 ss <<
"}" << std::endl;
987 std::stringstream ss;
995 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
997 const char *string_c_str = to_deserialize.c_str();
998 size_t string_length = to_deserialize.length();
1051 std::stringstream ss;
1052 ss <<
"{" << std::endl;
1053 ss <<
"Config Group: OpenLoopRamps" << std::endl;
1057 ss <<
"}" << std::endl;
1063 std::stringstream ss;
1071 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
1073 const char *string_c_str = to_deserialize.c_str();
1074 size_t string_length = to_deserialize.length();
1127 std::stringstream ss;
1128 ss <<
"{" << std::endl;
1129 ss <<
"Config Group: ClosedLoopRamps" << std::endl;
1133 ss <<
"}" << std::endl;
1139 std::stringstream ss;
1147 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
1149 const char *string_c_str = to_deserialize.c_str();
1150 size_t string_length = to_deserialize.length();
1267 std::stringstream ss;
1268 ss <<
"{" << std::endl;
1269 ss <<
"Config Group: HardwareLimitSwitch" << std::endl;
1270 ss <<
"Name: \"ForwardLimitType\" Value: \"" <<
ForwardLimitType <<
"\"" << std::endl;
1273 ss <<
"Name: \"ForwardLimitEnable\" Value: \"" <<
ForwardLimitEnable <<
"\"" << std::endl;
1274 ss <<
"Name: \"ForwardLimitSource\" Value: \"" <<
ForwardLimitSource <<
"\"" << std::endl;
1276 ss <<
"Name: \"ReverseLimitType\" Value: \"" <<
ReverseLimitType <<
"\"" << std::endl;
1279 ss <<
"Name: \"ReverseLimitEnable\" Value: \"" <<
ReverseLimitEnable <<
"\"" << std::endl;
1280 ss <<
"Name: \"ReverseLimitSource\" Value: \"" <<
ReverseLimitSource <<
"\"" << std::endl;
1282 ss <<
"}" << std::endl;
1288 std::stringstream ss;
1305 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
1307 const char *string_c_str = to_deserialize.c_str();
1308 size_t string_length = to_deserialize.length();
1367 std::stringstream ss;
1368 ss <<
"{" << std::endl;
1369 ss <<
"Config Group: Audio" << std::endl;
1370 ss <<
"Name: \"BeepOnBoot\" Value: \"" <<
BeepOnBoot <<
"\"" << std::endl;
1371 ss <<
"Name: \"BeepOnConfig\" Value: \"" <<
BeepOnConfig <<
"\"" << std::endl;
1373 ss <<
"}" << std::endl;
1379 std::stringstream ss;
1387 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
1389 const char *string_c_str = to_deserialize.c_str();
1390 size_t string_length = to_deserialize.length();
1447 std::stringstream ss;
1448 ss <<
"{" << std::endl;
1449 ss <<
"Config Group: SoftwareLimitSwitch" << std::endl;
1454 ss <<
"}" << std::endl;
1460 std::stringstream ss;
1469 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
1471 const char *string_c_str = to_deserialize.c_str();
1472 size_t string_length = to_deserialize.length();
1527 std::stringstream ss;
1528 ss <<
"{" << std::endl;
1529 ss <<
"Config Group: MotionMagic" << std::endl;
1531 ss <<
"Name: \"MotionMagicAcceleration\" Value: \"" <<
MotionMagicAcceleration <<
"rot per sec²\"" << std::endl;
1532 ss <<
"Name: \"MotionMagicJerk\" Value: \"" <<
MotionMagicJerk <<
"rot per sec³\"" << std::endl;
1533 ss <<
"}" << std::endl;
1539 std::stringstream ss;
1547 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
1549 const char *string_c_str = to_deserialize.c_str();
1550 size_t string_length = to_deserialize.length();
1592 std::stringstream ss;
1593 ss <<
"{" << std::endl;
1594 ss <<
"Config Group: CustomParams" << std::endl;
1595 ss <<
"Name: \"CustomParam0\" Value: \"" <<
CustomParam0 <<
"\"" << std::endl;
1596 ss <<
"Name: \"CustomParam1\" Value: \"" <<
CustomParam1 <<
"\"" << std::endl;
1597 ss <<
"}" << std::endl;
1603 std::stringstream ss;
1610 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
1612 const char *string_c_str = to_deserialize.c_str();
1613 size_t string_length = to_deserialize.length();
1647 std::stringstream ss;
1648 ss <<
"{" << std::endl;
1649 ss <<
"Config Group: ClosedLoopGeneral" << std::endl;
1650 ss <<
"Name: \"ContinuousWrap\" Value: \"" <<
ContinuousWrap <<
"\"" << std::endl;
1651 ss <<
"}" << std::endl;
1657 std::stringstream ss;
1663 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
1665 const char *string_c_str = to_deserialize.c_str();
1666 size_t string_length = to_deserialize.length();
1817 std::stringstream ss;
1818 ss <<
"{" << std::endl;
1819 ss <<
"Config Group: Slot0" << std::endl;
1820 ss <<
"Name: \"kP\" Value: \"" <<
kP <<
"\"" << std::endl;
1821 ss <<
"Name: \"kI\" Value: \"" <<
kI <<
"\"" << std::endl;
1822 ss <<
"Name: \"kD\" Value: \"" <<
kD <<
"\"" << std::endl;
1823 ss <<
"Name: \"kS\" Value: \"" <<
kS <<
"\"" << std::endl;
1824 ss <<
"Name: \"kV\" Value: \"" <<
kV <<
"\"" << std::endl;
1825 ss <<
"Name: \"kA\" Value: \"" <<
kA <<
"\"" << std::endl;
1826 ss <<
"Name: \"kG\" Value: \"" <<
kG <<
"\"" << std::endl;
1827 ss <<
"Name: \"GravityType\" Value: \"" <<
GravityType <<
"\"" << std::endl;
1828 ss <<
"}" << std::endl;
1834 std::stringstream ss;
1847 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
1849 const char *string_c_str = to_deserialize.c_str();
1850 size_t string_length = to_deserialize.length();
2007 std::stringstream ss;
2008 ss <<
"{" << std::endl;
2009 ss <<
"Config Group: Slot1" << std::endl;
2010 ss <<
"Name: \"kP\" Value: \"" <<
kP <<
"\"" << std::endl;
2011 ss <<
"Name: \"kI\" Value: \"" <<
kI <<
"\"" << std::endl;
2012 ss <<
"Name: \"kD\" Value: \"" <<
kD <<
"\"" << std::endl;
2013 ss <<
"Name: \"kS\" Value: \"" <<
kS <<
"\"" << std::endl;
2014 ss <<
"Name: \"kV\" Value: \"" <<
kV <<
"\"" << std::endl;
2015 ss <<
"Name: \"kA\" Value: \"" <<
kA <<
"\"" << std::endl;
2016 ss <<
"Name: \"kG\" Value: \"" <<
kG <<
"\"" << std::endl;
2017 ss <<
"Name: \"GravityType\" Value: \"" <<
GravityType <<
"\"" << std::endl;
2018 ss <<
"}" << std::endl;
2024 std::stringstream ss;
2037 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
2039 const char *string_c_str = to_deserialize.c_str();
2040 size_t string_length = to_deserialize.length();
2197 std::stringstream ss;
2198 ss <<
"{" << std::endl;
2199 ss <<
"Config Group: Slot2" << std::endl;
2200 ss <<
"Name: \"kP\" Value: \"" <<
kP <<
"\"" << std::endl;
2201 ss <<
"Name: \"kI\" Value: \"" <<
kI <<
"\"" << std::endl;
2202 ss <<
"Name: \"kD\" Value: \"" <<
kD <<
"\"" << std::endl;
2203 ss <<
"Name: \"kS\" Value: \"" <<
kS <<
"\"" << std::endl;
2204 ss <<
"Name: \"kV\" Value: \"" <<
kV <<
"\"" << std::endl;
2205 ss <<
"Name: \"kA\" Value: \"" <<
kA <<
"\"" << std::endl;
2206 ss <<
"Name: \"kG\" Value: \"" <<
kG <<
"\"" << std::endl;
2207 ss <<
"Name: \"GravityType\" Value: \"" <<
GravityType <<
"\"" << std::endl;
2208 ss <<
"}" << std::endl;
2214 std::stringstream ss;
2227 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
override
2229 const char *string_c_str = to_deserialize.c_str();
2230 size_t string_length = to_deserialize.length();
2263 std::map<int, SlotSpns> genericMap{
2265 ctre::phoenix6::spns::SpnValue::Slot0_kP,
2266 ctre::phoenix6::spns::SpnValue::Slot0_kI,
2267 ctre::phoenix6::spns::SpnValue::Slot0_kD,
2268 ctre::phoenix6::spns::SpnValue::Slot0_kS,
2269 ctre::phoenix6::spns::SpnValue::Slot0_kV,
2270 ctre::phoenix6::spns::SpnValue::Slot0_kA,
2271 ctre::phoenix6::spns::SpnValue::Slot0_kG,
2272 ctre::phoenix6::spns::SpnValue::Slot0_kG_Type,
2276 ctre::phoenix6::spns::SpnValue::Slot1_kP,
2277 ctre::phoenix6::spns::SpnValue::Slot1_kI,
2278 ctre::phoenix6::spns::SpnValue::Slot1_kD,
2279 ctre::phoenix6::spns::SpnValue::Slot1_kS,
2280 ctre::phoenix6::spns::SpnValue::Slot1_kV,
2281 ctre::phoenix6::spns::SpnValue::Slot1_kA,
2282 ctre::phoenix6::spns::SpnValue::Slot1_kG,
2283 ctre::phoenix6::spns::SpnValue::Slot1_kG_Type,
2287 ctre::phoenix6::spns::SpnValue::Slot2_kP,
2288 ctre::phoenix6::spns::SpnValue::Slot2_kI,
2289 ctre::phoenix6::spns::SpnValue::Slot2_kD,
2290 ctre::phoenix6::spns::SpnValue::Slot2_kS,
2291 ctre::phoenix6::spns::SpnValue::Slot2_kV,
2292 ctre::phoenix6::spns::SpnValue::Slot2_kA,
2293 ctre::phoenix6::spns::SpnValue::Slot2_kG,
2294 ctre::phoenix6::spns::SpnValue::Slot2_kG_Type,
2443 std::stringstream ss;
2444 ss <<
"{" << std::endl;
2445 ss <<
"Config Group: Slot" << std::endl;
2446 ss <<
"Name: \"kP\" Value: \"" <<
kP <<
"\"" << std::endl;
2447 ss <<
"Name: \"kI\" Value: \"" <<
kI <<
"\"" << std::endl;
2448 ss <<
"Name: \"kD\" Value: \"" <<
kD <<
"\"" << std::endl;
2449 ss <<
"Name: \"kS\" Value: \"" <<
kS <<
"\"" << std::endl;
2450 ss <<
"Name: \"kV\" Value: \"" <<
kV <<
"\"" << std::endl;
2451 ss <<
"Name: \"kA\" Value: \"" <<
kA <<
"\"" << std::endl;
2452 ss <<
"Name: \"kG\" Value: \"" <<
kG <<
"\"" << std::endl;
2453 ss <<
"Name: \"GravityType\" Value: \"" <<
GravityType <<
"\"" << std::endl;
2454 ss <<
"}" << std::endl;
2460 std::stringstream ss;
2461 SlotSpns currentSpns = genericMap.at(
SlotNumber);
2474 ctre::phoenix::StatusCode
Deserialize(
const std::string& to_deserialize)
2476 const char *string_c_str = to_deserialize.c_str();
2477 size_t string_length = to_deserialize.length();
2478 SlotSpns currentSpns = genericMap.at(
SlotNumber);
ii that the Software will be uninterrupted or error free
Definition: CTRE_LICENSE.txt:191
CTREXPORT int c_ctre_phoenix6_deserialize_double(int spn, const char *str, uint32_t strlen, double *val)
CTREXPORT int c_ctre_phoenix6_serialize_int(int spn, int value, char **str)
CTREXPORT int c_ctre_phoenix6_serialize_bool(int spn, bool value, char **str)
CTREXPORT int c_ctre_phoenix6_deserialize_bool(int spn, const char *str, uint32_t strlen, bool *val)
CTREXPORT int c_ctre_phoenix6_deserialize_int(int spn, const char *str, uint32_t strlen, int *val)
CTREXPORT int c_ctre_phoenix6_serialize_double(int spn, double value, char **str)
Definition: Serializable.hpp:15
Configs that affect audible components of the device.
Definition: Configs.hpp:1332
bool BeepOnConfig
If true, the TalonFX will beep during configuration API calls if device is disabled.
Definition: Configs.hpp:1351
bool AllowMusicDurDisable
If true, the TalonFX will allow Orchestra and MusicTone requests during disabled state.
Definition: Configs.hpp:1361
std::string Serialize() const override
Definition: Configs.hpp:1377
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:1387
std::string ToString() const override
Definition: Configs.hpp:1365
bool BeepOnBoot
If true, the TalonFX will beep during boot-up.
Definition: Configs.hpp:1342
Configs that affect general behavior during closed-looping.
Definition: Configs.hpp:1627
bool ContinuousWrap
Wrap position error within [-0.5,+0.5) mechanism rotations.
Definition: Configs.hpp:1641
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:1663
std::string ToString() const override
Definition: Configs.hpp:1645
std::string Serialize() const override
Definition: Configs.hpp:1655
Configs that affect the closed-loop control of this motor controller.
Definition: Configs.hpp:1090
double TorqueClosedLoopRampPeriod
If non-zero, this determines how much time to ramp from 0A output to 300A during closed-loop modes.
Definition: Configs.hpp:1121
std::string Serialize() const override
Definition: Configs.hpp:1137
double VoltageClosedLoopRampPeriod
If non-zero, this determines how much time to ramp from 0V output to 12V during closed-loop modes.
Definition: Configs.hpp:1111
double DutyCycleClosedLoopRampPeriod
If non-zero, this determines how much time to ramp from 0% output to 100% during closed-loop modes.
Definition: Configs.hpp:1101
std::string ToString() const override
Definition: Configs.hpp:1125
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:1147
Configs that directly affect current limiting features.
Definition: Configs.hpp:424
bool StatorCurrentLimitEnable
Enable motor stator current limiting.
Definition: Configs.hpp:443
double StatorCurrentLimit
The amount of current allowed in the motor (motoring and regen current).
Definition: Configs.hpp:437
double SupplyCurrentLimit
The amount of supply current allowed.
Definition: Configs.hpp:456
double SupplyCurrentThreshold
Delay supply current limiting until current exceeds this threshold for longer than SupplyTimeThreshol...
Definition: Configs.hpp:474
std::string Serialize() const override
Definition: Configs.hpp:504
double SupplyTimeThreshold
Allows unlimited current for a period of time before current limiting occurs.
Definition: Configs.hpp:485
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:517
std::string ToString() const override
Definition: Configs.hpp:489
bool SupplyCurrentLimitEnable
Enable motor supply current limiting.
Definition: Configs.hpp:462
Custom Params.
Definition: Configs.hpp:1565
std::string ToString() const override
Definition: Configs.hpp:1590
int CustomParam0
Custom parameter 0.
Definition: Configs.hpp:1576
std::string Serialize() const override
Definition: Configs.hpp:1601
int CustomParam1
Custom parameter 1.
Definition: Configs.hpp:1586
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:1610
Configs related to constants used for differential control of a mechanism.
Definition: Configs.hpp:938
std::string Serialize() const override
Definition: Configs.hpp:985
std::string ToString() const override
Definition: Configs.hpp:973
double PeakDifferentialDutyCycle
Maximum differential output during duty cycle based differential control modes.
Definition: Configs.hpp:949
double PeakDifferentialTorqueCurrent
Maximum differential output during torque current based differential control modes.
Definition: Configs.hpp:969
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:995
double PeakDifferentialVoltage
Maximum differential output during voltage based differential control modes.
Definition: Configs.hpp:959
Configs related to sensors used for differential control of a mechanism.
Definition: Configs.hpp:846
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:919
std::string Serialize() const override
Definition: Configs.hpp:909
std::string ToString() const override
Definition: Configs.hpp:897
signals::DifferentialSensorSourceValue DifferentialSensorSource
Choose what sensor source is used for differential control of a mechanism.
Definition: Configs.hpp:872
int DifferentialRemoteSensorID
Device ID of which remote sensor to use on the differential axis.
Definition: Configs.hpp:893
int DifferentialTalonFXSensorID
Device ID of which remote Talon FX to use.
Definition: Configs.hpp:882
Configs that affect the feedback of this motor controller.
Definition: Configs.hpp:695
std::string ToString() const override
Definition: Configs.hpp:799
double FeedbackRotorOffset
This offset is applied to the absolute integrated rotor sensor.
Definition: Configs.hpp:707
signals::FeedbackSensorSourceValue FeedbackSensorSource
Choose what sensor source is reported via API and used by closed-loop and limit features.
Definition: Configs.hpp:769
FeedbackConfigs & WithRemoteCANcoder(const hardware::core::CoreCANcoder &device)
Helper method to configure this feedback group to use Remote CANcoder by passing in the CANcoder obje...
double SensorToMechanismRatio
This is the ratio of sensor rotations to the mechanism's output.
Definition: Configs.hpp:720
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:825
std::string Serialize() const override
Definition: Configs.hpp:813
double RotorToSensorRatio
Talon FX is capable of fusing a remote CANcoder with its rotor sensor to produce a high-bandwidth sen...
Definition: Configs.hpp:733
int FeedbackRemoteSensorID
Device ID of which remote device to use.
Definition: Configs.hpp:779
FeedbackConfigs & WithFusedCANcoder(const hardware::core::CoreCANcoder &device)
Helper method to configure this feedback group to use Fused CANcoder by passing in the CANcoder objec...
Configs to trim the Pigeon2's gyroscope.
Definition: Configs.hpp:193
std::string Serialize() const override
Definition: Configs.hpp:237
std::string ToString() const override
Definition: Configs.hpp:225
double GyroScalarX
The gyro scalar component for the X axis.
Definition: Configs.hpp:203
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:247
double GyroScalarZ
The gyro scalar component for the Z axis.
Definition: Configs.hpp:221
double GyroScalarY
The gyro scalar component for the Y axis.
Definition: Configs.hpp:212
Configs that change how the motor controller behaves under different limit switch statse.
Definition: Configs.hpp:1168
std::string ToString() const override
Definition: Configs.hpp:1265
signals::ForwardLimitTypeValue ForwardLimitType
Determines if limit is normally-open (default) or normally-closed.
Definition: Configs.hpp:1175
signals::ForwardLimitSourceValue ForwardLimitSource
Determines where to poll the forward limit switch.
Definition: Configs.hpp:1205
bool ForwardLimitEnable
If enabled, motor output is set to neutral when forward limit switch is asseted and positive output i...
Definition: Configs.hpp:1199
bool ReverseLimitAutosetPositionEnable
If enabled, the position is auto-set to a specific value, specified by ReverseLimitAutosetPositionVal...
Definition: Configs.hpp:1228
bool ForwardLimitAutosetPositionEnable
If enabled, the position is auto-set to a specific value, specified by ForwardLimitAutosetPositionVal...
Definition: Configs.hpp:1182
signals::ReverseLimitTypeValue ReverseLimitType
Determines if limit is normally-open (default) or normally-closed.
Definition: Configs.hpp:1221
double ReverseLimitAutosetPositionValue
The value to auto-set the position to.
Definition: Configs.hpp:1238
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:1305
int ForwardLimitRemoteSensorID
Device ID of the device if using remote limit switch features.
Definition: Configs.hpp:1215
double ForwardLimitAutosetPositionValue
The value to auto-set the position to.
Definition: Configs.hpp:1192
signals::ReverseLimitSourceValue ReverseLimitSource
Determines where to poll the reverse limit switch.
Definition: Configs.hpp:1251
std::string Serialize() const override
Definition: Configs.hpp:1286
bool ReverseLimitEnable
If enabled, motor output is set to neutral when reverse limit switch is asseted and positive output i...
Definition: Configs.hpp:1245
int ReverseLimitRemoteSensorID
Device ID of the device if using remote limit switch features.
Definition: Configs.hpp:1261
Configs that affect the magnet sensor and how to interpret it.
Definition: Configs.hpp:46
std::string Serialize() const override
Definition: Configs.hpp:87
signals::AbsoluteSensorRangeValue AbsoluteSensorRange
The range of the absolute sensor, either [0, 1) or [-0.5, 0.5).
Definition: Configs.hpp:71
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:97
double MagnetOffset
This offset is added to the reported position, allowing the application to trim the zero position.
Definition: Configs.hpp:65
std::string ToString() const override
Definition: Configs.hpp:75
signals::SensorDirectionValue SensorDirection
Direction of the sensor to determine positive facing the LED side of the CANcoder.
Definition: Configs.hpp:53
Configs for Motion Magic®.
Definition: Configs.hpp:1488
double MotionMagicCruiseVelocity
This is the maximum velocity Motion Magic® based control modes are allowed to use.
Definition: Configs.hpp:1499
std::string Serialize() const override
Definition: Configs.hpp:1537
double MotionMagicJerk
This is the target jerk (acceleration derivative) Motion Magic® based control modes are allowed to us...
Definition: Configs.hpp:1521
double MotionMagicAcceleration
This is the target acceleration Motion Magic® based control modes are allowed to use.
Definition: Configs.hpp:1509
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:1547
std::string ToString() const override
Definition: Configs.hpp:1525
Configs that directly affect motor-output.
Definition: Configs.hpp:332
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:403
double PeakForwardDutyCycle
Maximum (forward) output during duty cycle based control modes.
Definition: Configs.hpp:363
double DutyCycleNeutralDeadband
Configures the output deadband percentage.
Definition: Configs.hpp:353
signals::NeutralModeValue NeutralMode
The state of the motor controller bridge when output is neutral or disabled.
Definition: Configs.hpp:344
double PeakReverseDutyCycle
Minimum (reverse) output during duty cycle based control modes.
Definition: Configs.hpp:373
std::string ToString() const override
Definition: Configs.hpp:377
signals::InvertedValue Inverted
Invert state of the device.
Definition: Configs.hpp:338
std::string Serialize() const override
Definition: Configs.hpp:391
Configs for Pigeon 2's Mount Pose configuration.
Definition: Configs.hpp:117
double MountPoseYaw
The mounting calibration yaw-component.
Definition: Configs.hpp:127
double MountPosePitch
The mounting calibration pitch-component.
Definition: Configs.hpp:136
std::string ToString() const override
Definition: Configs.hpp:149
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:171
double MountPoseRoll
The mounting calibration roll-component.
Definition: Configs.hpp:145
std::string Serialize() const override
Definition: Configs.hpp:161
Configs that affect the open-loop control of this motor controller.
Definition: Configs.hpp:1014
std::string Serialize() const override
Definition: Configs.hpp:1061
double DutyCycleOpenLoopRampPeriod
If non-zero, this determines how much time to ramp from 0% output to 100% during open-loop modes.
Definition: Configs.hpp:1025
std::string ToString() const override
Definition: Configs.hpp:1049
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:1071
double VoltageOpenLoopRampPeriod
If non-zero, this determines how much time to ramp from 0V output to 12V during open-loop modes.
Definition: Configs.hpp:1035
double TorqueOpenLoopRampPeriod
If non-zero, this determines how much time to ramp from 0A output to 300A during open-loop modes.
Definition: Configs.hpp:1045
Definition: Configs.hpp:27
friend std::ostream & operator<<(std::ostream &str, const ParentConfiguration &v)
Definition: Configs.hpp:30
virtual ctre::phoenix::StatusCode Deserialize(const std::string &string)=0
virtual std::string ToString() const =0
Configs to enable/disable various features of the Pigeon2.
Definition: Configs.hpp:266
bool DisableTemperatureCompensation
Disables using the temperature compensation feature.
Definition: Configs.hpp:282
std::string ToString() const override
Definition: Configs.hpp:292
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:314
std::string Serialize() const override
Definition: Configs.hpp:304
bool DisableNoMotionCalibration
Disables using the no-motion calibration feature.
Definition: Configs.hpp:288
bool EnableCompass
Turns on or off the magnetometer fusing for 9-axis.
Definition: Configs.hpp:276
Gains for the specified slot.
Definition: Configs.hpp:1680
static Slot0Configs From(const SlotConfigs &value)
std::string ToString() const override
Definition: Configs.hpp:1815
signals::GravityTypeValue GravityType
Gravity Feedforward Type.
Definition: Configs.hpp:1811
double kD
Derivative Gain.
Definition: Configs.hpp:1734
double kG
Gravity Feedforward Gain.
Definition: Configs.hpp:1794
double kV
Velocity Feedforward Gain.
Definition: Configs.hpp:1764
double kI
Integral Gain.
Definition: Configs.hpp:1715
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:1847
double kA
Acceleration Feedforward Gain.
Definition: Configs.hpp:1780
double kP
Proportional Gain.
Definition: Configs.hpp:1697
std::string Serialize() const override
Definition: Configs.hpp:1832
double kS
Static Feedforward Gain.
Definition: Configs.hpp:1748
Gains for the specified slot.
Definition: Configs.hpp:1871
std::string Serialize() const override
Definition: Configs.hpp:2022
static Slot1Configs From(const SlotConfigs &value)
double kD
Derivative Gain.
Definition: Configs.hpp:1925
double kI
Integral Gain.
Definition: Configs.hpp:1906
double kS
Static Feedforward Gain.
Definition: Configs.hpp:1939
double kA
Acceleration Feedforward Gain.
Definition: Configs.hpp:1971
double kG
Gravity Feedforward Gain.
Definition: Configs.hpp:1985
std::string ToString() const override
Definition: Configs.hpp:2005
double kP
Proportional Gain.
Definition: Configs.hpp:1888
signals::GravityTypeValue GravityType
Gravity Feedforward Type.
Definition: Configs.hpp:2001
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:2037
double kV
Velocity Feedforward Gain.
Definition: Configs.hpp:1955
Gains for the specified slot.
Definition: Configs.hpp:2061
double kV
Velocity Feedforward Gain.
Definition: Configs.hpp:2145
std::string Serialize() const override
Definition: Configs.hpp:2212
signals::GravityTypeValue GravityType
Gravity Feedforward Type.
Definition: Configs.hpp:2191
double kP
Proportional Gain.
Definition: Configs.hpp:2078
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:2227
double kI
Integral Gain.
Definition: Configs.hpp:2096
double kA
Acceleration Feedforward Gain.
Definition: Configs.hpp:2161
double kG
Gravity Feedforward Gain.
Definition: Configs.hpp:2175
double kS
Static Feedforward Gain.
Definition: Configs.hpp:2129
static Slot2Configs From(const SlotConfigs &value)
std::string ToString() const override
Definition: Configs.hpp:2195
double kD
Derivative Gain.
Definition: Configs.hpp:2115
Gains for the specified slot.
Definition: Configs.hpp:2250
static SlotConfigs From(const Slot2Configs &value)
std::string ToString() const
Definition: Configs.hpp:2441
double kP
Proportional Gain.
Definition: Configs.hpp:2315
static SlotConfigs From(const Slot1Configs &value)
double kG
Gravity Feedforward Gain.
Definition: Configs.hpp:2412
double kI
Integral Gain.
Definition: Configs.hpp:2333
double kA
Acceleration Feedforward Gain.
Definition: Configs.hpp:2398
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize)
Definition: Configs.hpp:2474
double kD
Derivative Gain.
Definition: Configs.hpp:2352
int SlotNumber
Chooses which slot these configs are for.
Definition: Configs.hpp:2435
double kV
Velocity Feedforward Gain.
Definition: Configs.hpp:2382
std::string Serialize() const
Definition: Configs.hpp:2458
static SlotConfigs From(const Slot0Configs &value)
signals::GravityTypeValue GravityType
Gravity Feedforward Type.
Definition: Configs.hpp:2429
double kS
Static Feedforward Gain.
Definition: Configs.hpp:2366
Configs that affect how software-limit switches behave.
Definition: Configs.hpp:1406
double ForwardSoftLimitThreshold
Position threshold for forward soft limit features.
Definition: Configs.hpp:1431
std::string ToString() const override
Definition: Configs.hpp:1445
double ReverseSoftLimitThreshold
Position threshold for reverse soft limit features.
Definition: Configs.hpp:1441
std::string Serialize() const override
Definition: Configs.hpp:1458
bool ReverseSoftLimitEnable
If enabled, the motor output is set to neutral if position exceeds ReverseSoftLimitThreshold and reve...
Definition: Configs.hpp:1421
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:1469
bool ForwardSoftLimitEnable
If enabled, the motor output is set to neutral if position exceeds ForwardSoftLimitThreshold and forw...
Definition: Configs.hpp:1414
Configs to control the maximum and minimum applied torque when using Torque Current control types.
Definition: Configs.hpp:617
std::string ToString() const override
Definition: Configs.hpp:652
double TorqueNeutralDeadband
Configures the output deadband during torque current based control modes.
Definition: Configs.hpp:648
double PeakForwardTorqueCurrent
Maximum (forward) output during torque current based control modes.
Definition: Configs.hpp:628
std::string Serialize() const override
Definition: Configs.hpp:664
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:674
double PeakReverseTorqueCurrent
Minimum (reverse) output during torque current based control modes.
Definition: Configs.hpp:638
Voltage-specific configs.
Definition: Configs.hpp:538
ctre::phoenix::StatusCode Deserialize(const std::string &to_deserialize) override
Definition: Configs.hpp:597
double PeakReverseVoltage
Minimum (reverse) output during voltage based control modes.
Definition: Configs.hpp:571
std::string Serialize() const override
Definition: Configs.hpp:587
std::string ToString() const override
Definition: Configs.hpp:575
double PeakForwardVoltage
Maximum (forward) output during voltage based control modes.
Definition: Configs.hpp:562
double SupplyVoltageTimeConstant
The time constant (in seconds) of the low-pass filter for the supply voltage.
Definition: Configs.hpp:553
Class for CANcoder, a CAN based magnetic encoder that provides absolute and relative position along w...
Definition: CoreCANcoder.hpp:476
The range of the absolute sensor, either [0, 1) or [-0.5, 0.5).
Definition: SpnEnums.hpp:682
static constexpr int Unsigned_0To1
Definition: SpnEnums.hpp:686
int value
Definition: SpnEnums.hpp:684
Choose what sensor source is used for differential control of a mechanism.
Definition: SpnEnums.hpp:2061
static constexpr int Disabled
Definition: SpnEnums.hpp:2065
int value
Definition: SpnEnums.hpp:2063
Choose what sensor source is reported via API and used by closed-loop and limit features.
Definition: SpnEnums.hpp:1551
int value
Definition: SpnEnums.hpp:1553
static constexpr int RotorSensor
Definition: SpnEnums.hpp:1555
Determines where to poll the forward limit switch.
Definition: SpnEnums.hpp:1692
static constexpr int LimitSwitchPin
Definition: SpnEnums.hpp:1696
int value
Definition: SpnEnums.hpp:1694
Determines if limit is normally-open (default) or normally-closed.
Definition: SpnEnums.hpp:1626
static constexpr int NormallyOpen
Definition: SpnEnums.hpp:1630
int value
Definition: SpnEnums.hpp:1628
Gravity Feedforward Type.
Definition: SpnEnums.hpp:1325
static constexpr int Elevator_Static
Definition: SpnEnums.hpp:1329
int value
Definition: SpnEnums.hpp:1327
Invert state of the device.
Definition: SpnEnums.hpp:1390
static constexpr int CounterClockwise_Positive
Definition: SpnEnums.hpp:1394
int value
Definition: SpnEnums.hpp:1392
The state of the motor controller bridge when output is neutral or disabled.
Definition: SpnEnums.hpp:1456
int value
Definition: SpnEnums.hpp:1458
static constexpr int Coast
Definition: SpnEnums.hpp:1460
Determines where to poll the reverse limit switch.
Definition: SpnEnums.hpp:1825
int value
Definition: SpnEnums.hpp:1827
static constexpr int LimitSwitchPin
Definition: SpnEnums.hpp:1829
Determines if limit is normally-open (default) or normally-closed.
Definition: SpnEnums.hpp:1759
static constexpr int NormallyOpen
Definition: SpnEnums.hpp:1763
int value
Definition: SpnEnums.hpp:1761
Direction of the sensor to determine positive facing the LED side of the CANcoder.
Definition: SpnEnums.hpp:179
static constexpr int CounterClockwise_Positive
Definition: SpnEnums.hpp:183
int value
Definition: SpnEnums.hpp:181
Definition: ManualEvent.hpp:12