mirror of https://github.com/ArduPilot/ardupilot
AP_OpticalFlow: use AP_FEATURE_BOARD_DETECT
This commit is contained in:
parent
c1504dadab
commit
85f4958e4e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue