Package frc.robot.subsystems.indexer
Class IndexerIOSpark
java.lang.Object
frc.robot.subsystems.indexer.IndexerIOSpark
- All Implemented Interfaces:
IndexerIO
Real IO implementation for the indexer subsystem using a Spark Max motor controller.
This implementation configures the Spark Max with specific current limits and idle modes, and monitors connectivity via a debouncer.
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.robot.subsystems.indexer.IndexerIO
IndexerIO.IndexerIOInputs -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears all faults and warnings.voidsetVoltage(Voltage voltage) Sets the indexer motor voltage.voidUpdates hardware inputs and monitors connectivity.
-
Constructor Details
-
IndexerIOSpark
public IndexerIOSpark()Creates a new IndexerIOSpark and configures the Spark Max.
-
-
Method Details
-
updateInputs
Updates hardware inputs and monitors connectivity.- Specified by:
updateInputsin interfaceIndexerIO- Parameters:
inputs- The inputs object to update.
-
setVoltage
Sets the indexer motor voltage.- Specified by:
setVoltagein interfaceIndexerIO- Parameters:
voltage- The requested voltage to apply.
-
clearFaults
public void clearFaults()Description copied from interface:IndexerIOClears all faults and warnings.- Specified by:
clearFaultsin interfaceIndexerIO
-