Class IndexerIOSim

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

public class IndexerIOSim extends Object implements IndexerIO
Physics simulation implementation of IndexerIO.

This class uses SparkMaxSim to simulate the Spark MAX motor controller for the indexer, backed by a DCMotorSim physics model. Configuration mirrors IndexerIOSpark.

  • Constructor Details

    • IndexerIOSim

      public IndexerIOSim()
      Creates a new IndexerIOSim and initializes the simulated Spark MAX.
  • Method Details

    • updateInputs

      public void updateInputs(IndexerIO.IndexerIOInputs inputs)
      Updates the simulation state and updates loggable inputs.
      Specified by:
      updateInputs in interface IndexerIO
      Parameters:
      inputs - The inputs object to update with simulated data.
    • setVoltage

      public void setVoltage(Voltage voltage)
      Sets the voltage to be applied to the simulated motor.
      Specified by:
      setVoltage in interface IndexerIO
      Parameters:
      voltage - The voltage to apply.