mirror of
https://github.com/espressif/esp-drone.git
synced 2026-07-21 10:15:36 +00:00
Resolve the bug of mpu6050 initialization failure (#115)
* Resolve the bug of mpu6050 initialization failure * Update components/core/crazyflie/hal/src/sensors_mpu6050_hm5883L_ms5611.c
This commit is contained in:
@@ -415,8 +415,11 @@ static void sensorsDeviceInit(void)
|
||||
DEBUG_PRINTI("MPU6050 I2C connection [OK].\n");
|
||||
} else {
|
||||
DEBUG_PRINTE("MPU6050 I2C connection [FAIL].\n");
|
||||
// Please check your hardware !
|
||||
assert(0);
|
||||
DEBUG_PRINTE("Please power off and power on the device.\n");
|
||||
while (1)
|
||||
{
|
||||
vTaskDelay(M2T(100));
|
||||
}
|
||||
}
|
||||
|
||||
mpu6050Reset();
|
||||
|
||||
@@ -77,6 +77,7 @@ bool mpu6050Test(void)
|
||||
*/
|
||||
bool mpu6050TestConnection()
|
||||
{
|
||||
vTaskDelay(M2T(100));
|
||||
return mpu6050GetDeviceID() == 0b110100;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user