Name: Thomas Gill
Email: tgill@ccsd.cc
Message: Hi - First, thank you for all your hard work and samples in the library. They are very helpful. I'm trying to figure out the BNO055 IMU and noticed that I couldn't calibrate it, so I looked at your code in SynchIMUDemo. There seems to be a mistake in the decoding of the calibration byte. I'm guessing the shift (after >>) should be 6, then 4, then 2 then 0.
String decodeCalibration(int status)
{
StringBuilder result = new StringBuilder();
result.append(String.format("s%d", (status >> 2) & 0x03)); // SYS calibration status
result.append(" ");
result.append(String.format("g%d", (status >> 2) & 0x03)); // GYR calibration status
result.append(" ");
result.append(String.format("a%d", (status >> 2) & 0x03)); // ACC calibration status
result.append(" ");
result.append(String.format("m%d", (status >> 0) & 0x03)); // MAG calibration status
return result.toString();
}
Name: Thomas Gill
Email: tgill@ccsd.cc
Message: Hi - First, thank you for all your hard work and samples in the library. They are very helpful. I'm trying to figure out the BNO055 IMU and noticed that I couldn't calibrate it, so I looked at your code in SynchIMUDemo. There seems to be a mistake in the decoding of the calibration byte. I'm guessing the shift (after >>) should be 6, then 4, then 2 then 0.
String decodeCalibration(int status)
{
StringBuilder result = new StringBuilder();
result.append(String.format("s%d", (status >> 2) & 0x03)); // SYS calibration status
result.append(" ");
result.append(String.format("g%d", (status >> 2) & 0x03)); // GYR calibration status
result.append(" ");
result.append(String.format("a%d", (status >> 2) & 0x03)); // ACC calibration status
result.append(" ");
result.append(String.format("m%d", (status >> 0) & 0x03)); // MAG calibration status
return result.toString();
}