Package xbot.common.controls.sensors
Class XLidarLite
java.lang.Object
xbot.common.controls.sensors.XLidarLite
- All Implemented Interfaces:
DistanceSensor
- Direct Known Subclasses:
LidarLiteWpiAdapter
,MockLidarLite
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected byte[]
protected final int
protected final int
protected final int
-
Constructor Summary
ConstructorDescriptionXLidarLite
(I2C.Port port, PropertyFactory propMan, DevicePolice police, String prefix) -
Method Summary
Modifier and TypeMethodDescriptiondouble
double
pidGet()
void
setAveraging
(boolean shouldAverage) void
start()
void
stop()
protected abstract void
update()
-
Field Details
-
distance
protected byte[] distance -
lidar_address
protected final int lidar_address- See Also:
-
lidar_config_register
protected final int lidar_config_register- See Also:
-
lidar_distance_register
protected final int lidar_distance_register- See Also:
-
-
Constructor Details
-
XLidarLite
-
-
Method Details
-
update
protected abstract void update() -
getDistance
public double getDistance()- Specified by:
getDistance
in interfaceDistanceSensor
-
pidGet
public double pidGet() -
start
public void start() -
stop
public void stop() -
setAveraging
public void setAveraging(boolean shouldAverage) - Specified by:
setAveraging
in interfaceDistanceSensor
-