mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 12:33:34 +08:00
delete ACCELIOCSELFTEST and GYROIOCSELFTEST
This commit is contained in:
committed by
Lorenz Meier
parent
31c08c7ffb
commit
568a5f1c4c
@@ -208,27 +208,6 @@ do_gyro(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
} else if (argc == 2 && !strcmp(argv[0], "check")) {
|
||||
ret = ioctl(fd, GYROIOCSELFTEST, 0);
|
||||
|
||||
if (ret) {
|
||||
PX4_WARN("gyro self test FAILED! Check calibration:");
|
||||
struct gyro_calibration_s scale;
|
||||
ret = ioctl(fd, GYROIOCGSCALE, (long unsigned int)&scale);
|
||||
|
||||
if (ret) {
|
||||
PX4_ERR("failed getting gyro 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("gyro calibration and self test OK");
|
||||
}
|
||||
|
||||
} else {
|
||||
print_usage();
|
||||
return 1;
|
||||
@@ -363,27 +342,6 @@ do_accel(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
} else if (argc == 2 && !strcmp(argv[0], "check")) {
|
||||
ret = ioctl(fd, ACCELIOCSELFTEST, 0);
|
||||
|
||||
if (ret) {
|
||||
PX4_WARN("accel self test FAILED! Check calibration:");
|
||||
struct accel_calibration_s scale;
|
||||
ret = ioctl(fd, ACCELIOCGSCALE, (long unsigned int)&scale);
|
||||
|
||||
if (ret) {
|
||||
PX4_ERR("failed getting accel 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("accel calibration and self test OK");
|
||||
}
|
||||
|
||||
} else {
|
||||
print_usage();
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user