Class SpinnerIOSpark
java.lang.Object
frc.robot.subsystems.intake.spinner.SpinnerIOSpark
- All Implemented Interfaces:
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.robot.subsystems.intake.spinner.SpinnerIO
SpinnerIO.SpinnerIOInputs -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SpinnerIOSpark and configures the SparkMax controllers. -
Method Summary
Modifier and TypeMethodDescriptionvoidClears all faults and warnings.voidsetVoltage(Voltage voltage) Commands the spinner motor to run at a specific voltage.voidUpdates the set of loggable inputs with the latest data from the intake hardware.
-
Constructor Details
-
SpinnerIOSpark
public SpinnerIOSpark()Creates a new SpinnerIOSpark and configures the SparkMax controllers.
-
-
Method Details
-
updateInputs
Description copied from interface:SpinnerIOUpdates the set of loggable inputs with the latest data from the intake hardware.- Specified by:
updateInputsin interfaceSpinnerIO- Parameters:
inputs- The inputs object to update.
-
setVoltage
Description copied from interface:SpinnerIOCommands the spinner motor to run at a specific voltage.- Specified by:
setVoltagein interfaceSpinnerIO- Parameters:
voltage- The target voltage for the spinner rollers.
-
clearFaults
public void clearFaults()Description copied from interface:SpinnerIOClears all faults and warnings.- Specified by:
clearFaultsin interfaceSpinnerIO
-