delete ACCELIOCSELFTEST and GYROIOCSELFTEST

This commit is contained in:
Daniel Agar
2018-08-02 08:05:52 +02:00
committed by Lorenz Meier
parent 31c08c7ffb
commit 568a5f1c4c
23 changed files with 0 additions and 623 deletions
-42
View File
@@ -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;