From 67252c8a9bc94404d402bbe7a1fbaf5b12b14900 Mon Sep 17 00:00:00 2001 From: rmackay9 Date: Tue, 28 Aug 2012 17:00:03 +0900 Subject: [PATCH] AP_InertialSensor_MPU6000: bug fix. DMP was being enabled by default so although the results were not being used, this caused a delay in the main loop --- libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp b/libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp index d4e553a4f5..c631895a03 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp @@ -461,9 +461,6 @@ void AP_InertialSensor_MPU6000::hardware_init() delay(1); attachInterrupt(6,data_interrupt,RISING); - - // initialise DMP. Should we only do this when we know we want to use the DMP for attitude sensing as well? - dmp_init(); } float AP_InertialSensor_MPU6000::_temp_to_celsius ( uint16_t regval ) @@ -574,6 +571,7 @@ void AP_InertialSensor_MPU6000::dmp_register_write(uint8_t bank, uint8_t address } // MPU6000 DMP initialization +// this should be called after hardware_init if you wish to enable the dmp void AP_InertialSensor_MPU6000::dmp_init() { uint8_t regs[4]; // for writing to dmp