From dacc804f9ed89d230a2ea6567cb0ef3ee62951e0 Mon Sep 17 00:00:00 2001 From: Zach Dwiel Date: Tue, 9 Jun 2020 11:03:31 -0400 Subject: [PATCH] Copter: fence.init() was getting called even when AC_FENCE was DISABLED --- ArduCopter/system.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArduCopter/system.cpp b/ArduCopter/system.cpp index 7001802bcb..a0ad07a6d7 100644 --- a/ArduCopter/system.cpp +++ b/ArduCopter/system.cpp @@ -69,8 +69,10 @@ void Copter::init_ardupilot() g2.gripper.init(); #endif +#if AC_FENCE == ENABLED fence.init(); - +#endif + // init winch and wheel encoder winch_init();