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 Details

  • Constructor Details

    • AccelConfig

      public AccelConfig()
      Deprecated.
      default constructor, setting the Mask and rangeFactors
  • Method Details

    • set

      public void set​(Config.AccelRate1 _hardwareRate, boolean _fullScale)
      Deprecated.
      set hardware rate and scale for type 1 accelerometer
      Parameters:
      _hardwareRate - internal sampling rate
      _fullScale - true for 6G, false for 2G
    • set

      public void set​(Config.AccelRate2 _hardwareRate, Config.AccelRange2 _hardwareScale)
      Deprecated.
      set hardware rate and scale for type 2 accelerometer
      Parameters:
      _hardwareRate - internal sampling rate
      _hardwareScale - type2 scale
    • 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
    • getRangeFactor

      public double getRangeFactor()
      Deprecated.
      get the value to multiply raw values with to get acceleration in m/s^2
      Returns:
      range factor
    • setCustomRangeFactor

      public void setCustomRangeFactor​(Config.AccelType type, double[] factors)
      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

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