altos: Add 3 second delay to let mpu6000 come to life
authorKeith Packard <keithp@keithp.com>
Tue, 14 May 2013 17:48:24 +0000 (10:48 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 14 May 2013 17:48:24 +0000 (10:48 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_mpu6000.c

index fc768cc9ae1cdc166f4add87866d4e505df101f9..38d29b8c84bf29b365934add9286117a086dd43f 100644 (file)
@@ -161,12 +161,15 @@ ao_mpu6000_setup(void)
        if (ao_mpu6000_configured)
                return;
 
+       ao_delay(AO_SEC_TO_TICKS(3));
+
        /* Reset the whole chip */
        
        ao_mpu6000_reg_write(MPU6000_PWR_MGMT_1,
                             (1 << MPU6000_PWR_MGMT_1_DEVICE_RESET));
 
        /* Wait for it to reset. If we talk too quickly, it appears to get confused */
+       ao_delay(AO_SEC_TO_TICKS(3));
        ao_delay(AO_MS_TO_TICKS(100));
 
        /* Reset signal conditioning */