AP_Compass: restore low speed change on register read failure

This commit is contained in:
Andrew Tridgell 2012-12-08 15:18:45 +11:00
parent 7b9b088261
commit b70f7f57ba

View File

@ -73,6 +73,9 @@ bool AP_Compass_HMC5843::read_raw()
uint8_t buff[6];
if (hal.i2c->readRegisters(COMPASS_ADDRESS, 0x03, 6, buff) != 0) {
if (healthy) {
hal.i2c->setHighSpeed(false);
}
healthy = false;
return false;
}