Plane : Only build optical flow with PX4 board
Fixes SITL compile errors
This commit is contained in:
parent
be54f2d6ee
commit
898ad7432b
@ -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
|
||||
|
||||
|
@ -220,7 +220,10 @@ static void init_ardupilot()
|
||||
reset_control_switch();
|
||||
|
||||
// initialise sensor
|
||||
#if OPTFLOW == ENABLED
|
||||
optflow.init();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
//********************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user