mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
AP_OpticalFlow: init checks if enabled
This commit is contained in:
parent
bc38affcb1
commit
cf24eef359
@ -83,6 +83,11 @@ OpticalFlow::OpticalFlow(AP_AHRS_NavEKF &ahrs)
|
||||
|
||||
void OpticalFlow::init(void)
|
||||
{
|
||||
// return immediately if not enabled
|
||||
if (!_enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!backend) {
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
||||
if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PIXHAWK) {
|
||||
|
Loading…
Reference in New Issue
Block a user