Package frc.robot.subsystems.indexer
Class IndexerIOSim
java.lang.Object
frc.robot.subsystems.indexer.IndexerIOSim
- All Implemented Interfaces:
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.robot.subsystems.indexer.IndexerIO
IndexerIO.IndexerIOInputs -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new IndexerIOSim and initializes the simulated Spark MAX. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetVoltage(Voltage voltage) Sets the voltage to be applied to the simulated motor.voidUpdates the simulation state and updates loggable inputs.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface frc.robot.subsystems.indexer.IndexerIO
clearFaults
-
Constructor Details
-
IndexerIOSim
public IndexerIOSim()Creates a new IndexerIOSim and initializes the simulated Spark MAX.
-
-
Method Details
-
updateInputs
Updates the simulation state and updates loggable inputs.- Specified by:
updateInputsin interfaceIndexerIO- Parameters:
inputs- The inputs object to update with simulated data.
-
setVoltage
Sets the voltage to be applied to the simulated motor.- Specified by:
setVoltagein interfaceIndexerIO- Parameters:
voltage- The voltage to apply.
-