From 69ac08048e83b3e15640e417b312d9288d8767d9 Mon Sep 17 00:00:00 2001 From: shota Date: Sun, 22 Oct 2023 14:29:07 +0900 Subject: [PATCH] minor fix --- src/main/flight/imu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/flight/imu.c b/src/main/flight/imu.c index a7b61e4819a..e93aac430bb 100644 --- a/src/main/flight/imu.c +++ b/src/main/flight/imu.c @@ -351,8 +351,8 @@ static void imuMahonyAHRSupdate(float dt, const fpVector3_t * gyroBF, const fpVe /* Step 1: Yaw correction */ // Use measured magnetic field vector if (magBF || useCOG) { - float wMag; - float wCoG; + float wMag = 0.0f; + float wCoG = 0.0f; fpVector3_t vMagErr = { .v = { 0.0f, 0.0f, 0.0f } }; fpVector3_t vCoGErr = { .v = { 0.0f, 0.0f, 0.0f } };