mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 22:33:33 +08:00
delete MAGIOCSELFTEST
This commit is contained in:
committed by
Lorenz Meier
parent
daee7a4e4e
commit
bb9c38a480
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user