Class SpectrumCANcoder

java.lang.Object
frc.spectrumLib.hardware.SpectrumCANcoder

public class SpectrumCANcoder extends Object
Wraps a CTRE CANcoder and applies Spectrum configuration. When the config says the encoder is attached, the constructor also points the supplied TalonFX's feedback at it.
  • Constructor Details

  • Method Details

    • isAttached

      public boolean isAttached()
    • modifyMotorConfig

      public SpectrumCANcoder modifyMotorConfig(TalonFX motor, Mechanism.Config mechConfig)
      Points the motor's feedback at this CANcoder using the configured source and ratios. Modifies mechConfig's stored TalonFX config in place, then applies it to the motor.
    • canCoderResponseOK

      public boolean canCoderResponseOK(StatusCode response)
      True when the configurator's response came back OK, and prints the failure to Telemetry when it did not.
    • getCanCoder

      public CANcoder getCanCoder()