delete unused IOCTL ACCELIOCGRANGE

This commit is contained in:
Daniel Agar 2018-11-03 14:33:32 -04:00 committed by Lorenz Meier
parent 5d3d120705
commit 77abcab46f
13 changed files with 2 additions and 42 deletions

View File

@ -82,9 +82,6 @@ struct accel_calibration_s {
/** set the accel scaling constants to the structure pointed to by (arg) */
#define ACCELIOCSSCALE _ACCELIOC(5)
/** get the current accel measurement range in g */
#define ACCELIOCGRANGE _ACCELIOC(8)
/** determine if hardware is external or onboard */
#define ACCELIOCGEXTERNAL _ACCELIOC(12)

View File

@ -1086,9 +1086,6 @@ ADIS16448::ioctl(struct file *filp, int cmd, unsigned long arg)
}
}
case ACCELIOCGRANGE:
return (unsigned long)((_accel_range_m_s2) / CONSTANTS_ONE_G + 0.5f);
case ACCELIOCTYPE:
return (ADIS16448_Product);

View File

@ -425,9 +425,6 @@ ADIS16477::ioctl(struct file *filp, int cmd, unsigned long arg)
}
}
case ACCELIOCGRANGE:
return (unsigned long)((_accel_range_m_s2) / CONSTANTS_ONE_G + 0.5f);
default:
/* give it to the superclass */
return SPI::ioctl(filp, cmd, arg);

View File

@ -481,9 +481,6 @@ BMA180::ioctl(struct file *filp, int cmd, unsigned long arg)
memcpy(&_accel_scale, (struct accel_calibration_s *) arg, sizeof(_accel_scale));
return OK;
case ACCELIOCGRANGE:
return _current_range;
default:
/* give it to the superclass */
return SPI::ioctl(filp, cmd, arg);

View File

@ -432,9 +432,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);
default:
/* give it to the superclass */
return SPI::ioctl(filp, cmd, arg);

View File

@ -668,9 +668,6 @@ BMI160::ioctl(struct file *filp, int cmd, unsigned long arg)
}
}
case ACCELIOCGRANGE:
return (unsigned long)((_accel_range_m_s2) / CONSTANTS_ONE_G + 0.5f);
default:
/* give it to the superclass */
return SPI::ioctl(filp, cmd, arg);

View File

@ -899,10 +899,6 @@ FXOS8701CQ::ioctl(struct file *filp, int cmd, unsigned long arg)
}
}
case ACCELIOCGRANGE:
/* convert to m/s^2 and return rounded in G */
return (unsigned long)((_accel_range_m_s2) / CONSTANTS_ONE_G + 0.5f);
default:
/* give it to the superclass */
return SPI::ioctl(filp, cmd, arg);

View File

@ -911,10 +911,6 @@ LSM303D::ioctl(struct file *filp, int cmd, unsigned long arg)
}
}
case ACCELIOCGRANGE:
/* convert to m/s^2 and return rounded in G */
return (unsigned long)((_accel_range_m_s2) / CONSTANTS_ONE_G + 0.5f);
default:
/* give it to the superclass */
return SPI::ioctl(filp, cmd, arg);

View File

@ -1385,9 +1385,6 @@ MPU6000::ioctl(struct file *filp, int cmd, unsigned long arg)
}
}
case ACCELIOCGRANGE:
return (unsigned long)((_accel_range_m_s2) / CONSTANTS_ONE_G + 0.5f);
case ACCELIOCGEXTERNAL:
return _interface->ioctl(cmd, dummy);

View File

@ -845,9 +845,6 @@ MPU9250::ioctl(struct file *filp, int cmd, unsigned long arg)
}
}
case ACCELIOCGRANGE:
return (unsigned long)((_accel_range_m_s2) / CONSTANTS_ONE_G + 0.5f);
default:
/* give it to the superclass */
return CDev::ioctl(filp, cmd, arg);

View File

@ -583,10 +583,6 @@ ACCELSIM::devIOCTL(unsigned long cmd, unsigned long arg)
}
}
case ACCELIOCGRANGE:
/* convert to m/s^2 and return rounded in G */
return (unsigned long)((_accel_range_m_s2) / CONSTANTS_ONE_G + 0.5f);
default:
/* give it to the superclass */
return VirtDevObj::devIOCTL(cmd, arg);

View File

@ -718,9 +718,6 @@ GYROSIM::devIOCTL(unsigned long cmd, unsigned long arg)
}
}
case ACCELIOCGRANGE:
return (unsigned long)((_accel_range_m_s2) / CONSTANTS_ONE_G + 0.5f);
default:
/* give it to the superclass */
return VirtDevObj::devIOCTL(cmd, arg);

View File

@ -338,14 +338,13 @@ do_accel(int argc, char *argv[])
}
int prate = ioctl(fd, SENSORIOCGPOLLRATE, 0);
int range = ioctl(fd, ACCELIOCGRANGE, 0);
int id = ioctl(fd, DEVIOCGDEVICEID, 0);
int32_t calibration_id = 0;
param_get(param_find("CAL_ACC0_ID"), &(calibration_id));
PX4_INFO("accel: \n\tdevice id:\t0x%X\t(calibration is for device id 0x%X)\n\tread rate:\t%d Hz\n\trange:\t%d G",
id, calibration_id, prate, range);
PX4_INFO("accel: \n\tdevice id:\t0x%X\t(calibration is for device id 0x%X)\n\tread rate:\t%d Hz",
id, calibration_id, prate);
close(fd);
}