forked from Archive/PX4-Autopilot
lis3mdl: Fix check_calibration() output
The previous implementation returned OK when the sensor was not calibrated and vice versa. This fixes a preflight fail due to selftest failed.
This commit is contained in:
parent
cff430e137
commit
497a210742
|
@ -1228,12 +1228,7 @@ int LIS3MDL::check_calibration()
|
|||
}
|
||||
|
||||
/* return 0 if calibrated, 1 else */
|
||||
if (!_calibrated) {
|
||||
return 0;
|
||||
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
return !_calibrated;
|
||||
}
|
||||
|
||||
int LIS3MDL::set_excitement(unsigned enable)
|
||||
|
|
Loading…
Reference in New Issue