From b4435d0b3529bfcad548f8fd0a82f5112b55a484 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Thu, 26 Jan 2012 23:29:12 -0600 Subject: [PATCH] For L3GD20 sensor task on revo update gyro once per physical sample --- flight/Modules/Sensors/sensors.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flight/Modules/Sensors/sensors.c b/flight/Modules/Sensors/sensors.c index 95cdb40ca..7897c3645 100644 --- a/flight/Modules/Sensors/sensors.c +++ b/flight/Modules/Sensors/sensors.c @@ -384,8 +384,11 @@ static void SensorsTask(void *parameters) } PIOS_WDG_UpdateFlag(PIOS_WDG_SENSORS); + + // For L3GD20 which runs at 760 then one cycle per sample +#if defined(PIOS_INCLUDE_MPU6000) && !defined(PIOS_INCLUDE_L3GD20) vTaskDelayUntil(&lastSysTime, SENSOR_PERIOD / portTICK_RATE_MS); - +#endif } }