public class USSensor extends Object
| Modifier and Type | Field and Description |
|---|---|
static float |
FIELD_BOUNDS |
private Object |
mutex |
private float[] |
usData |
private SensorModes |
usSensor |
private SampleProvider |
usValue |
| Constructor and Description |
|---|
USSensor(Port usPort)
USSensor Constructor
|
| Modifier and Type | Method and Description |
|---|---|
float |
getFilteredDataBasic()
Returns distance measured by the sensor with an upper limit
|
float |
getMedianSample(int samples)
Takes multiple samples and returns the median
|
private SensorModes usSensor
private float[] usData
private SampleProvider usValue
public static final float FIELD_BOUNDS
private Object mutex
public USSensor(Port usPort)
usPort - port the sensor is connected topublic float getFilteredDataBasic()
public float getMedianSample(int samples)
samples - number of samples to takegetFilteredDataBasic()