56template <std::derived_from<configs::ParentConfiguration> MotorConfigsT>
176 this->CANBusName = newCANBusName;
191 this->LeaderId = newLeaderId;
206 this->FollowerId = newFollowerId;
221 this->Alignment = newAlignment;
242 this->SensorToDifferentialRatio = newSensorToDifferentialRatio;
259 this->ClosedLoopRate = newClosedLoopRate;
283 this->LeaderInitialConfigs = newLeaderInitialConfigs;
318 this->FollowerInitialConfigs = newFollowerInitialConfigs;
334 this->FollowerUsesCommonLeaderConfigs = newFollowerUsesCommonLeaderConfigs;
DifferentialPigeon2Source
Sensor sources for a differential Pigeon 2.
Definition DifferentialConstants.hpp:19
@ Roll
Use the roll component of the Pigeon 2.
@ Pitch
Use the pitch component of the Pigeon 2.
@ Yaw
Use the yaw component of the Pigeon 2.
DifferentialCANdiSource
Sensor sources for a differential CTR Electronics' CANdi™ branded device.
Definition DifferentialConstants.hpp:38
@ PWM1
Use a pulse-width encoder remotely attached to the Sensor Input 1 (S1IN).
@ Quadrature
Use a quadrature encoder remotely attached to the two Sensor Inputs.
@ PWM2
Use a pulse-width encoder remotely attached to the Sensor Input 2 (S2IN).
Definition motor_constants.h:14
All constants for setting up the motors of a differential mechanism.
Definition DifferentialConstants.hpp:57
int FollowerId
CAN ID of the follower motor in the differential mechanism.
Definition DifferentialConstants.hpp:85
units::dimensionless::scalar_t SensorToDifferentialRatio
The ratio of sensor rotations to the differential mechanism's difference output, where a ratio greate...
Definition DifferentialConstants.hpp:101
bool FollowerUsesCommonLeaderConfigs
Whether the follower should overwrite some of its initial configs with common configs from the Leader...
Definition DifferentialConstants.hpp:153
signals::MotorAlignmentValue Alignment
The alignment of the differential leader and follower motors, ignoring the configured inverts.
Definition DifferentialConstants.hpp:90
units::frequency::hertz_t ClosedLoopRate
The update rate of the closed-loop controllers.
Definition DifferentialConstants.hpp:108
constexpr DifferentialMotorConstants< MotorConfigsT > & WithFollowerInitialConfigs(const MotorConfigsT &newFollowerInitialConfigs)
Modifies the FollowerInitialConfigs parameter and returns itself.
Definition DifferentialConstants.hpp:316
MotorConfigsT FollowerInitialConfigs
The initial configs used to configure the differential follower.
Definition DifferentialConstants.hpp:147
constexpr DifferentialMotorConstants< MotorConfigsT > & WithSensorToDifferentialRatio(units::dimensionless::scalar_t newSensorToDifferentialRatio)
Modifies the SensorToDifferentialRatio parameter and returns itself.
Definition DifferentialConstants.hpp:240
std::string_view CANBusName
Name of the CAN bus the mechanism is on.
Definition DifferentialConstants.hpp:74
constexpr DifferentialMotorConstants< MotorConfigsT > & WithClosedLoopRate(units::frequency::hertz_t newClosedLoopRate)
Modifies the ClosedLoopRate parameter and returns itself.
Definition DifferentialConstants.hpp:257
constexpr DifferentialMotorConstants< MotorConfigsT > & WithLeaderInitialConfigs(const MotorConfigsT &newLeaderInitialConfigs)
Modifies the LeaderInitialConfigs parameter and returns itself.
Definition DifferentialConstants.hpp:281
constexpr DifferentialMotorConstants< MotorConfigsT > & WithLeaderId(int newLeaderId)
Modifies the LeaderId parameter and returns itself.
Definition DifferentialConstants.hpp:189
constexpr DifferentialMotorConstants()=default
constexpr DifferentialMotorConstants< MotorConfigsT > & WithFollowerUsesCommonLeaderConfigs(bool newFollowerUsesCommonLeaderConfigs)
Modifies the FollowerUsesCommonLeaderConfigs parameter and returns itself.
Definition DifferentialConstants.hpp:332
constexpr DifferentialMotorConstants< MotorConfigsT > & WithAlignment(signals::MotorAlignmentValue newAlignment)
Modifies the Alignment parameter and returns itself.
Definition DifferentialConstants.hpp:219
constexpr DifferentialMotorConstants< MotorConfigsT > & WithFollowerId(int newFollowerId)
Modifies the FollowerId parameter and returns itself.
Definition DifferentialConstants.hpp:204
constexpr DifferentialMotorConstants< MotorConfigsT > & WithCANBusName(std::string_view newCANBusName)
Modifies the CANBusName parameter and returns itself.
Definition DifferentialConstants.hpp:174
int LeaderId
CAN ID of the leader motor in the differential mechanism.
Definition DifferentialConstants.hpp:79
MotorConfigsT LeaderInitialConfigs
The initial configs used to configure the differential leader.
Definition DifferentialConstants.hpp:122
The relationship between two motors in a mechanism.
Definition SpnEnums.hpp:5130
static constexpr int Aligned
The two motor directions are aligned.
Definition SpnEnums.hpp:5137