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.
This commit is contained in:
Gustavo Jose de Sousa 2015-06-03 17:51:48 -03:00 committed by Andrew Tridgell
parent 587471ab54
commit 3dad768e8b

View File

@ -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);