Package trclib.archive
Class TrcLidarLite
java.lang.Object
trclib.archive.TrcLidarLite
This class implements the Lidar Lite v3 Laser Ranging sensor.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte
private static final byte
private static final byte
static final int
private final TrcSerialBusDevice
private final TrcSensor.SensorData<Double>
private final String
private final TrcEvent
private static final int
private static final int
private static final int
private boolean
private final TrcDbgTrace
-
Constructor Summary
ConstructorsConstructorDescriptionTrcLidarLite
(String instanceName, TrcSerialBusDevice device) Constructor: Creates an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the distance measurement data with bias correction.void
This method is called when the read request is completed.void
start()
This method starts the reading device data by queuing the initial read request if not already.private void
writeAcquisitionCommand
(byte command) This method writes an acquisition command to the device.
-
Field Details
-
DEF_I2C_ADDRESS_7BIT
public static final int DEF_I2C_ADDRESS_7BIT- See Also:
-
REG_ACQ_COMMAND
private static final int REG_ACQ_COMMAND- See Also:
-
REG_STATUS
private static final int REG_STATUS- See Also:
-
REG_FULL_DELAY_HIGH
private static final int REG_FULL_DELAY_HIGH- See Also:
-
ACQCMD_RESET
private static final byte ACQCMD_RESET- See Also:
-
ACQCMD_DISTANCE_NO_BIAS
private static final byte ACQCMD_DISTANCE_NO_BIAS- See Also:
-
ACQCMD_DISTANCE_WITH_BIAS
private static final byte ACQCMD_DISTANCE_WITH_BIAS- See Also:
-
tracer
-
instanceName
-
device
-
notifyEvent
-
started
private boolean started -
distance
-
-
Constructor Details
-
TrcLidarLite
Constructor: Creates an instance of the object.- Parameters:
instanceName
- specifies the instance name.device
- specifies the device object.
-
-
Method Details
-
start
public void start()This method starts the reading device data by queuing the initial read request if not already. -
writeAcquisitionCommand
private void writeAcquisitionCommand(byte command) This method writes an acquisition command to the device.- Parameters:
command
- specifies the acquisition command.
-
getDistance
This method returns the distance measurement data with bias correction.- Returns:
- distance measurement data in cm.
-
notify
This method is called when the read request is completed.- Parameters:
context
- specifies the read request.
-