From a27a374f41a6a676bab43974532e9868bf74e40c Mon Sep 17 00:00:00 2001 From: jflyper Date: Mon, 17 Dec 2018 02:07:50 +0900 Subject: [PATCH] Do call gyroPreInitsensor for gyro 2 even if it is not activated. --- src/main/sensors/gyro.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/sensors/gyro.c b/src/main/sensors/gyro.c index b171137e1a..c8210726f8 100644 --- a/src/main/sensors/gyro.c +++ b/src/main/sensors/gyro.c @@ -495,13 +495,9 @@ static bool gyroInitSensor(gyroSensor_t *gyroSensor, const gyroDeviceConfig_t *c void gyroPreInit(void) { - if (gyroToUse == GYRO_CONFIG_USE_GYRO_1 || gyroToUse == GYRO_CONFIG_USE_GYRO_BOTH) { - gyroPreInitSensor(gyroDeviceConfig(0)); - } + gyroPreInitSensor(gyroDeviceConfig(0)); #ifdef USE_MULTI_GYRO - if (gyroToUse == GYRO_CONFIG_USE_GYRO_2 || gyroToUse == GYRO_CONFIG_USE_GYRO_BOTH) { - gyroPreInitSensor(gyroDeviceConfig(1)); - } + gyroPreInitSensor(gyroDeviceConfig(1)); #endif }