mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-05 21:23:58 -04:00
AP_OpticalFlow: support ChibiOS
This commit is contained in:
parent
e026a408f3
commit
3cd5386a7e
@ -89,7 +89,7 @@ void OpticalFlow::init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!backend) {
|
if (!backend) {
|
||||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN || defined(HAL_CHIBIOS_ARCH_FMUV3)
|
||||||
if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PIXHAWK) {
|
if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PIXHAWK) {
|
||||||
// possibly have pixhart on external SPI
|
// possibly have pixhart on external SPI
|
||||||
backend = AP_OpticalFlow_Pixart::detect(*this);
|
backend = AP_OpticalFlow_Pixart::detect(*this);
|
||||||
@ -104,6 +104,8 @@ void OpticalFlow::init(void)
|
|||||||
backend = new AP_OpticalFlow_Onboard(*this);
|
backend = new AP_OpticalFlow_Onboard(*this);
|
||||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX
|
||||||
backend = AP_OpticalFlow_PX4Flow::detect(*this);
|
backend = AP_OpticalFlow_PX4Flow::detect(*this);
|
||||||
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_CHIBIOS_SKYVIPER_F412
|
||||||
|
backend = AP_OpticalFlow_Pixart::detect(*this);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user