From 3884d9383c4c2fe1f1b0e3203b071dc2c4c531fb Mon Sep 17 00:00:00 2001 From: George Gougoudis Date: Sun, 21 Jan 2018 05:58:24 +0200 Subject: [PATCH] Fix IMU mutex lock --- .gitignore | 1 + src/main/flight/imu.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7996fc5e51..3c60954df4 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ stm32.mak .vagrant ubuntu*.log +/.vs diff --git a/src/main/flight/imu.c b/src/main/flight/imu.c index 86a44cb1c4..ca51c8e7a2 100644 --- a/src/main/flight/imu.c +++ b/src/main/flight/imu.c @@ -58,7 +58,7 @@ static uint32_t imuDeltaT = 0; static bool imuUpdated = false; #endif -#define IMU_LOCK pthread_mutex_unlock(&imuUpdateLock) +#define IMU_LOCK pthread_mutex_lock(&imuUpdateLock) #define IMU_UNLOCK pthread_mutex_unlock(&imuUpdateLock) #else