AP_OpticalFlow: add defined(HAL_HAVE_PIXARTFLOW_SPI)

This addition will build in support for the Pixart pmw3901 if it is defined in the hwdef.dat for a board
This commit is contained in:
auturgy 2018-11-11 11:08:17 +11:00 committed by Andrew Tridgell
parent 8f709b7a34
commit d2cb4db191

View File

@ -105,6 +105,8 @@ void OpticalFlow::init(void)
backend = AP_OpticalFlow_PX4Flow::detect(*this); backend = AP_OpticalFlow_PX4Flow::detect(*this);
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_CHIBIOS_SKYVIPER_F412 #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_CHIBIOS_SKYVIPER_F412
backend = AP_OpticalFlow_Pixart::detect("pixartflow", *this); backend = AP_OpticalFlow_Pixart::detect("pixartflow", *this);
#elif defined(HAL_HAVE_PIXARTFLOW_SPI)
backend = AP_OpticalFlow_Pixart::detect("pixartflow", *this);
#endif #endif
} }