Skip to content
Snippets Groups Projects
Commit 82cbac70 authored by Lorenz Meier's avatar Lorenz Meier
Browse files

Fixed calibration check

parent 451ecc1b
No related branches found
No related tags found
No related merge requests found
......@@ -1080,10 +1080,10 @@ int HMC5883::check_offset()
int HMC5883::check_calibration()
{
bool offset_valid = !(check_offset() == OK);
bool scale_valid = !(check_scale() == OK);
bool offset_valid = (check_offset() == OK);
bool scale_valid = (check_scale() == OK);
if (_calibrated != (offset_valid && scale_valid == OK)) {
if (_calibrated != (offset_valid && scale_valid)) {
warnx("mag cal status changed %s%s", (scale_valid) ? "" : "scale invalid ",
(offset_valid) ? "" : "offset invalid");
_calibrated = (offset_valid && scale_valid);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment