mirror of https://github.com/ArduPilot/ardupilot
Plane: fixed build with HIL disabled
This commit is contained in:
parent
a328a040fc
commit
695a266120
|
@ -178,7 +178,11 @@ void Plane::init_ardupilot()
|
|||
airspeed.init();
|
||||
|
||||
if (g.compass_enabled==true) {
|
||||
if (!compass.init() || (!g.hil_mode && !compass.read())) {
|
||||
bool compass_ok = compass.init() && compass.read();
|
||||
#if HIL_SUPPORT
|
||||
compass_ok = true;
|
||||
#endif
|
||||
if (!compass_ok) {
|
||||
cliSerial->println_P(PSTR("Compass initialisation failed!"));
|
||||
g.compass_enabled = false;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue