Browse Source

AP_InertialSensor: log failure to initialize after max attempts on MPU9250

This happens for example when you are trying to use an SPI speed that's
above the one supported by the sensor or the controller.
mission-4.1.18
Gustavo Jose de Sousa 10 years ago committed by Andrew Tridgell
parent
commit
3dad768e8b
  1. 1
      libraries/AP_InertialSensor/AP_InertialSensor_MPU9250.cpp

1
libraries/AP_InertialSensor/AP_InertialSensor_MPU9250.cpp

@ -237,6 +237,7 @@ bool AP_InertialSensor_MPU9250::_init_sensor(void) @@ -237,6 +237,7 @@ bool AP_InertialSensor_MPU9250::_init_sensor(void)
_spi_sem->give();
}
if (tries++ > 5) {
hal.console->printf("MPU9250: 5 unsuccessful attempts to initialize\n");
return false;
}
} while (1);

Loading…
Cancel
Save