Revision 510d0f10

View differences:

Adafruit_BNO055.cpp
687 687
bool Adafruit_BNO055::isFullyCalibrated() {
688 688
  uint8_t system, gyro, accel, mag;
689 689
  getCalibration(&system, &gyro, &accel, &mag);
690
  if (system < 3 || gyro < 3 || accel < 3 || mag < 3)
691
    return false;
692
  return true;
690

  
691
  switch (_mode) {
692
  case OPERATION_MODE_ACCONLY:
693
    return (accel == 3);
694
  case OPERATION_MODE_MAGONLY:
695
    return (mag == 3);
696
  case OPERATION_MODE_GYRONLY:
697
  case OPERATION_MODE_M4G: /* No magnetometer calibration required. */
698
    return (gyro == 3);
699
  case OPERATION_MODE_ACCMAG:
700
  case OPERATION_MODE_COMPASS:
701
    return (accel == 3 && mag == 3);
702
  case OPERATION_MODE_ACCGYRO:
703
  case OPERATION_MODE_IMUPLUS:
704
    return (accel == 3 && gyro == 3);
705
  case OPERATION_MODE_MAGGYRO:
706
    return (mag == 3 && gyro == 3);
707
  default:
708
    return (system == 3 && gyro == 3 && accel == 3 && mag == 3);
709
  }
693 710
}
694 711

  
695 712
/*!

Also available in: Unified diff