Package com.inertia.promove
Class Config.ADCConfig
java.lang.Object
com.inertia.promove.Config.ADCConfig
- All Implemented Interfaces:
Config.AbstractConfig
,Config.LegacyConfig
- Enclosing class:
- Config
@Deprecated
public static class Config.ADCConfig
extends java.lang.Object
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description boolean
adoptMod
boolean
adoptOffset
Deprecated.boolean to set for offset and scale changesboolean
adoptScale
Deprecated.boolean
asGPIO1
Deprecated.set to true when digital value is to be used for channelboolean
asGPIO2
Deprecated.set to true when digital value is to be used for channelbyte
channelMapping
Deprecated.boolean
enableLogging
boolean
enableSampling
boolean
enableTransmit
long
mod
int
offset1
Deprecated.int
offset2
Deprecated.double
scale1
Deprecated.double
scale2
Deprecated. -
Method Summary
Modifier and Type Method Description int
getBytes(byte[] out)
Deprecated.encode current configuration in a byte arrayConfig.Mask
getMask()
get maskint
parse(byte[] in)
Deprecated.pare input byte array to relevant configuration and return length of encoded configvoid
set(byte _channelMapping)
Deprecated.set ADC channel mapping, each of the 8 bits selects different channels.void
setMod(long _mod)
set modulus for sampling (i.e.void
setOffset(int _offset1, int _offset2)
Deprecated.set offset in all directionsvoid
setSampling(boolean _enableSampling, boolean _enableTransmit, boolean _enableLogging)
set sampling related booleansvoid
setScale(double _scale1, double _scale2)
Deprecated.set scale in all directionsjava.lang.String
toString()
Deprecated.create a string representation of the configuration
-
Field Details
-
adoptOffset
public boolean adoptOffsetDeprecated.boolean to set for offset and scale changes -
adoptScale
public boolean adoptScaleDeprecated. -
asGPIO1
public boolean asGPIO1Deprecated.set to true when digital value is to be used for channel -
asGPIO2
public boolean asGPIO2Deprecated.set to true when digital value is to be used for channel -
scale1
public double scale1Deprecated. -
scale2
public double scale2Deprecated. -
offset1
public int offset1Deprecated. -
offset2
public int offset2Deprecated. -
channelMapping
public byte channelMappingDeprecated. -
enableSampling
public boolean enableSampling -
enableTransmit
public boolean enableTransmit -
enableLogging
public boolean enableLogging -
adoptMod
public boolean adoptMod -
mod
public long mod
-
-
Method Details
-
setScale
public void setScale(double _scale1, double _scale2)Deprecated.set scale in all directions- Parameters:
_scale1
- the first scale_scale2
- the second scale
-
setOffset
public void setOffset(int _offset1, int _offset2)Deprecated.set offset in all directions- Parameters:
_offset1
- the first offset_offset2
- the second offset
-
set
public void set(byte _channelMapping)Deprecated.set ADC channel mapping, each of the 8 bits selects different channels. Only 2 channels can be active at once (others will be ignored). The lowest selected bit will be the first value of the ADC sample. bit 0. Channel 2 (A2 on MSP - VBAT on P3D). bit 1. Channel 0 (A0). bit 2. Channel 1 (A1). bit 3. Channel 3 (A3). bit 4. Channel 4 (A4). bit 5. Channel 5 (A5). bit 6. Channel 6 (A6). bit 7. Channel 7 (A7)- Parameters:
_channelMapping
- channel mapping
-
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
-
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
-