Browse Source

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.
sbg
Michael Schaeuble 8 years ago committed by Lorenz Meier
parent
commit
497a210742
  1. 7
      src/drivers/lis3mdl/lis3mdl.cpp

7
src/drivers/lis3mdl/lis3mdl.cpp

@ -1228,12 +1228,7 @@ int LIS3MDL::check_calibration() @@ -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…
Cancel
Save