From 21c33b60dbee787e98cf69bfe2f539e85eaf2c9c Mon Sep 17 00:00:00 2001 From: "Dr.-Ing. Amilcar Do Carmo Lucas" Date: Wed, 14 Mar 2018 21:18:23 +0100 Subject: [PATCH] Copter: Remove DRIFT mode code if DRIFT mode is disabled. --- ArduCopter/mode_drift.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ArduCopter/mode_drift.cpp b/ArduCopter/mode_drift.cpp index 6e1eb451986..43d8b107e14 100644 --- a/ArduCopter/mode_drift.cpp +++ b/ArduCopter/mode_drift.cpp @@ -1,5 +1,7 @@ #include "Copter.h" +#if MODE_DRIFT_ENABLED == ENABLED + /* * Init and run calls for drift flight mode */ @@ -124,3 +126,4 @@ float Copter::ModeDrift::get_throttle_assist(float velz, float pilot_throttle_sc return constrain_float(pilot_throttle_scaled + thr_assist, 0.0f, 1.0f); } +#endif