Package frc.spectrumLib.mechanism
Class Mechanism.FollowerConfig
java.lang.Object
frc.spectrumLib.mechanism.Mechanism.FollowerConfig
- Enclosing class:
- Mechanism
Configuration for a TalonFX follower motor that mirrors the leader.
A follower automatically copies the leader's output. Set opposeLeader to MotorAlignmentValue.Opposed when the physical motor is mounted in the opposite direction and
must spin in reverse to produce the same mechanism motion.
-
Constructor Summary
ConstructorsConstructorDescriptionFollowerConfig(String name, int id, String canbus, MotorAlignmentValue opposeLeader) Creates a follower motor configuration. -
Method Summary
-
Constructor Details
-
FollowerConfig
Creates a follower motor configuration.- Parameters:
name- human-readable name for this followerid- CAN device IDcanbus- CAN bus name (e.g.,"rio"or"canivore")opposeLeader- alignment relative to the leader motor
-
-
Method Details
-
getName
Human-readable name for this follower motor (used in alerts and logging). -
getId
CAN bus device ID and bus name for this follower motor. -
isAttached
public boolean isAttached()Whether hardware is attached for this follower. -
getOpposeLeader
Alignment of the follower relative to the leader. UseMotorAlignmentValue.Opposedwhen the follower is physically mounted in the opposite direction.
-