Class Mechanism.FollowerConfig

java.lang.Object
frc.spectrumLib.mechanism.Mechanism.FollowerConfig
Enclosing class:
Mechanism

public static class Mechanism.FollowerConfig extends Object
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 Details

    • FollowerConfig

      public FollowerConfig(String name, int id, String canbus, MotorAlignmentValue opposeLeader)
      Creates a follower motor configuration.
      Parameters:
      name - human-readable name for this follower
      id - CAN device ID
      canbus - CAN bus name (e.g., "rio" or "canivore")
      opposeLeader - alignment relative to the leader motor
  • Method Details

    • getName

      public String getName()
      Human-readable name for this follower motor (used in alerts and logging).
    • getId

      public CanDeviceId getId()
      CAN bus device ID and bus name for this follower motor.
    • isAttached

      public boolean isAttached()
      Whether hardware is attached for this follower.
    • getOpposeLeader

      public MotorAlignmentValue getOpposeLeader()
      Alignment of the follower relative to the leader. Use MotorAlignmentValue.Opposed when the follower is physically mounted in the opposite direction.