forked from Archive/PX4-Autopilot
delete unused IOCTL SENSORIOCGPOLLRATE
This commit is contained in:
parent
9cd3e3d1cf
commit
8dfd55fc9e
|
@ -375,13 +375,6 @@ BMP280::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
break;
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_report_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (USEC_PER_SEC / USEC_PER_TICK / _report_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -160,13 +160,6 @@ LPS22HB::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCRESET:
|
||||
return reset();
|
||||
|
||||
|
|
|
@ -494,13 +494,6 @@ LPS25H::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -445,13 +445,6 @@ MPL3115A2::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -520,13 +520,6 @@ MS5611::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -402,13 +402,6 @@ HC_SR04::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
|
|
@ -133,13 +133,6 @@ int LidarLite::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCRESET:
|
||||
reset_sensor();
|
||||
return OK;
|
||||
|
|
|
@ -398,13 +398,6 @@ MB12XX::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
|
|
@ -379,13 +379,6 @@ SF0X::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
|
|
@ -398,13 +398,6 @@ SF1XX::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
|
|
@ -398,13 +398,6 @@ SRF02::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
|
|
@ -476,13 +476,6 @@ TERARANGER::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
|
|
@ -416,13 +416,6 @@ TFMINI::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
|
|
@ -126,12 +126,6 @@
|
|||
*/
|
||||
#define SENSORIOCSPOLLRATE _SENSORIOC(0)
|
||||
|
||||
/**
|
||||
* Return the driver's approximate polling rate in Hz, or one of the
|
||||
* SENSOR_POLLRATE values.
|
||||
*/
|
||||
#define SENSORIOCGPOLLRATE _SENSORIOC(1)
|
||||
|
||||
#define SENSOR_POLLRATE_MANUAL 1000000 /**< poll when read */
|
||||
#define SENSOR_POLLRATE_MAX 1000002 /**< poll at device maximum rate */
|
||||
#define SENSOR_POLLRATE_DEFAULT 1000003 /**< poll at driver normal rate */
|
||||
|
|
|
@ -1043,13 +1043,6 @@ ADIS16448::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
@ -1095,7 +1088,6 @@ ADIS16448::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
|
||||
/* these are shared with the accel side */
|
||||
case SENSORIOCSPOLLRATE:
|
||||
case SENSORIOCGPOLLRATE:
|
||||
case SENSORIOCRESET:
|
||||
return ioctl(filp, cmd, arg);
|
||||
|
||||
|
@ -1135,7 +1127,6 @@ ADIS16448::mag_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
|
||||
/* these are shared with the accel side */
|
||||
case SENSORIOCSPOLLRATE:
|
||||
case SENSORIOCGPOLLRATE:
|
||||
case SENSORIOCRESET:
|
||||
return ioctl(filp, cmd, arg);
|
||||
|
||||
|
|
|
@ -400,13 +400,6 @@ ADIS16477::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_interval;
|
||||
|
||||
case ACCELIOCSSCALE: {
|
||||
/* copy scale, but only if off by a few percent */
|
||||
struct accel_calibration_s *s = (struct accel_calibration_s *) arg;
|
||||
|
@ -434,7 +427,6 @@ ADIS16477::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
|
||||
/* these are shared with the accel side */
|
||||
case SENSORIOCSPOLLRATE:
|
||||
case SENSORIOCGPOLLRATE:
|
||||
case SENSORIOCRESET:
|
||||
return ioctl(filp, cmd, arg);
|
||||
|
||||
|
|
|
@ -444,13 +444,6 @@ BMA180::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 2) || (arg > 100)) {
|
||||
|
|
|
@ -390,13 +390,6 @@ BMI055_accel::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -374,13 +374,6 @@ BMI055_gyro::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -626,13 +626,6 @@ BMI160::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
@ -678,7 +671,6 @@ BMI160::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
|
||||
/* these are shared with the accel side */
|
||||
case SENSORIOCSPOLLRATE:
|
||||
case SENSORIOCGPOLLRATE:
|
||||
case SENSORIOCRESET:
|
||||
return ioctl(filp, cmd, arg);
|
||||
|
||||
|
|
|
@ -705,13 +705,6 @@ FXAS21002C::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -853,13 +853,6 @@ FXOS8701CQ::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_accel_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_accel_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
@ -954,13 +947,6 @@ FXOS8701CQ::mag_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_mag_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_mag_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -629,13 +629,6 @@ L3GD20::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -865,13 +865,6 @@ LSM303D::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_accel_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_accel_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
@ -965,13 +958,6 @@ LSM303D::mag_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_mag_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_mag_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -1334,13 +1334,6 @@ MPU6000::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
@ -1386,7 +1379,6 @@ MPU6000::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
|
||||
/* these are shared with the accel side */
|
||||
case SENSORIOCSPOLLRATE:
|
||||
case SENSORIOCGPOLLRATE:
|
||||
case SENSORIOCRESET:
|
||||
return ioctl(filp, cmd, arg);
|
||||
|
||||
|
|
|
@ -329,9 +329,6 @@ MPU9250_mag::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
return MPU9250_AK8963_SAMPLE_RATE;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -800,13 +800,6 @@ MPU9250::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
@ -852,7 +845,6 @@ MPU9250::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
|
||||
/* these are shared with the accel side */
|
||||
case SENSORIOCSPOLLRATE:
|
||||
case SENSORIOCGPOLLRATE:
|
||||
case SENSORIOCRESET:
|
||||
return ioctl(filp, cmd, arg);
|
||||
|
||||
|
|
|
@ -767,13 +767,6 @@ BMM150::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -669,13 +669,6 @@ HMC5883::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / TICK2USEC(_measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -649,13 +649,6 @@ IST8310::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / TICK2USEC(_measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -298,13 +298,6 @@ LSM303AGR::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / TICK2USEC(_measure_ticks);
|
||||
|
||||
case SENSORIOCRESET:
|
||||
return reset();
|
||||
|
||||
|
|
|
@ -388,13 +388,6 @@ PX4FLOW::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -195,13 +195,6 @@ Airspeed::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
break;
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
|
|
@ -541,13 +541,6 @@ ACCELSIM::devIOCTL(unsigned long cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (m_sample_interval_usecs == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / m_sample_interval_usecs;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((ul_arg < 1) || (ul_arg > 100)) {
|
||||
|
@ -635,13 +628,6 @@ ACCELSIM::mag_ioctl(unsigned long cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_mag->m_sample_interval_usecs == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _mag->m_sample_interval_usecs;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -223,13 +223,6 @@ AirspeedSim::ioctl(cdev::file_t *filp, int cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_measure_ticks == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
|
|
@ -676,13 +676,6 @@ GYROSIM::devIOCTL(unsigned long cmd, unsigned long arg)
|
|||
}
|
||||
}
|
||||
|
||||
case SENSORIOCGPOLLRATE:
|
||||
if (_call_interval == 0) {
|
||||
return SENSOR_POLLRATE_MANUAL;
|
||||
}
|
||||
|
||||
return 1000000 / _call_interval;
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
|
@ -723,7 +716,6 @@ GYROSIM::gyro_ioctl(unsigned long cmd, unsigned long arg)
|
|||
|
||||
/* these are shared with the accel side */
|
||||
case SENSORIOCSPOLLRATE:
|
||||
case SENSORIOCGPOLLRATE:
|
||||
case SENSORIOCRESET:
|
||||
return devIOCTL(cmd, arg);
|
||||
|
||||
|
|
|
@ -193,14 +193,13 @@ do_gyro(int argc, char *argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
int prate = ioctl(fd, SENSORIOCGPOLLRATE, 0);
|
||||
int id = ioctl(fd, DEVIOCGDEVICEID, 0);
|
||||
int32_t calibration_id = 0;
|
||||
|
||||
param_get(param_find("CAL_GYRO0_ID"), &(calibration_id));
|
||||
|
||||
PX4_INFO("gyro: \n\tdevice id:\t0x%X\t(calibration is for device id 0x%X)\n\tread rate:\t%d Hz",
|
||||
id, calibration_id, prate);
|
||||
PX4_INFO("gyro: \n\tdevice id:\t0x%X\t(calibration is for device id 0x%X)",
|
||||
id, calibration_id);
|
||||
|
||||
close(fd);
|
||||
}
|
||||
|
@ -248,14 +247,13 @@ do_mag(int argc, char *argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
int prate = ioctl(fd, SENSORIOCGPOLLRATE, 0);
|
||||
int id = ioctl(fd, DEVIOCGDEVICEID, 0);
|
||||
int32_t calibration_id = 0;
|
||||
|
||||
param_get(param_find("CAL_MAG0_ID"), &(calibration_id));
|
||||
|
||||
PX4_INFO("mag: \n\tdevice id:\t0x%X\t(calibration is for device id 0x%X)\n\tread rate:\t%d Hz",
|
||||
id, calibration_id, prate);
|
||||
PX4_INFO("mag: \n\tdevice id:\t0x%X\t(calibration is for device id 0x%X)",
|
||||
id, calibration_id);
|
||||
|
||||
close(fd);
|
||||
}
|
||||
|
@ -293,14 +291,13 @@ do_accel(int argc, char *argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
int prate = ioctl(fd, SENSORIOCGPOLLRATE, 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",
|
||||
id, calibration_id, prate);
|
||||
PX4_INFO("accel: \n\tdevice id:\t0x%X\t(calibration is for device id 0x%X)",
|
||||
id, calibration_id);
|
||||
|
||||
close(fd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue