From e24b6c6342dbb0dc39abdcebdbccccf64e863a6b Mon Sep 17 00:00:00 2001 From: ziltoid2 Date: Thu, 21 May 2015 15:28:29 +0300 Subject: [PATCH] Plane: prevent delayed compass HIL data from disabling compass at system startup only --- ArduPlane/system.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduPlane/system.cpp b/ArduPlane/system.cpp index 4914d7c11e..5fdb1031c9 100644 --- a/ArduPlane/system.cpp +++ b/ArduPlane/system.cpp @@ -178,7 +178,7 @@ void Plane::init_ardupilot() airspeed.init(); if (g.compass_enabled==true) { - if (!compass.init() || !compass.read()) { + if (!compass.init() || (!g.hil_mode && !compass.read())) { cliSerial->println_P(PSTR("Compass initialisation failed!")); g.compass_enabled = false; } else {