Class SpinnerIOSpark

java.lang.Object
frc.robot.subsystems.intake.spinner.SpinnerIOSpark
All Implemented Interfaces:
SpinnerIO

public class SpinnerIOSpark extends Object implements SpinnerIO
Real IO implementation for the intake using REV SparkMax controllers.

This implementation configures the arm motor for position closed-loop control using motion profiling and the spinner motor for velocity control. It optimizes CAN bus traffic by setting specific update frequencies for status signals.

  • Constructor Details

    • SpinnerIOSpark

      public SpinnerIOSpark()
      Creates a new SpinnerIOSpark and configures the SparkMax controllers.
  • Method Details

    • updateInputs

      public void updateInputs(SpinnerIO.SpinnerIOInputs inputs)
      Description copied from interface: SpinnerIO
      Updates the set of loggable inputs with the latest data from the intake hardware.
      Specified by:
      updateInputs in interface SpinnerIO
      Parameters:
      inputs - The inputs object to update.
    • setVoltage

      public void setVoltage(Voltage voltage)
      Description copied from interface: SpinnerIO
      Commands the spinner motor to run at a specific voltage.
      Specified by:
      setVoltage in interface SpinnerIO
      Parameters:
      voltage - The target voltage for the spinner rollers.
    • clearFaults

      public void clearFaults()
      Description copied from interface: SpinnerIO
      Clears all faults and warnings.
      Specified by:
      clearFaults in interface SpinnerIO