Package frclib.sensor
Class FrcCANTimeOfFlight
java.lang.Object
com.playingwithfusion.TimeOfFlight
frclib.sensor.FrcCANTimeOfFlight
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
,AutoCloseable
,TrcDistanceSensor
public class FrcCANTimeOfFlight
extends com.playingwithfusion.TimeOfFlight
implements TrcDistanceSensor
-
Nested Class Summary
Nested classes/interfaces inherited from class com.playingwithfusion.TimeOfFlight
com.playingwithfusion.TimeOfFlight.RangingMode, com.playingwithfusion.TimeOfFlight.Status
-
Constructor Summary
ConstructorsConstructorDescriptionFrcCANTimeOfFlight
(String instanceName, int sensorId) Create an instance of the CAN Time Of Flight sensor. -
Method Summary
Modifier and TypeMethodDescriptiondouble
This method returns the distance in inches.Methods inherited from class com.playingwithfusion.TimeOfFlight
close, getAmbientLightLevel, getFirmwareVersion, getRange, getRangeSigma, getRangingMode, getSampleTime, getSerialNumber, getStatus, identifySensor, initSendable, isRangeValid, pidGet, setRangeOfInterest, setRangingMode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface trclib.sensor.TrcDistanceSensor
getDistanceMeters, getDistanceMillimeters
-
Constructor Details
-
FrcCANTimeOfFlight
Create an instance of the CAN Time Of Flight sensor.This is designed to support the Playing With Fusion (PWF) SEN-36005 time of flight sensor
- Parameters:
instanceName
- The instance name of this sensor.sensorId
- The 6-bit identifier used to select a particular sensor on the CAN bus. This identifier may be set through the PWF Device configuration page on the roboRIO.
-
-
Method Details
-
getDistanceInches
public double getDistanceInches()This method returns the distance in inches.- Specified by:
getDistanceInches
in interfaceTrcDistanceSensor
- Returns:
- distance in inches.
-