AP_Compass: disable HIL for AP_Periph

this saves several k of flash
This commit is contained in:
Andrew Tridgell 2019-10-23 19:03:28 +11:00
parent 88761e59f0
commit 3b244bbc7f

View File

@ -758,10 +758,12 @@ void Compass::_probe_external_i2c_compasses(void)
*/
void Compass::_detect_backends(void)
{
#ifndef HAL_BUILD_AP_PERIPH
if (_hil_mode) {
_add_backend(AP_Compass_HIL::detect());
return;
}
#endif
#if AP_FEATURE_BOARD_DETECT
if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PIXHAWK2) {