From c5922d2422c90a9ee93e7668f3e3e433213ceebd Mon Sep 17 00:00:00 2001 From: borisbstyle Date: Fri, 6 Jan 2017 12:53:11 +0100 Subject: [PATCH] Remove volatile from gyroADC --- src/main/drivers/accgyro.h | 2 +- src/main/sensors/gyro.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/drivers/accgyro.h b/src/main/drivers/accgyro.h index 6da30982f..f6f9570cd 100644 --- a/src/main/drivers/accgyro.h +++ b/src/main/drivers/accgyro.h @@ -53,7 +53,7 @@ typedef struct gyroDev_s { sensorGyroUpdateFuncPtr update; extiCallbackRec_t exti; float scale; // scalefactor - int16_t gyroADCRaw[XYZ_AXIS_COUNT]; + volatile int16_t gyroADCRaw[XYZ_AXIS_COUNT]; uint8_t lpf; gyroRateKHz_e gyroRateKHz; uint8_t mpuDividerDrops; diff --git a/src/main/sensors/gyro.c b/src/main/sensors/gyro.c index 3daa93af7..40442da09 100644 --- a/src/main/sensors/gyro.c +++ b/src/main/sensors/gyro.c @@ -66,11 +66,7 @@ gyro_t gyro; // gyro access functions -#if defined(GYRO_USES_SPI) && defined(USE_MPU_DATA_READY_SIGNAL) -static volatile int32_t gyroADC[XYZ_AXIS_COUNT]; -#else static int32_t gyroADC[XYZ_AXIS_COUNT]; -#endif static int32_t gyroZero[XYZ_AXIS_COUNT] = { 0, 0, 0 }; static const gyroConfig_t *gyroConfig;