From 3dad768e8be7a751dd158e5cea8ccf183dc2ebe8 Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Wed, 3 Jun 2015 17:51:48 -0300 Subject: [PATCH] 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. --- libraries/AP_InertialSensor/AP_InertialSensor_MPU9250.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_MPU9250.cpp b/libraries/AP_InertialSensor/AP_InertialSensor_MPU9250.cpp index 48dcd8bebd..a33e6de47b 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_MPU9250.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor_MPU9250.cpp @@ -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);