Package edu.wpi.first.wpilibj.simulation
Class SharpIRSim
java.lang.Object
edu.wpi.first.wpilibj.simulation.SharpIRSim
Simulation class for Sharp IR sensors.
-
Constructor Summary
ConstructorDescriptionSharpIRSim
(int channel) Constructor.SharpIRSim
(SharpIR sharpIR) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setRangeCm
(double cm) Set the range in centimeters returned by the distance sensor.void
setRangeInches
(double inches) Set the range in inches returned by the distance sensor.
-
Constructor Details
-
SharpIRSim
Constructor.- Parameters:
sharpIR
- The real sensor to simulate
-
SharpIRSim
Constructor.- Parameters:
channel
- Analog channel for this sensor
-
-
Method Details
-
setRangeInches
Set the range in inches returned by the distance sensor.- Parameters:
inches
- range in inches of the target returned by the sensor
-
setRangeCm
Set the range in centimeters returned by the distance sensor.- Parameters:
cm
- range in centimeters of the target returned by the sensor
-