public class ESenseConfig
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ESenseConfig.AccLPF
Accelerometer low pass filter configuration.
|
static class |
ESenseConfig.AccRange
Accelerometer full scale range in +-g
|
static class |
ESenseConfig.GyroLPF
Gyroscope low pass filter configuration.
|
static class |
ESenseConfig.GyroRange
Gyroscope full scale range in +-degrees/second
|
Constructor and Description |
---|
ESenseConfig()
Constructs a default configuration object
Acc range = +-4g
Gyro range = +-1000deg/s
Acc LPF = bandwith 5Hz
Gyro LPf = bandwith 5Hz
|
ESenseConfig(byte[] charaterictic_data)
Constructs a configuration object from the bytes read from the device
|
ESenseConfig(ESenseConfig.AccRange accRange,
ESenseConfig.GyroRange gyroRange,
ESenseConfig.AccLPF accLPF,
ESenseConfig.GyroLPF gyroLPF)
Constructs a configuration object with the specified ranges and low pass filter values
|
Modifier and Type | Method and Description |
---|---|
ESenseConfig.AccLPF |
getAccLPF() |
ESenseConfig.AccRange |
getAccRange() |
double |
getAccSensitivityFactor()
Get accelerometer sensitivity factor for the current configuration
|
ESenseConfig.GyroLPF |
getGyroLPF() |
ESenseConfig.GyroRange |
getGyroRange() |
double |
getGyroSensitivityFactor()
Get gyroscope sensitivity factor for the current configuration
|
static ESenseConfig.AccLPF |
parseAccLPF(byte[] data)
Extracts accelerometer low pass filter configuration from bytes read from the device
|
static ESenseConfig.AccRange |
parseAccRange(byte[] data)
Extracts accelerometer full scale range configuration from bytes read from the device
|
static ESenseConfig.GyroLPF |
parseGyroLPF(byte[] data)
Extracts gyroscope low pass filter configuration from bytes read from the device
|
static ESenseConfig.GyroRange |
parseGyroRange(byte[] data)
Extracts gyroscope full scale range configuration from bytes read from the device
|
byte[] |
prepareCharacteristicData()
Convert current configuration objects in bytes to write on the configuration characteristic of the device
|
void |
setAccLPF(ESenseConfig.AccLPF accLPF) |
void |
setAccRange(ESenseConfig.AccRange accRange) |
void |
setGyroLPF(ESenseConfig.GyroLPF gyroLPF) |
void |
setGyroRange(ESenseConfig.GyroRange gyroRange) |
public ESenseConfig(ESenseConfig.AccRange accRange, ESenseConfig.GyroRange gyroRange, ESenseConfig.AccLPF accLPF, ESenseConfig.GyroLPF gyroLPF)
accRange
- accelerometer rangegyroRange
- gyroscope rangeaccLPF
- accelerometer low pass filter configurationgyroLPF
- gyroscope low pass filter configurationpublic ESenseConfig(byte[] charaterictic_data)
charaterictic_data
- bytes read from the devicepublic ESenseConfig()
public static ESenseConfig.GyroLPF parseGyroLPF(byte[] data)
data
- bytes read from the devicepublic static ESenseConfig.AccLPF parseAccLPF(byte[] data)
data
- bytes read from the devicepublic static ESenseConfig.GyroRange parseGyroRange(byte[] data)
data
- bytes read from the devicepublic static ESenseConfig.AccRange parseAccRange(byte[] data)
data
- bytes read from the devicepublic byte[] prepareCharacteristicData()
public double getAccSensitivityFactor()
public double getGyroSensitivityFactor()
public ESenseConfig.GyroRange getGyroRange()
public void setGyroRange(ESenseConfig.GyroRange gyroRange)
public ESenseConfig.AccRange getAccRange()
public void setAccRange(ESenseConfig.AccRange accRange)
public ESenseConfig.GyroLPF getGyroLPF()
public void setGyroLPF(ESenseConfig.GyroLPF gyroLPF)
public ESenseConfig.AccLPF getAccLPF()
public void setAccLPF(ESenseConfig.AccLPF accLPF)