Class SharpIRSim

java.lang.Object
edu.wpi.first.wpilibj.simulation.SharpIRSim

public class SharpIRSim extends Object
Simulation class for Sharp IR sensors.
  • Constructor Details

    • SharpIRSim

      public SharpIRSim(SharpIR sharpIR)
      Constructor.
      Parameters:
      sharpIR - The real sensor to simulate
    • SharpIRSim

      public SharpIRSim(int channel)
      Constructor.
      Parameters:
      channel - Analog channel for this sensor
  • Method Details

    • setRangeInches

      public void setRangeInches(double inches)
      Set the range in inches returned by the distance sensor.
      Parameters:
      inches - range in inches of the target returned by the sensor
    • setRangeCm

      public void setRangeCm(double cm)
      Set the range in centimeters returned by the distance sensor.
      Parameters:
      cm - range in centimeters of the target returned by the sensor