Class IndexerIOSpark

java.lang.Object
frc.robot.subsystems.indexer.IndexerIOSpark
All Implemented Interfaces:
IndexerIO

public class IndexerIOSpark extends Object implements 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.

  • Constructor Details

    • IndexerIOSpark

      public IndexerIOSpark()
      Creates a new IndexerIOSpark and configures the Spark Max.
  • Method Details

    • updateInputs

      public void updateInputs(IndexerIO.IndexerIOInputs inputs)
      Updates hardware inputs and monitors connectivity.
      Specified by:
      updateInputs in interface IndexerIO
      Parameters:
      inputs - The inputs object to update.
    • setVoltage

      public void setVoltage(Voltage voltage)
      Sets the indexer motor voltage.
      Specified by:
      setVoltage in interface IndexerIO
      Parameters:
      voltage - The requested voltage to apply.
    • clearFaults

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