13#include <unordered_map>
36 int StaticFeedforwardSignSpn;
37 int GravityArmPositionOffsetSpn;
38 int GainSchedBehaviorSpn;
41 static std::unordered_map<int, SlotSpns>
const genericMap;
61 wpi::units::scalar_t
kP = 0;
79 wpi::units::scalar_t
kI = 0;
98 wpi::units::scalar_t
kD = 0;
120 wpi::units::scalar_t
kS = 0;
136 wpi::units::scalar_t
kV = 0;
153 wpi::units::scalar_t
kA = 0;
170 wpi::units::scalar_t
kG = 0;
262 kP = std::move(newKP);
291 kI = std::move(newKI);
321 kD = std::move(newKD);
354 kS = std::move(newKS);
381 kV = std::move(newKV);
409 kA = std::move(newKA);
437 kG = std::move(newKG);
Definition Configuration.hpp:17
Gains for the specified slot.
Definition Slot0Configs.hpp:26
Gains for the specified slot.
Definition Slot1Configs.hpp:26
Gains for the specified slot.
Definition Slot2Configs.hpp:26
wpi::units::scalar_t kD
Derivative gain.
Definition SlotConfigs.hpp:98
constexpr SlotConfigs & WithGravityType(signals::GravityTypeValue newGravityType)
Modifies this configuration's GravityType parameter and returns itself for method-chaining and easier...
Definition SlotConfigs.hpp:466
wpi::units::scalar_t kG
Gravity feedforward/feedback gain.
Definition SlotConfigs.hpp:170
static SlotConfigs From(Slot1Configs const &value)
Converts the provided value to an instance of this type.
wpi::units::scalar_t kI
Integral gain.
Definition SlotConfigs.hpp:79
constexpr SlotConfigs & WithKV(wpi::units::scalar_t newKV)
Modifies this configuration's kV parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:379
wpi::units::scalar_t kA
Acceleration feedforward gain.
Definition SlotConfigs.hpp:153
wpi::units::turn_t GravityArmPositionOffset
Gravity feedback position offset when using the Arm/Cosine gravity type.
Definition SlotConfigs.hpp:225
constexpr SlotConfigs & WithStaticFeedforwardSign(signals::StaticFeedforwardSignValue newStaticFeedforwardSign)
Modifies this configuration's StaticFeedforwardSign parameter and returns itself for method-chaining ...
Definition SlotConfigs.hpp:496
constexpr SlotConfigs & WithKI(wpi::units::scalar_t newKI)
Modifies this configuration's kI parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:289
signals::GainSchedBehaviorValue GainSchedBehavior
The behavior of the gain scheduler on this slot.
Definition SlotConfigs.hpp:237
std::string ToString() const override
constexpr SlotConfigs & WithKS(wpi::units::scalar_t newKS)
Modifies this configuration's kS parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:352
static SlotConfigs From(Slot2Configs const &value)
Converts the provided value to an instance of this type.
std::string Serialize() const final
signals::StaticFeedforwardSignValue StaticFeedforwardSign
Static feedforward sign during position closed loop.
Definition SlotConfigs.hpp:209
constexpr SlotConfigs & WithGainSchedBehavior(signals::GainSchedBehaviorValue newGainSchedBehavior)
Modifies this configuration's GainSchedBehavior parameter and returns itself for method-chaining and ...
Definition SlotConfigs.hpp:546
int SlotNumber
Chooses which slot these configs are for.
Definition SlotConfigs.hpp:556
constexpr SlotConfigs & WithKD(wpi::units::scalar_t newKD)
Modifies this configuration's kD parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:319
constexpr SlotConfigs & WithKP(wpi::units::scalar_t newKP)
Modifies this configuration's kP parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:260
static SlotConfigs From(Slot0Configs const &value)
Converts the provided value to an instance of this type.
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
wpi::units::scalar_t kP
Proportional gain.
Definition SlotConfigs.hpp:61
signals::GravityTypeValue GravityType
Gravity feedforward/feedback type.
Definition SlotConfigs.hpp:190
constexpr SlotConfigs & WithKG(wpi::units::scalar_t newKG)
Modifies this configuration's kG parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:435
constexpr SlotConfigs()=default
wpi::units::scalar_t kS
Static feedforward gain.
Definition SlotConfigs.hpp:120
wpi::units::scalar_t kV
Velocity feedforward gain.
Definition SlotConfigs.hpp:136
constexpr SlotConfigs & WithKA(wpi::units::scalar_t newKA)
Modifies this configuration's kA parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:407
constexpr SlotConfigs & WithGravityArmPositionOffset(wpi::units::turn_t newGravityArmPositionOffset)
Modifies this configuration's GravityArmPositionOffset parameter and returns itself for method-chaini...
Definition SlotConfigs.hpp:523
Definition ExternalFeedbackConfigs.hpp:21
Definition ExternalFeedbackConfigs.hpp:16
Definition FrcUsageReport.hpp:12
Definition motor_constants.h:14
The behavior of the gain scheduler on this slot.
Definition SpnEnums.hpp:5059
static constexpr int Inactive
No gain scheduling will occur.
Definition SpnEnums.hpp:5065
Gravity feedforward/feedback type.
Definition SpnEnums.hpp:1488
static constexpr int Elevator_Static
The system's gravity feedforward is constant, such as an elevator.
Definition SpnEnums.hpp:1495
Static feedforward sign during position closed loop.
Definition SpnEnums.hpp:2475
static constexpr int UseVelocitySign
Use the velocity reference sign.
Definition SpnEnums.hpp:2483