57template <std::derived_from<configs::ParentConfiguration> MotorConfigsT>
157 this->Network = newNetwork;
172 this->LeaderId = newLeaderId;
187 this->FollowerId = newFollowerId;
202 this->Alignment = newAlignment;
223 this->SensorToDifferentialRatio = newSensorToDifferentialRatio;
240 this->ClosedLoopRate = newClosedLoopRate;
264 this->LeaderInitialConfigs = newLeaderInitialConfigs;
299 this->FollowerInitialConfigs = newFollowerInitialConfigs;
315 this->FollowerUsesCommonLeaderConfigs = newFollowerUsesCommonLeaderConfigs;
Class for getting information about an available CAN bus.
Definition CANBus.hpp:142
Definition SimpleDifferentialMechanism.hpp:24
DifferentialPigeon2Source
Sensor sources for a differential Pigeon 2.
Definition DifferentialConstants.hpp:20
@ Roll
Use the roll component of the Pigeon 2.
Definition DifferentialConstants.hpp:32
@ Pitch
Use the pitch component of the Pigeon 2.
Definition DifferentialConstants.hpp:28
@ Yaw
Use the yaw component of the Pigeon 2.
Definition DifferentialConstants.hpp:24
DifferentialCANdiSource
Sensor sources for a differential CTR Electronics' CANdi™ branded device.
Definition DifferentialConstants.hpp:39
@ PWM1
Use a pulse-width encoder remotely attached to the Sensor Input 1 (S1IN).
Definition DifferentialConstants.hpp:43
@ Quadrature
Use a quadrature encoder remotely attached to the two Sensor Inputs.
Definition DifferentialConstants.hpp:51
@ PWM2
Use a pulse-width encoder remotely attached to the Sensor Input 2 (S2IN).
Definition DifferentialConstants.hpp:47
Definition ExternalFeedbackConfigs.hpp:16
Definition motor_constants.h:14
int FollowerId
CAN ID of the follower motor in the differential mechanism.
Definition DifferentialConstants.hpp:76
bool FollowerUsesCommonLeaderConfigs
Whether the follower should overwrite some of its initial configs with common configs from the Leader...
Definition DifferentialConstants.hpp:144
wpi::units::scalar_t SensorToDifferentialRatio
The ratio of sensor rotations to the differential mechanism's difference output, where a ratio greate...
Definition DifferentialConstants.hpp:92
signals::MotorAlignmentValue Alignment
The alignment of the differential leader and follower motors, ignoring the configured inverts.
Definition DifferentialConstants.hpp:81
constexpr DifferentialMotorConstants< MotorConfigsT > & WithClosedLoopRate(wpi::units::hertz_t newClosedLoopRate)
Modifies the ClosedLoopRate parameter and returns itself.
Definition DifferentialConstants.hpp:238
constexpr DifferentialMotorConstants< MotorConfigsT > & WithFollowerInitialConfigs(const MotorConfigsT &newFollowerInitialConfigs)
Modifies the FollowerInitialConfigs parameter and returns itself.
Definition DifferentialConstants.hpp:297
MotorConfigsT FollowerInitialConfigs
The initial configs used to configure the differential follower.
Definition DifferentialConstants.hpp:138
wpi::units::hertz_t ClosedLoopRate
The update rate of the closed-loop controllers.
Definition DifferentialConstants.hpp:99
constexpr DifferentialMotorConstants< MotorConfigsT > & WithLeaderInitialConfigs(const MotorConfigsT &newLeaderInitialConfigs)
Modifies the LeaderInitialConfigs parameter and returns itself.
Definition DifferentialConstants.hpp:262
constexpr DifferentialMotorConstants< MotorConfigsT > & WithLeaderId(int newLeaderId)
Modifies the LeaderId parameter and returns itself.
Definition DifferentialConstants.hpp:170
constexpr DifferentialMotorConstants()=default
constexpr DifferentialMotorConstants< MotorConfigsT > & WithSensorToDifferentialRatio(wpi::units::scalar_t newSensorToDifferentialRatio)
Modifies the SensorToDifferentialRatio parameter and returns itself.
Definition DifferentialConstants.hpp:221
constexpr DifferentialMotorConstants< MotorConfigsT > & WithNetwork(CANBus newNetwork)
Modifies the Network parameter and returns itself.
Definition DifferentialConstants.hpp:155
constexpr DifferentialMotorConstants< MotorConfigsT > & WithFollowerUsesCommonLeaderConfigs(bool newFollowerUsesCommonLeaderConfigs)
Modifies the FollowerUsesCommonLeaderConfigs parameter and returns itself.
Definition DifferentialConstants.hpp:313
constexpr DifferentialMotorConstants< MotorConfigsT > & WithAlignment(signals::MotorAlignmentValue newAlignment)
Modifies the Alignment parameter and returns itself.
Definition DifferentialConstants.hpp:200
constexpr DifferentialMotorConstants< MotorConfigsT > & WithFollowerId(int newFollowerId)
Modifies the FollowerId parameter and returns itself.
Definition DifferentialConstants.hpp:185
CANBus Network
The network the mechanism is on.
Definition DifferentialConstants.hpp:65
int LeaderId
CAN ID of the leader motor in the differential mechanism.
Definition DifferentialConstants.hpp:70
MotorConfigsT LeaderInitialConfigs
The initial configs used to configure the differential leader.
Definition DifferentialConstants.hpp:113
The relationship between two motors in a mechanism.
Definition SpnEnums.hpp:4888
static constexpr int Aligned
The two motor directions are aligned.
Definition SpnEnums.hpp:4896