mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
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:
committed by
Lorenz Meier
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)
|
||||
|
||||
Reference in New Issue
Block a user