Class SparkFlexSim

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

public class SparkFlexSim extends SparkSim
  • Constructor Details

    • SparkFlexSim

      public SparkFlexSim(SparkFlex sparkFlex, DCMotor motor)
      Create a simulated CAN Spark Flex 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:
      sparkFlex - 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