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 changes
    boolean adoptScale
    Deprecated.
     
    boolean asGPIO1
    Deprecated.
    set to true when digital value is to be used for channel
    boolean asGPIO2
    Deprecated.
    set to true when digital value is to be used for channel
    byte 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 array
    Config.Mask getMask()
    get mask
    int parse​(byte[] in)
    Deprecated.
    pare input byte array to relevant configuration and return length of encoded config
    void 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 directions
    void setSampling​(boolean _enableSampling, boolean _enableTransmit, boolean _enableLogging)
    set sampling related booleans
    void setScale​(double _scale1, double _scale2)
    Deprecated.
    set scale in all directions
    java.lang.String toString()
    Deprecated.
    create a string representation of the configuration

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • adoptOffset

      public boolean adoptOffset
      Deprecated.
      boolean to set for offset and scale changes
    • adoptScale

      public boolean adoptScale
      Deprecated.
    • asGPIO1

      public boolean asGPIO1
      Deprecated.
      set to true when digital value is to be used for channel
    • asGPIO2

      public boolean asGPIO2
      Deprecated.
      set to true when digital value is to be used for channel
    • scale1

      public double scale1
      Deprecated.
    • scale2

      public double scale2
      Deprecated.
    • offset1

      public int offset1
      Deprecated.
    • offset2

      public int offset2
      Deprecated.
    • channelMapping

      public byte channelMapping
      Deprecated.
    • 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

      public int parse​(byte[] in) throws InertiaException
      Deprecated.
      Description copied from interface: Config.AbstractConfig
      pare input byte array to relevant configuration and return length of encoded config
      Specified by:
      parse in interface Config.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 interface Config.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 interface Config.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

      public Config.Mask getMask()
      Description copied from interface: Config.AbstractConfig
      get mask
      Specified by:
      getMask in interface Config.AbstractConfig
      Returns:
      mask for this config