diff --git a/ArduPlane/system.cpp b/ArduPlane/system.cpp index af6a773c4e..7fc688eeba 100644 --- a/ArduPlane/system.cpp +++ b/ArduPlane/system.cpp @@ -246,6 +246,10 @@ void Plane::init_ardupilot() // initialise sensor #if OPTFLOW == ENABLED + if (!optflow.enabled()) { + return; + } + optflow.init(); #endif