Class CanandgyroDetails.Stg

java.lang.Object
com.reduxrobotics.sensors.canandgyro.CanandgyroDetails.Stg
Enclosing class:
CanandgyroDetails

public static class CanandgyroDetails.Stg extends Object
Settings.
  • Field Details

    • kYawFramePeriod

      public static final int kYawFramePeriod
      Yaw angle frame period (ms)
      See Also:
    • kAngularPositionFramePeriod

      public static final int kAngularPositionFramePeriod
      Angular position frame period (ms)
      See Also:
    • kAngularVelocityFramePeriod

      public static final int kAngularVelocityFramePeriod
      Angular velocity frame period (ms)
      See Also:
    • kAccelerationFramePeriod

      public static final int kAccelerationFramePeriod
      Acceleration frame period (ms)
      See Also:
    • kSetYaw

      public static final int kSetYaw
      Set yaw
      See Also:
    • kSetPosePositiveW

      public static final int kSetPosePositiveW
      Set (normed) quaternion assuming positive W
      See Also:
    • kSetPoseNegativeW

      public static final int kSetPoseNegativeW
      Set (normed) quaternion assuming negative W
      See Also:
    • kDeviceType

      public static final int kDeviceType
      Device-specific type identifier
      See Also:
    • kFirmwareVersion

      public static final int kFirmwareVersion
      Firmware version
      See Also:
    • kSerialNumber

      public static final int kSerialNumber
      Serial number
      See Also:
    • kStatusFramePeriod

      public static final int kStatusFramePeriod
      Status frame period (ms)
      See Also:
    • settingsAddresses

      public static int[] settingsAddresses
      List of settings to fetch for.
  • Method Details

    • extractYawFramePeriod

      public static int extractYawFramePeriod(long field)
      Extracts Yaw angle frame period (ms) from YawFramePeriod.
      Parameters:
      field - data bitfield
      Returns:
      YAW_FRAME_PERIOD as a uint:16
    • extractAngularPositionFramePeriod

      public static int extractAngularPositionFramePeriod(long field)
      Extracts Angular position frame period (ms) from AngularPositionFramePeriod.
      Parameters:
      field - data bitfield
      Returns:
      ANGULAR_POSITION_FRAME_PERIOD as a uint:16
    • extractAngularVelocityFramePeriod

      public static int extractAngularVelocityFramePeriod(long field)
      Extracts Angular velocity frame period (ms) from AngularVelocityFramePeriod.
      Parameters:
      field - data bitfield
      Returns:
      ANGULAR_VELOCITY_FRAME_PERIOD as a uint:16
    • extractAccelerationFramePeriod

      public static int extractAccelerationFramePeriod(long field)
      Extracts Acceleration frame period (ms) from AccelerationFramePeriod.
      Parameters:
      field - data bitfield
      Returns:
      ACCELERATION_FRAME_PERIOD as a uint:16
    • extractSetYaw_Yaw

      public static float extractSetYaw_Yaw(long field)
      Extracts Yaw angle (f32 between [-pi..pi) degrees) from SetYaw.
      Parameters:
      field - data bitfield
      Returns:
      yaw as a float:32
    • extractSetYaw_Wraparound

      public static int extractSetYaw_Wraparound(long field)
      Extracts Wraparound counter from SetYaw.
      Parameters:
      field - data bitfield
      Returns:
      wraparound as a sint:16
    • extractSetPosePositiveW_X

      public static int extractSetPosePositiveW_X(long field)
      Extracts Quaternion x term from SetPosePositiveW.
      Parameters:
      field - data bitfield
      Returns:
      x as a sint:16
    • extractSetPosePositiveW_Y

      public static int extractSetPosePositiveW_Y(long field)
      Extracts Quaternion y term from SetPosePositiveW.
      Parameters:
      field - data bitfield
      Returns:
      y as a sint:16
    • extractSetPosePositiveW_Z

      public static int extractSetPosePositiveW_Z(long field)
      Extracts Quaternion z term from SetPosePositiveW.
      Parameters:
      field - data bitfield
      Returns:
      z as a sint:16
    • extractSetPoseNegativeW_X

      public static int extractSetPoseNegativeW_X(long field)
      Extracts Quaternion x term from SetPoseNegativeW.
      Parameters:
      field - data bitfield
      Returns:
      x as a sint:16
    • extractSetPoseNegativeW_Y

      public static int extractSetPoseNegativeW_Y(long field)
      Extracts Quaternion y term from SetPoseNegativeW.
      Parameters:
      field - data bitfield
      Returns:
      y as a sint:16
    • extractSetPoseNegativeW_Z

      public static int extractSetPoseNegativeW_Z(long field)
      Extracts Quaternion z term from SetPoseNegativeW.
      Parameters:
      field - data bitfield
      Returns:
      z as a sint:16
    • extractDeviceType

      public static int extractDeviceType(long field)
      Extracts Device-specific type identifier from DeviceType.
      Parameters:
      field - data bitfield
      Returns:
      DEVICE_TYPE as a uint:16
    • extractFirmwareVersion_FirmwarePatch

      public static int extractFirmwareVersion_FirmwarePatch(long field)
      Extracts Firmware version patch number from FirmwareVersion.
      Parameters:
      field - data bitfield
      Returns:
      firmware_patch as a uint:8
    • extractFirmwareVersion_FirmwareMinor

      public static int extractFirmwareVersion_FirmwareMinor(long field)
      Extracts Firmware version minor number from FirmwareVersion.
      Parameters:
      field - data bitfield
      Returns:
      firmware_minor as a uint:8
    • extractFirmwareVersion_FirmwareYear

      public static int extractFirmwareVersion_FirmwareYear(long field)
      Extracts Firmware version year from FirmwareVersion.
      Parameters:
      field - data bitfield
      Returns:
      firmware_year as a uint:16
    • extractSerialNumber

      public static long extractSerialNumber(long field)
      Extracts Serial number from SerialNumber.
      Parameters:
      field - data bitfield
      Returns:
      SERIAL_NUMBER as a buf:48
    • extractStatusFramePeriod

      public static int extractStatusFramePeriod(long field)
      Extracts Status frame period (ms) from StatusFramePeriod.
      Parameters:
      field - data bitfield
      Returns:
      STATUS_FRAME_PERIOD as a uint:16
    • constructYawFramePeriod

      public static long constructYawFramePeriod(int yawFramePeriod)
      Constructs a YAW_FRAME_PERIOD setting.
      Parameters:
      yawFramePeriod - Yaw angle frame period (ms) (uint:16)
      Returns:
      message data as long
    • constructAngularPositionFramePeriod

      public static long constructAngularPositionFramePeriod(int angularPositionFramePeriod)
      Constructs a ANGULAR_POSITION_FRAME_PERIOD setting.
      Parameters:
      angularPositionFramePeriod - Angular position frame period (ms) (uint:16)
      Returns:
      message data as long
    • constructAngularVelocityFramePeriod

      public static long constructAngularVelocityFramePeriod(int angularVelocityFramePeriod)
      Constructs a ANGULAR_VELOCITY_FRAME_PERIOD setting.
      Parameters:
      angularVelocityFramePeriod - Angular velocity frame period (ms) (uint:16)
      Returns:
      message data as long
    • constructAccelerationFramePeriod

      public static long constructAccelerationFramePeriod(int accelerationFramePeriod)
      Constructs a ACCELERATION_FRAME_PERIOD setting.
      Parameters:
      accelerationFramePeriod - Acceleration frame period (ms) (uint:16)
      Returns:
      message data as long
    • constructSetYaw

      public static long constructSetYaw(float yaw, int wraparound)
      Constructs a SET_YAW setting.
      Parameters:
      yaw - Yaw angle (f32 between [-pi..pi) degrees) (float:32)
      wraparound - Wraparound counter (sint:16)
      Returns:
      message data as long
    • constructSetPosePositiveW

      public static long constructSetPosePositiveW(int x, int y, int z)
      Constructs a SET_POSE_POSITIVE_W setting.
      Parameters:
      x - Quaternion x term (sint:16)
      y - Quaternion y term (sint:16)
      z - Quaternion z term (sint:16)
      Returns:
      message data as long
    • constructSetPoseNegativeW

      public static long constructSetPoseNegativeW(int x, int y, int z)
      Constructs a SET_POSE_NEGATIVE_W setting.
      Parameters:
      x - Quaternion x term (sint:16)
      y - Quaternion y term (sint:16)
      z - Quaternion z term (sint:16)
      Returns:
      message data as long
    • constructDeviceType

      public static long constructDeviceType(int deviceType)
      Constructs a DEVICE_TYPE setting.
      Parameters:
      deviceType - Device-specific type identifier (uint:16)
      Returns:
      message data as long
    • constructFirmwareVersion

      public static long constructFirmwareVersion(int firmwarePatch, int firmwareMinor, int firmwareYear)
      Constructs a FIRMWARE_VERSION setting.
      Parameters:
      firmwarePatch - Firmware version patch number (uint:8)
      firmwareMinor - Firmware version minor number (uint:8)
      firmwareYear - Firmware version year (uint:16)
      Returns:
      message data as long
    • constructSerialNumber

      public static long constructSerialNumber(long serialNumber)
      Constructs a SERIAL_NUMBER setting.
      Parameters:
      serialNumber - Serial number (buf:48)
      Returns:
      message data as long
    • constructStatusFramePeriod

      public static long constructStatusFramePeriod(int statusFramePeriod)
      Constructs a STATUS_FRAME_PERIOD setting.
      Parameters:
      statusFramePeriod - Status frame period (ms) (uint:16)
      Returns:
      message data as long