Fix hmc5883 detection broken in c6f5b98a79
This commit is contained in:
parent
bfd7399f56
commit
aa3e4501bd
|
@ -310,7 +310,7 @@ bool hmc5883lRead(int16_t *magData)
|
||||||
uint8_t buf[6];
|
uint8_t buf[6];
|
||||||
|
|
||||||
bool ack = i2cRead(MAG_ADDRESS, MAG_DATA_REGISTER, 6, buf);
|
bool ack = i2cRead(MAG_ADDRESS, MAG_DATA_REGISTER, 6, buf);
|
||||||
if (ack) {
|
if (!ack) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// During calibration, magGain is 1.0, so the read returns normal non-calibrated values.
|
// During calibration, magGain is 1.0, so the read returns normal non-calibrated values.
|
||||||
|
|
Loading…
Reference in New Issue