Package com.inertia.promove
Class Config.CompassConfig
java.lang.Object
com.inertia.promove.Config.CompassConfig
- All Implemented Interfaces:
Config.AbstractConfig
,Config.LegacyConfig
- Enclosing class:
- Config
@Deprecated
public static class Config.CompassConfig
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.CompassGain
hardwareGain
Deprecated.Config.CompassRate
hardwareRate
Deprecated.Config.CompassType
hardwareType
Deprecated.long
mod
int
offsetX
int
offsetY
int
offsetZ
double
scaleX
double
scaleY
double
scaleZ
-
Constructor Summary
Constructors Constructor Description CompassConfig()
Deprecated.default constructor, setting the Mask -
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 compass values with to get it in gaussint
parse(byte[] in)
Deprecated.pare input byte array to relevant configuration and return length of encoded configvoid
set(Config.CompassRate rate, Config.CompassGain gain)
Deprecated.set hardware rate, gain and default type HCM5883L (ProMove-3D)void
set(Config.CompassRate rate, Config.CompassGain gain, Config.CompassType type)
Deprecated.set hardware rate, gain and typevoid
setCustomRangeFactor(Config.CompassType 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
-
hardwareRate
Deprecated. -
hardwareGain
Deprecated. -
hardwareType
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
-
CompassConfig
public CompassConfig()Deprecated.default constructor, setting the Mask
-
-
Method Details
-
set
Deprecated.set hardware rate, gain and default type HCM5883L (ProMove-3D)- Parameters:
rate
- hardware Rategain
- hardware Gain
-
set
Deprecated.set hardware rate, gain and type- Parameters:
rate
- hardware Rategain
- hardware Gaintype
- hardware type (0=HMC5843, 1=HMC5883L)
-
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 compass values with to get it in gauss- 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
-