public class DexterIMUSensor.DexterIMUAccelerationSensor extends I2CSensor implements SampleProvider, SensorMode
Modifier and Type | Field and Description |
---|---|
protected static int |
DATA_10BIT_REG |
protected static int |
DATA_8BIT_REG |
protected static int |
MODE_REG |
protected static float |
TOSI |
address, DEFAULT_I2C_ADDRESS, port, REG_PRODUCT_ID, REG_VENDOR_ID, REG_VERSION, retryCount
currentMode, modes
BLACK, BLANK_INDEX, BLUE, BLUE_INDEX, BROWN, GREEN, GREEN_INDEX, MAX_TYPE, MIN_TYPE, MODE_RAW, NXT_ADC_RES, RED, RED_INDEX, TYPE_ANGLE, TYPE_COLORBLUE, TYPE_COLORFULL, TYPE_COLORGREEN, TYPE_COLORNONE, TYPE_COLORRED, TYPE_CUSTOM, TYPE_HIGHSPEED, TYPE_HIGHSPEED_9V, TYPE_HISPEED, TYPE_LIGHT_ACTIVE, TYPE_LIGHT_INACTIVE, TYPE_LOWSPEED, TYPE_LOWSPEED_9V, TYPE_NO_SENSOR, TYPE_REFLECTION, TYPE_SOUND_DB, TYPE_SOUND_DBA, TYPE_SWITCH, TYPE_TEMPERATURE, WHITE, YELLOW
Modifier and Type | Method and Description |
---|---|
void |
fetchSample(float[] sample,
int offset)
Fetches a sample from a sensor or filter.
|
java.lang.String |
getName()
return a string description of this sensor mode
|
int |
sampleSize()
Returns the number of elements in a sample.
The number of elements does not change during runtime. |
fetchString, getAddress, getData, getData, getPort, getProductID, getRetryCount, getVendorID, getVersion, sendData, sendData, sendData, setAddress, setRetryCount
getAvailableModes, getCurrentMode, getMode, getMode, getModeCount, setCurrentMode, setCurrentMode, setModes
close, releaseOnClose
protected static final int DATA_10BIT_REG
protected static final int DATA_8BIT_REG
protected static final int MODE_REG
protected static final float TOSI
public int sampleSize()
SampleProvider
sampleSize
in interface SampleProvider
sampleSize
in class BaseSensor
public java.lang.String getName()
SensorMode
getName
in interface SensorMode
getName
in class BaseSensor
public void fetchSample(float[] sample, int offset)
SampleProvider
fetchSample
in interface SampleProvider
fetchSample
in class BaseSensor
sample
- The array to store the sample in.offset
- The elements of the sample are stored in the array starting at the offset position.