diff --git a/ArduPlane/ArduPlane.pde b/ArduPlane/ArduPlane.pde index bb90385c87..8a08e83bdb 100644 --- a/ArduPlane/ArduPlane.pde +++ b/ArduPlane/ArduPlane.pde @@ -316,12 +316,10 @@ static AP_Camera camera(&relay); //////////////////////////////////////////////////////////////////////////////// // Optical flow sensor //////////////////////////////////////////////////////////////////////////////// -#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 -static AP_OpticalFlow_PX4 optflow(ahrs); -#endif +static OpticalFlow optflow; //Rally Ponints -AP_Rally rally(ahrs); +static AP_Rally rally(ahrs); //////////////////////////////////////////////////////////////////////////////// // Global variables diff --git a/ArduPlane/config.h b/ArduPlane/config.h index b105c64485..d29d194ef1 100644 --- a/ArduPlane/config.h +++ b/ArduPlane/config.h @@ -140,7 +140,7 @@ // #ifndef OPTFLOW -#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 +#if HAL_CPU_CLASS >= HAL_CPU_CLASS_75 # define OPTFLOW ENABLED #else # define OPTFLOW DISABLED