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 authored and Andrew Tridgell committed 2015-06-22 17:45:20 +10:00
1 parent 587471ab54
commit 3dad768e8b
1 file changed
+1
@@ -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);