Comment 13 for bug 928360

Revision history for this message
Kalle Vahlman (kvahlman) wrote :

When you take the raw data from the device, use the second value for z axis and third for y. So the axis order is xzy not xyz in the data.

Eg, if you read with

        sscanf(buf, "%8x:%8x:%8x",
          (unsigned int*)&m_data[0],
          (unsigned int*)&m_data[1],
          (unsigned int*)&m_data[2]);

instead do

        sscanf(buf, "%8x:%8x:%8x",
          (unsigned int*)&m_data[0],
          (unsigned int*)&m_data[2],
          (unsigned int*)&m_data[1]);

and then continue as usual.