Plane : Only build optical flow with PX4 board

Fixes SITL compile errors
This commit is contained in:
priseborough 2014-11-03 18:33:56 +11:00 committed by Andrew Tridgell
parent be54f2d6ee
commit 898ad7432b
2 changed files with 6 additions and 7 deletions

View File

@ -80,10 +80,6 @@
#ifndef FRSKY_TELEM_ENABLED
# define FRSKY_TELEM_ENABLED DISABLED
#endif
#ifndef OPTFLOW
# define OPTFLOW DISABLED
#endif
#endif
//////////////////////////////////////////////////////////////////////////////
@ -144,10 +140,10 @@
//
#ifndef OPTFLOW
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1 || CONFIG_HAL_BOARD == HAL_BOARD_APM2
# define OPTFLOW DISABLED
#else
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
# define OPTFLOW ENABLED
#else
# define OPTFLOW DISABLED
#endif
#endif

View File

@ -220,7 +220,10 @@ static void init_ardupilot()
reset_control_switch();
// initialise sensor
#if OPTFLOW == ENABLED
optflow.init();
#endif
}
//********************************************************************************