Sub: use AP_FEATURE_BOARD_DETECT

This commit is contained in:
Andrew Tridgell 2018-01-11 06:03:21 +11:00
parent 3aba8bf706
commit c1504dadab

View File

@ -35,7 +35,7 @@ void Sub::init_ardupilot()
BoardConfig_CAN.init();
#endif
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
#if AP_FEATURE_BOARD_DETECT
// Detection won't work until after BoardConfig.init()
switch (AP_BoardConfig::get_board_type()) {
case AP_BoardConfig::PX4_BOARD_PIXHAWK2: