Plane: Only init optflow when enabled by parameter

This commit is contained in:
mirkix 2016-07-11 22:46:16 +02:00 committed by Andrew Tridgell
parent 8793c75da0
commit d018a32545
1 changed files with 4 additions and 0 deletions

View File

@ -246,6 +246,10 @@ void Plane::init_ardupilot()
// initialise sensor
#if OPTFLOW == ENABLED
if (!optflow.enabled()) {
return;
}
optflow.init();
#endif