13#include <unordered_map>
36 int StaticFeedforwardSignSpn;
37 int GravityArmPositionOffsetSpn;
38 int GainSchedBehaviorSpn;
41 static std::unordered_map<int, SlotSpns>
const genericMap;
61 units::dimensionless::scalar_t
kP = 0;
79 units::dimensionless::scalar_t
kI = 0;
98 units::dimensionless::scalar_t
kD = 0;
120 units::dimensionless::scalar_t
kS = 0;
136 units::dimensionless::scalar_t
kV = 0;
153 units::dimensionless::scalar_t
kA = 0;
170 units::dimensionless::scalar_t
kG = 0;
259 kP = std::move(newKP);
288 kI = std::move(newKI);
318 kD = std::move(newKD);
351 kS = std::move(newKS);
378 kV = std::move(newKV);
406 kA = std::move(newKA);
434 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
Gains for the specified slot.
Definition SlotConfigs.hpp:26
constexpr SlotConfigs & WithGravityType(signals::GravityTypeValue newGravityType)
Modifies this configuration's GravityType parameter and returns itself for method-chaining and easier...
Definition SlotConfigs.hpp:462
units::dimensionless::scalar_t kI
Integral gain.
Definition SlotConfigs.hpp:79
static SlotConfigs From(Slot1Configs const &value)
Converts the provided value to an instance of this type.
constexpr SlotConfigs & WithKS(units::dimensionless::scalar_t newKS)
Modifies this configuration's kS parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:349
constexpr SlotConfigs & WithStaticFeedforwardSign(signals::StaticFeedforwardSignValue newStaticFeedforwardSign)
Modifies this configuration's StaticFeedforwardSign parameter and returns itself for method-chaining ...
Definition SlotConfigs.hpp:491
units::angle::turn_t GravityArmPositionOffset
Gravity feedback position offset when using the Arm/Cosine gravity type.
Definition SlotConfigs.hpp:223
signals::GainSchedBehaviorValue GainSchedBehavior
The behavior of the gain scheduler on this slot.
Definition SlotConfigs.hpp:234
std::string ToString() const override
static SlotConfigs From(Slot2Configs const &value)
Converts the provided value to an instance of this type.
std::string Serialize() const final
constexpr SlotConfigs & WithKD(units::dimensionless::scalar_t newKD)
Modifies this configuration's kD parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:316
signals::StaticFeedforwardSignValue StaticFeedforwardSign
Static feedforward sign during position closed loop.
Definition SlotConfigs.hpp:207
units::dimensionless::scalar_t kV
Velocity feedforward gain.
Definition SlotConfigs.hpp:136
units::dimensionless::scalar_t kS
Static feedforward gain.
Definition SlotConfigs.hpp:120
constexpr SlotConfigs & WithKV(units::dimensionless::scalar_t newKV)
Modifies this configuration's kV parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:376
units::dimensionless::scalar_t kP
Proportional gain.
Definition SlotConfigs.hpp:61
constexpr SlotConfigs & WithGainSchedBehavior(signals::GainSchedBehaviorValue newGainSchedBehavior)
Modifies this configuration's GainSchedBehavior parameter and returns itself for method-chaining and ...
Definition SlotConfigs.hpp:540
constexpr SlotConfigs & WithGravityArmPositionOffset(units::angle::turn_t newGravityArmPositionOffset)
Modifies this configuration's GravityArmPositionOffset parameter and returns itself for method-chaini...
Definition SlotConfigs.hpp:518
constexpr SlotConfigs & WithKA(units::dimensionless::scalar_t newKA)
Modifies this configuration's kA parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:404
int SlotNumber
Chooses which slot these configs are for.
Definition SlotConfigs.hpp:550
units::dimensionless::scalar_t kD
Derivative gain.
Definition SlotConfigs.hpp:98
static SlotConfigs From(Slot0Configs const &value)
Converts the provided value to an instance of this type.
constexpr SlotConfigs & WithKP(units::dimensionless::scalar_t newKP)
Modifies this configuration's kP parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:257
units::dimensionless::scalar_t kA
Acceleration feedforward gain.
Definition SlotConfigs.hpp:153
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
constexpr SlotConfigs & WithKI(units::dimensionless::scalar_t newKI)
Modifies this configuration's kI parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:286
signals::GravityTypeValue GravityType
Gravity feedforward/feedback type.
Definition SlotConfigs.hpp:189
constexpr SlotConfigs & WithKG(units::dimensionless::scalar_t newKG)
Modifies this configuration's kG parameter and returns itself for method-chaining and easier to use c...
Definition SlotConfigs.hpp:432
constexpr SlotConfigs()=default
units::dimensionless::scalar_t kG
Gravity feedforward/feedback gain.
Definition SlotConfigs.hpp:170
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