Package com.inertia.promove
Class Config.AccelConfig
java.lang.Object
com.inertia.promove.Config.AccelConfig
- All Implemented Interfaces:
Config.AbstractConfig
,Config.LegacyConfig
- Direct Known Subclasses:
Config.AccelConfigExt
- Enclosing class:
- Config
@Deprecated
public static class Config.AccelConfig
extends java.lang.Object
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description boolean
adoptMod
boolean
adoptOffset
boolean
adoptScale
boolean
enableLogging
boolean
enableSampling
boolean
enableTransmit
Config.AccelRate1
hardwareRate1
Deprecated.Config.AccelRate2
hardwareRate2
Deprecated.boolean
hardwareScale1
Deprecated.Config.AccelRange2
hardwareScale2
Deprecated.Config.AccelType
hardwareType
Deprecated.long
mod
int
offsetX
int
offsetY
int
offsetZ
double
scaleX
double
scaleY
double
scaleZ
-
Constructor Summary
Constructors Constructor Description AccelConfig()
Deprecated.default constructor, setting the Mask and rangeFactors -
Method Summary
Modifier and Type Method Description int
getBytes(byte[] out)
Deprecated.encode current configuration in a byte arrayConfig.Mask
getMask()
get maskdouble
getRangeFactor()
Deprecated.get the value to multiply raw values with to get acceleration in m/s^2int
parse(byte[] in)
Deprecated.pare input byte array to relevant configuration and return length of encoded configvoid
set(Config.AccelRate1 _hardwareRate, boolean _fullScale)
Deprecated.set hardware rate and scale for type 1 accelerometervoid
set(Config.AccelRate2 _hardwareRate, Config.AccelRange2 _hardwareScale)
Deprecated.set hardware rate and scale for type 2 accelerometervoid
setCustomRangeFactor(Config.AccelType type, double[] factors)
Deprecated.void
setMod(long _mod)
set modulus for sampling (i.e.void
setOffset(int _offsetX, int _offsetY, int _offsetZ)
set offset in all directionsvoid
setSampling(boolean _enableSampling, boolean _enableTransmit, boolean _enableLogging)
set sampling related booleansvoid
setScale(double _scaleX, double _scaleY, double _scaleZ)
set scale in all directionsjava.lang.String
toString()
Deprecated.create a string representation of the configuration
-
Field Details
-
hardwareRate1
Deprecated. -
hardwareRate2
Deprecated. -
hardwareType
Deprecated. -
hardwareScale1
public boolean hardwareScale1Deprecated. -
hardwareScale2
Deprecated. -
adoptOffset
public boolean adoptOffset -
adoptScale
public boolean adoptScale -
scaleX
public double scaleX -
scaleY
public double scaleY -
scaleZ
public double scaleZ -
offsetX
public int offsetX -
offsetY
public int offsetY -
offsetZ
public int offsetZ -
enableSampling
public boolean enableSampling -
enableTransmit
public boolean enableTransmit -
enableLogging
public boolean enableLogging -
adoptMod
public boolean adoptMod -
mod
public long mod
-
-
Constructor Details
-
AccelConfig
public AccelConfig()Deprecated.default constructor, setting the Mask and rangeFactors
-
-
Method Details
-
set
Deprecated.set hardware rate and scale for type 1 accelerometer- Parameters:
_hardwareRate
- internal sampling rate_fullScale
- true for 6G, false for 2G
-
set
Deprecated.set hardware rate and scale for type 2 accelerometer- Parameters:
_hardwareRate
- internal sampling rate_hardwareScale
- type2 scale
-
parse
Deprecated.Description copied from interface:Config.AbstractConfig
pare input byte array to relevant configuration and return length of encoded config- Specified by:
parse
in interfaceConfig.AbstractConfig
- Parameters:
in
- input byte array- Returns:
- length of encoded config
- Throws:
InertiaException
- upon error such as when length is insufficient
-
getBytes
public int getBytes(byte[] out)Deprecated.Description copied from interface:Config.AbstractConfig
encode current configuration in a byte array- Specified by:
getBytes
in interfaceConfig.AbstractConfig
- Parameters:
out
- byte array for encoded configuration- Returns:
- length of encoded configuration
-
toString
public java.lang.String toString()Deprecated.Description copied from interface:Config.AbstractConfig
create a string representation of the configuration- Specified by:
toString
in interfaceConfig.AbstractConfig
- Returns:
- string representation of configuration
-
getRangeFactor
public double getRangeFactor()Deprecated.get the value to multiply raw values with to get acceleration in m/s^2- Returns:
- range factor
-
setCustomRangeFactor
Deprecated. -
setScale
public void setScale(double _scaleX, double _scaleY, double _scaleZ)set scale in all directions- Parameters:
_scaleX
- the scale factor to apply for X_scaleY
- the scale factor to apply for Y_scaleZ
- the scale factor to apply for Z
-
setOffset
public void setOffset(int _offsetX, int _offsetY, int _offsetZ)set offset in all directions- Parameters:
_offsetX
- the offset to apply for X_offsetY
- the offset to apply for Y_offsetZ
- the offset to apply for Z
-
setSampling
public void setSampling(boolean _enableSampling, boolean _enableTransmit, boolean _enableLogging)set sampling related booleans- Parameters:
_enableSampling
- enable sampling?_enableTransmit
- enable transmission?_enableLogging
- enable logging?
-
setMod
public void setMod(long _mod)set modulus for sampling (i.e. divider of global sampling frequency)- Parameters:
_mod
- the modulus
-
getMask
Description copied from interface:Config.AbstractConfig
get mask- Specified by:
getMask
in interfaceConfig.AbstractConfig
- Returns:
- mask for this config
-