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
-38
View File
@@ -308,41 +308,6 @@ BMI055_accel::self_test()
return (perf_event_count(_sample_perf) > 0) ? 0 : 1;
}
int
BMI055_accel::accel_self_test()
{
if (self_test()) {
return 1;
}
/* inspect accel offsets */
if (fabsf(_accel_scale.x_offset) < 0.000001f) {
return 1;
}
if (fabsf(_accel_scale.x_scale - 1.0f) > 0.4f || fabsf(_accel_scale.x_scale - 1.0f) < 0.000001f) {
return 1;
}
if (fabsf(_accel_scale.y_offset) < 0.000001f) {
return 1;
}
if (fabsf(_accel_scale.y_scale - 1.0f) > 0.4f || fabsf(_accel_scale.y_scale - 1.0f) < 0.000001f) {
return 1;
}
if (fabsf(_accel_scale.z_offset) < 0.000001f) {
return 1;
}
if (fabsf(_accel_scale.z_scale - 1.0f) > 0.4f || fabsf(_accel_scale.z_scale - 1.0f) < 0.000001f) {
return 1;
}
return 0;
}
/*
deliberately trigger an error in the sensor to trigger recovery
*/
@@ -484,9 +449,6 @@ BMI055_accel::ioctl(struct file *filp, int cmd, unsigned long arg)
case ACCELIOCGRANGE:
return (unsigned long)((_accel_range_m_s2) / CONSTANTS_ONE_G + 0.5f);
case ACCELIOCSELFTEST:
return accel_self_test();
default:
/* give it to the superclass */
return SPI::ioctl(filp, cmd, arg);