Class SparkMaxSim

java.lang.Object
com.revrobotics.spark.SparkSim
com.revrobotics.sim.SparkMaxSim

public class SparkMaxSim extends SparkSim
  • Constructor Details

    • SparkMaxSim

      public SparkMaxSim(SparkMax sparkMax, DCMotor motor)
      Create a simulated CAN Spark MAX object. This class simulates some of the internal behavior of the device. This class is not required to display to the sim GUI, but is required to interact with it or inject physics simulation.

      See SparkSim.iterate(double, double, double) for more information on physics simulation.

      Parameters:
      sparkMax - The Spark to simulate
      motor - The WPILib DCMotor class object to use for calculations. If multiple motors are connected to the same gearbox and follow each other, a single DCMotor and CANSparkSim can be used to represent all of them.
  • Method Details