From cb5552f0e3c0e98ed00d5149bb08df379b0ccda5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 4 Jan 2015 12:29:22 +1100 Subject: [PATCH] Copter: fixed build with optflow disabled --- ArduCopter/system.pde | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ArduCopter/system.pde b/ArduCopter/system.pde index dde3e35de2..46fe29c6a8 100644 --- a/ArduCopter/system.pde +++ b/ArduCopter/system.pde @@ -216,8 +216,10 @@ static void init_ardupilot() if(g.compass_enabled) init_compass(); +#if OPTFLOW == ENABLED // make optflow available to AHRS ahrs.set_optflow(&optflow); +#endif // initialise attitude and position controllers attitude_control.set_dt(MAIN_LOOP_SECONDS);