delete MAGIOCSELFTEST

This commit is contained in:
Daniel Agar
2018-08-02 08:05:52 +02:00
committed by Lorenz Meier
parent daee7a4e4e
commit bb9c38a480
14 changed files with 0 additions and 206 deletions
-21
View File
@@ -296,27 +296,6 @@ do_mag(int argc, char *argv[])
return 1;
}
} else if (argc == 2 && !strcmp(argv[0], "check")) {
ret = ioctl(fd, MAGIOCSELFTEST, 0);
if (ret) {
PX4_WARN("mag self test FAILED! Check calibration:");
struct mag_calibration_s scale;
ret = ioctl(fd, MAGIOCGSCALE, (long unsigned int)&scale);
if (ret) {
PX4_ERR("failed getting mag scale");
return 1;
}
PX4_INFO("offsets: X: % 9.6f Y: % 9.6f Z: % 9.6f", (double)scale.x_offset, (double)scale.y_offset,
(double)scale.z_offset);
PX4_INFO("scale: X: % 9.6f Y: % 9.6f Z: % 9.6f", (double)scale.x_scale, (double)scale.y_scale, (double)scale.z_scale);
} else {
PX4_INFO("mag calibration and self test OK");
}
} else {
print_usage();
return 1;