mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
AP_OpticalFlow: use AP_FEATURE_BOARD_DETECT
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user