protected class MindsensorsAbsoluteIMU.ShortSensorMode extends java.lang.Object implements SensorMode
| Modifier and Type | Field and Description |
|---|---|
protected int |
baseReg |
protected byte[] |
buffer |
protected float[] |
convert |
protected java.lang.String |
name |
protected int |
sampleSize |
protected float[] |
scale |
| Modifier | Constructor and Description |
|---|---|
protected |
ShortSensorMode(java.lang.String name,
int reg,
int sampleSize,
float[] convert,
float scale)
Internal class to provide the sensor data.
|
protected |
ShortSensorMode(java.lang.String name,
int reg,
int sampleSize,
float convert,
float scale) |
| 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. |
protected void |
setScale(float scale)
Set the scale factor used when converting data to returned units.
|
protected final java.lang.String name
protected final int sampleSize
protected final float[] convert
protected final int baseReg
protected float[] scale
protected byte[] buffer
protected ShortSensorMode(java.lang.String name,
int reg,
int sampleSize,
float[] convert,
float scale)
name - mode namereg - base register for the available samplessampleSize - number of samplesconvert - conversion factor to SI unitsscale - scale factor needed for range adjustmentprotected ShortSensorMode(java.lang.String name,
int reg,
int sampleSize,
float convert,
float scale)
protected void setScale(float scale)
scale - new scale factorpublic int sampleSize()
SampleProvidersampleSize in interface SampleProviderpublic void fetchSample(float[] sample,
int offset)
SampleProviderfetchSample in interface SampleProvidersample - The array to store the sample in.offset - The elements of the sample are stored in the array starting at the offset position.public java.lang.String getName()
SensorModegetName in interface SensorMode