diff --git a/src/drivers/drv_accel.h b/src/drivers/drv_accel.h index c2378ff27e..bc380f829a 100644 --- a/src/drivers/drv_accel.h +++ b/src/drivers/drv_accel.h @@ -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) diff --git a/src/drivers/imu/adis16448/adis16448.cpp b/src/drivers/imu/adis16448/adis16448.cpp index 10e3203d4d..50a20da789 100644 --- a/src/drivers/imu/adis16448/adis16448.cpp +++ b/src/drivers/imu/adis16448/adis16448.cpp @@ -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); diff --git a/src/drivers/imu/adis16477/ADIS16477.cpp b/src/drivers/imu/adis16477/ADIS16477.cpp index 0bd5d485ec..804b33e025 100644 --- a/src/drivers/imu/adis16477/ADIS16477.cpp +++ b/src/drivers/imu/adis16477/ADIS16477.cpp @@ -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); diff --git a/src/drivers/imu/bma180/bma180.cpp b/src/drivers/imu/bma180/bma180.cpp index 4994bcd275..7d552ee4b9 100644 --- a/src/drivers/imu/bma180/bma180.cpp +++ b/src/drivers/imu/bma180/bma180.cpp @@ -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); diff --git a/src/drivers/imu/bmi055/BMI055_accel.cpp b/src/drivers/imu/bmi055/BMI055_accel.cpp index 22d35093b1..1c7fdbb7f2 100644 --- a/src/drivers/imu/bmi055/BMI055_accel.cpp +++ b/src/drivers/imu/bmi055/BMI055_accel.cpp @@ -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); diff --git a/src/drivers/imu/bmi160/bmi160.cpp b/src/drivers/imu/bmi160/bmi160.cpp index d42ca96fd9..cf3891a98d 100644 --- a/src/drivers/imu/bmi160/bmi160.cpp +++ b/src/drivers/imu/bmi160/bmi160.cpp @@ -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); diff --git a/src/drivers/imu/fxos8701cq/fxos8701cq.cpp b/src/drivers/imu/fxos8701cq/fxos8701cq.cpp index fe64190dcc..1a14beda21 100644 --- a/src/drivers/imu/fxos8701cq/fxos8701cq.cpp +++ b/src/drivers/imu/fxos8701cq/fxos8701cq.cpp @@ -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); diff --git a/src/drivers/imu/lsm303d/lsm303d.cpp b/src/drivers/imu/lsm303d/lsm303d.cpp index 6b48600c1f..267a5b8459 100644 --- a/src/drivers/imu/lsm303d/lsm303d.cpp +++ b/src/drivers/imu/lsm303d/lsm303d.cpp @@ -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); diff --git a/src/drivers/imu/mpu6000/mpu6000.cpp b/src/drivers/imu/mpu6000/mpu6000.cpp index e9d6131d32..5139a84e76 100644 --- a/src/drivers/imu/mpu6000/mpu6000.cpp +++ b/src/drivers/imu/mpu6000/mpu6000.cpp @@ -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); diff --git a/src/drivers/imu/mpu9250/mpu9250.cpp b/src/drivers/imu/mpu9250/mpu9250.cpp index f7dc54e391..98511cf632 100644 --- a/src/drivers/imu/mpu9250/mpu9250.cpp +++ b/src/drivers/imu/mpu9250/mpu9250.cpp @@ -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); diff --git a/src/modules/simulator/accelsim/accelsim.cpp b/src/modules/simulator/accelsim/accelsim.cpp index 33a4fc98e9..36752bb4ac 100644 --- a/src/modules/simulator/accelsim/accelsim.cpp +++ b/src/modules/simulator/accelsim/accelsim.cpp @@ -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); diff --git a/src/modules/simulator/gyrosim/gyrosim.cpp b/src/modules/simulator/gyrosim/gyrosim.cpp index ed3487c5ce..1c42e70399 100644 --- a/src/modules/simulator/gyrosim/gyrosim.cpp +++ b/src/modules/simulator/gyrosim/gyrosim.cpp @@ -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); diff --git a/src/systemcmds/config/config.c b/src/systemcmds/config/config.c index a9643614a3..78b0ff28c4 100644 --- a/src/systemcmds/config/config.c +++ b/src/systemcmds/config/config.c @@ -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); }