diff --git a/src/drivers/barometer/bmp280/bmp280.cpp b/src/drivers/barometer/bmp280/bmp280.cpp index 2e79ef558c..5ff7b954d8 100644 --- a/src/drivers/barometer/bmp280/bmp280.cpp +++ b/src/drivers/barometer/bmp280/bmp280.cpp @@ -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)) { diff --git a/src/drivers/barometer/lps22hb/LPS22HB.cpp b/src/drivers/barometer/lps22hb/LPS22HB.cpp index b49cefe8a7..dc2ca2eaa9 100644 --- a/src/drivers/barometer/lps22hb/LPS22HB.cpp +++ b/src/drivers/barometer/lps22hb/LPS22HB.cpp @@ -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(); diff --git a/src/drivers/barometer/lps25h/lps25h.cpp b/src/drivers/barometer/lps25h/lps25h.cpp index d6983f4910..521e99ec1b 100644 --- a/src/drivers/barometer/lps25h/lps25h.cpp +++ b/src/drivers/barometer/lps25h/lps25h.cpp @@ -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)) { diff --git a/src/drivers/barometer/mpl3115a2/mpl3115a2.cpp b/src/drivers/barometer/mpl3115a2/mpl3115a2.cpp index e935c49531..655e129af3 100644 --- a/src/drivers/barometer/mpl3115a2/mpl3115a2.cpp +++ b/src/drivers/barometer/mpl3115a2/mpl3115a2.cpp @@ -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)) { diff --git a/src/drivers/barometer/ms5611/ms5611.cpp b/src/drivers/barometer/ms5611/ms5611.cpp index 64f8f67cdb..4a6689d060 100644 --- a/src/drivers/barometer/ms5611/ms5611.cpp +++ b/src/drivers/barometer/ms5611/ms5611.cpp @@ -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)) { diff --git a/src/drivers/distance_sensor/hc_sr04/hc_sr04.cpp b/src/drivers/distance_sensor/hc_sr04/hc_sr04.cpp index b6a5522fd5..0f6c0665a4 100644 --- a/src/drivers/distance_sensor/hc_sr04/hc_sr04.cpp +++ b/src/drivers/distance_sensor/hc_sr04/hc_sr04.cpp @@ -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; diff --git a/src/drivers/distance_sensor/ll40ls/LidarLite.cpp b/src/drivers/distance_sensor/ll40ls/LidarLite.cpp index 6c4cf1bb97..c8eba323a7 100644 --- a/src/drivers/distance_sensor/ll40ls/LidarLite.cpp +++ b/src/drivers/distance_sensor/ll40ls/LidarLite.cpp @@ -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; diff --git a/src/drivers/distance_sensor/mb12xx/mb12xx.cpp b/src/drivers/distance_sensor/mb12xx/mb12xx.cpp index c172a46a5d..3b049f149d 100644 --- a/src/drivers/distance_sensor/mb12xx/mb12xx.cpp +++ b/src/drivers/distance_sensor/mb12xx/mb12xx.cpp @@ -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; diff --git a/src/drivers/distance_sensor/sf0x/sf0x.cpp b/src/drivers/distance_sensor/sf0x/sf0x.cpp index 75f9444927..291f26ee48 100644 --- a/src/drivers/distance_sensor/sf0x/sf0x.cpp +++ b/src/drivers/distance_sensor/sf0x/sf0x.cpp @@ -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; diff --git a/src/drivers/distance_sensor/sf1xx/sf1xx.cpp b/src/drivers/distance_sensor/sf1xx/sf1xx.cpp index c5877cbfc6..985492e3f1 100644 --- a/src/drivers/distance_sensor/sf1xx/sf1xx.cpp +++ b/src/drivers/distance_sensor/sf1xx/sf1xx.cpp @@ -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; diff --git a/src/drivers/distance_sensor/srf02/srf02.cpp b/src/drivers/distance_sensor/srf02/srf02.cpp index 6f8d98cb57..ea4c45ef8a 100644 --- a/src/drivers/distance_sensor/srf02/srf02.cpp +++ b/src/drivers/distance_sensor/srf02/srf02.cpp @@ -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; diff --git a/src/drivers/distance_sensor/teraranger/teraranger.cpp b/src/drivers/distance_sensor/teraranger/teraranger.cpp index 71f09be92a..ce3f1fca8f 100644 --- a/src/drivers/distance_sensor/teraranger/teraranger.cpp +++ b/src/drivers/distance_sensor/teraranger/teraranger.cpp @@ -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; diff --git a/src/drivers/distance_sensor/tfmini/tfmini.cpp b/src/drivers/distance_sensor/tfmini/tfmini.cpp index c66ca3a0a0..06d95198a9 100644 --- a/src/drivers/distance_sensor/tfmini/tfmini.cpp +++ b/src/drivers/distance_sensor/tfmini/tfmini.cpp @@ -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; diff --git a/src/drivers/drv_sensor.h b/src/drivers/drv_sensor.h index 4d314b2a5f..e66f8bb3b3 100644 --- a/src/drivers/drv_sensor.h +++ b/src/drivers/drv_sensor.h @@ -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 */ diff --git a/src/drivers/imu/adis16448/adis16448.cpp b/src/drivers/imu/adis16448/adis16448.cpp index d296521067..da1789b290 100644 --- a/src/drivers/imu/adis16448/adis16448.cpp +++ b/src/drivers/imu/adis16448/adis16448.cpp @@ -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); diff --git a/src/drivers/imu/adis16477/ADIS16477.cpp b/src/drivers/imu/adis16477/ADIS16477.cpp index 4ff2c0a260..2b0ce286a8 100644 --- a/src/drivers/imu/adis16477/ADIS16477.cpp +++ b/src/drivers/imu/adis16477/ADIS16477.cpp @@ -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); diff --git a/src/drivers/imu/bma180/bma180.cpp b/src/drivers/imu/bma180/bma180.cpp index 5b67bcb308..f3792af0cc 100644 --- a/src/drivers/imu/bma180/bma180.cpp +++ b/src/drivers/imu/bma180/bma180.cpp @@ -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)) { diff --git a/src/drivers/imu/bmi055/BMI055_accel.cpp b/src/drivers/imu/bmi055/BMI055_accel.cpp index 884e9fbd13..de74e9a7bc 100644 --- a/src/drivers/imu/bmi055/BMI055_accel.cpp +++ b/src/drivers/imu/bmi055/BMI055_accel.cpp @@ -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)) { diff --git a/src/drivers/imu/bmi055/BMI055_gyro.cpp b/src/drivers/imu/bmi055/BMI055_gyro.cpp index 9ac471e956..577e700760 100644 --- a/src/drivers/imu/bmi055/BMI055_gyro.cpp +++ b/src/drivers/imu/bmi055/BMI055_gyro.cpp @@ -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)) { diff --git a/src/drivers/imu/bmi160/bmi160.cpp b/src/drivers/imu/bmi160/bmi160.cpp index 7b1e3012d6..c1ab84364c 100644 --- a/src/drivers/imu/bmi160/bmi160.cpp +++ b/src/drivers/imu/bmi160/bmi160.cpp @@ -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); diff --git a/src/drivers/imu/fxas21002c/fxas21002c.cpp b/src/drivers/imu/fxas21002c/fxas21002c.cpp index b7d02b5147..4e7e6d278f 100644 --- a/src/drivers/imu/fxas21002c/fxas21002c.cpp +++ b/src/drivers/imu/fxas21002c/fxas21002c.cpp @@ -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)) { diff --git a/src/drivers/imu/fxos8701cq/fxos8701cq.cpp b/src/drivers/imu/fxos8701cq/fxos8701cq.cpp index b9091c8de5..6af2a978fd 100644 --- a/src/drivers/imu/fxos8701cq/fxos8701cq.cpp +++ b/src/drivers/imu/fxos8701cq/fxos8701cq.cpp @@ -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)) { diff --git a/src/drivers/imu/l3gd20/l3gd20.cpp b/src/drivers/imu/l3gd20/l3gd20.cpp index bc9a3d728a..b8e88b30a0 100644 --- a/src/drivers/imu/l3gd20/l3gd20.cpp +++ b/src/drivers/imu/l3gd20/l3gd20.cpp @@ -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)) { diff --git a/src/drivers/imu/lsm303d/lsm303d.cpp b/src/drivers/imu/lsm303d/lsm303d.cpp index 18f8425076..03a88b6c3e 100644 --- a/src/drivers/imu/lsm303d/lsm303d.cpp +++ b/src/drivers/imu/lsm303d/lsm303d.cpp @@ -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)) { diff --git a/src/drivers/imu/mpu6000/mpu6000.cpp b/src/drivers/imu/mpu6000/mpu6000.cpp index e8ea9a2fc1..6a5ec83446 100644 --- a/src/drivers/imu/mpu6000/mpu6000.cpp +++ b/src/drivers/imu/mpu6000/mpu6000.cpp @@ -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); diff --git a/src/drivers/imu/mpu9250/mag.cpp b/src/drivers/imu/mpu9250/mag.cpp index 0be1739830..1ef4a000fb 100644 --- a/src/drivers/imu/mpu9250/mag.cpp +++ b/src/drivers/imu/mpu9250/mag.cpp @@ -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)) { diff --git a/src/drivers/imu/mpu9250/mpu9250.cpp b/src/drivers/imu/mpu9250/mpu9250.cpp index 806dde61f1..748688f080 100644 --- a/src/drivers/imu/mpu9250/mpu9250.cpp +++ b/src/drivers/imu/mpu9250/mpu9250.cpp @@ -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); diff --git a/src/drivers/magnetometer/bmm150/bmm150.cpp b/src/drivers/magnetometer/bmm150/bmm150.cpp index a58c1f4049..5c04cd5634 100644 --- a/src/drivers/magnetometer/bmm150/bmm150.cpp +++ b/src/drivers/magnetometer/bmm150/bmm150.cpp @@ -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)) { diff --git a/src/drivers/magnetometer/hmc5883/hmc5883.cpp b/src/drivers/magnetometer/hmc5883/hmc5883.cpp index dfc019211f..0d81d2d619 100644 --- a/src/drivers/magnetometer/hmc5883/hmc5883.cpp +++ b/src/drivers/magnetometer/hmc5883/hmc5883.cpp @@ -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)) { diff --git a/src/drivers/magnetometer/ist8310/ist8310.cpp b/src/drivers/magnetometer/ist8310/ist8310.cpp index 117df69351..83a6401c80 100644 --- a/src/drivers/magnetometer/ist8310/ist8310.cpp +++ b/src/drivers/magnetometer/ist8310/ist8310.cpp @@ -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)) { diff --git a/src/drivers/magnetometer/lsm303agr/LSM303AGR.cpp b/src/drivers/magnetometer/lsm303agr/LSM303AGR.cpp index 33eff5c662..9b974768e3 100644 --- a/src/drivers/magnetometer/lsm303agr/LSM303AGR.cpp +++ b/src/drivers/magnetometer/lsm303agr/LSM303AGR.cpp @@ -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(); diff --git a/src/drivers/px4flow/px4flow.cpp b/src/drivers/px4flow/px4flow.cpp index 50b2fc6774..931f3cc478 100644 --- a/src/drivers/px4flow/px4flow.cpp +++ b/src/drivers/px4flow/px4flow.cpp @@ -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)) { diff --git a/src/lib/drivers/airspeed/airspeed.cpp b/src/lib/drivers/airspeed/airspeed.cpp index bb606eddd8..3cc31ee90e 100644 --- a/src/lib/drivers/airspeed/airspeed.cpp +++ b/src/lib/drivers/airspeed/airspeed.cpp @@ -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; diff --git a/src/modules/simulator/accelsim/accelsim.cpp b/src/modules/simulator/accelsim/accelsim.cpp index 0b039c116a..afcd17b90e 100644 --- a/src/modules/simulator/accelsim/accelsim.cpp +++ b/src/modules/simulator/accelsim/accelsim.cpp @@ -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)) { diff --git a/src/modules/simulator/airspeedsim/airspeedsim.cpp b/src/modules/simulator/airspeedsim/airspeedsim.cpp index 191a882809..0b998a854f 100644 --- a/src/modules/simulator/airspeedsim/airspeedsim.cpp +++ b/src/modules/simulator/airspeedsim/airspeedsim.cpp @@ -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)) { diff --git a/src/modules/simulator/gyrosim/gyrosim.cpp b/src/modules/simulator/gyrosim/gyrosim.cpp index f4a248b832..de50df6243 100644 --- a/src/modules/simulator/gyrosim/gyrosim.cpp +++ b/src/modules/simulator/gyrosim/gyrosim.cpp @@ -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); diff --git a/src/systemcmds/config/config.c b/src/systemcmds/config/config.c index bdf2dda029..b5e0eb4505 100644 --- a/src/systemcmds/config/config.c +++ b/src/systemcmds/config/config.c @@ -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); }