Package edu.wpi.first.wpilibj.xrp
Class XRPRangefinder
java.lang.Object
edu.wpi.first.wpilibj.xrp.XRPRangefinder
This class represents the ultrasonic rangefinder on an XRP robot.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the measured distance in inches.double
Get the measured distance in meters.
-
Constructor Details
-
XRPRangefinder
public XRPRangefinder()Constructs an XRPRangefinder.Only one instance of a XRPRangefinder is supported.
-
-
Method Details
-
getDistanceMeters
Get the measured distance in meters. Distance further than 4m will be reported as 4m.- Returns:
- distance in meters
-
getDistanceInches
Get the measured distance in inches.- Returns:
- distance in inches
-