From 42406c827a55d946adb0ede91b4d76d65d8d8796 Mon Sep 17 00:00:00 2001 From: rmackay9 Date: Thu, 30 Aug 2012 16:52:10 +0900 Subject: [PATCH] ArduCopter: added NUM_IMU_SAMPLES_FOR_XYZHZ definitions for MPU6000 and Oilpan to allow more syncing of the mainloop with the arrival of data from the IMU. --- ArduCopter/config.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ArduCopter/config.h b/ArduCopter/config.h index 0439c8507c..8e022c43e8 100644 --- a/ArduCopter/config.h +++ b/ArduCopter/config.h @@ -98,6 +98,17 @@ # endif #endif +#if CONFIG_IMU_TYPE == CONFIG_IMU_OILPAN + # define NUM_IMU_SAMPLES_FOR_200HZ 5 + # define NUM_IMU_SAMPLES_FOR_100HZ 10 + # define NUM_IMU_SAMPLES_FOR_50HZ 20 +#endif + +#if CONFIG_IMU_TYPE == CONFIG_IMU_MPU6000 + # define NUM_IMU_SAMPLES_FOR_200HZ 1 + # define NUM_IMU_SAMPLES_FOR_100HZ 2 + # define NUM_IMU_SAMPLES_FOR_50HZ 4 +#endif ////////////////////////////////////////////////////////////////////////////// // ADC Enable - used to eliminate for systems which don't have ADC.