From 2b9776300258f4bc1ebb055f7c4229b4e3b64a0f Mon Sep 17 00:00:00 2001 From: Bruce Luckcuck Date: Thu, 8 Aug 2019 08:10:39 -0400 Subject: [PATCH] Fix unused variable warning when USE_ABSOLUTE_CONTROL is not defined --- src/main/flight/pid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index 9d2410654b..8845776749 100644 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -1371,7 +1371,9 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, timeUs_t currentTim const float previousIterm = pidData[axis].I; float itermErrorRate = errorRate; +#ifdef USE_ABSOLUTE_CONTROL float uncorrectedSetpoint = currentPidSetpoint; +#endif #if defined(USE_ITERM_RELAX) if (!launchControlActive && !inCrashRecoveryMode) {