Function mapCirculoEncoderRegisterValueToErrors

  • Maps a status register value to a list of corresponding encoder register errors.

    This function interprets each set bit in the given 8-bit value as an individual error flag. It then looks up the corresponding EncoderRegisterError definitions from a predefined error mapping (circuloEncoderRegisterErrors) based on the provided statusIndex.

    Returns

    An array of EncoderRegisterError objects for each set error bit in the status value. Returns an empty array if no error bits are set or no matching definitions are found.

    Parameters

    • value: number

      The 8-bit value read from the encoder's status register (typically 0–255).

    • statusIndex: 0 | 1

      The index of the status register (0 or 1), usually corresponding to CirculoEncoderRegisterAddress.STATUS0 or STATUS1.

    Returns EncoderRegisterError[]

Generated using TypeDoc