AP_OpticalFlow: use AP_FEATURE_BOARD_DETECT

This commit is contained in:
Andrew Tridgell 2018-01-11 06:03:43 +11:00
parent c1504dadab
commit 85f4958e4e
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ void OpticalFlow::init(void)
}
if (!backend) {
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN || defined(HAL_CHIBIOS_ARCH_FMUV3)
#if AP_FEATURE_BOARD_DETECT
if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PIXHAWK) {
// possibly have pixhart on external SPI
backend = AP_OpticalFlow_Pixart::detect(*this);