diff --git a/src/drivers/drv_gyro.h b/src/drivers/drv_gyro.h index ce88853010..9cf02b8288 100644 --- a/src/drivers/drv_gyro.h +++ b/src/drivers/drv_gyro.h @@ -82,9 +82,6 @@ struct gyro_calibration_s { /** set the gyro scaling constants to (arg) */ #define GYROIOCSSCALE _GYROIOC(4) -/** set the gyro measurement range to handle at least (arg) degrees per second */ -#define GYROIOCSRANGE _GYROIOC(6) - /** get the current gyro measurement range in degrees per second */ #define GYROIOCGRANGE _GYROIOC(7) diff --git a/src/drivers/imu/adis16448/adis16448.cpp b/src/drivers/imu/adis16448/adis16448.cpp index e2e0fc48b7..0579fcebc0 100644 --- a/src/drivers/imu/adis16448/adis16448.cpp +++ b/src/drivers/imu/adis16448/adis16448.cpp @@ -1129,10 +1129,6 @@ ADIS16448::gyro_ioctl(struct file *filp, int cmd, unsigned long arg) memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale)); return OK; - case GYROIOCSRANGE: - _set_gyro_dyn_range(arg); - return OK; - case GYROIOCGRANGE: return (unsigned long)(_gyro_range_rad_s * 180.0f / M_PI_F + 0.5f); diff --git a/src/drivers/imu/adis16477/ADIS16477.cpp b/src/drivers/imu/adis16477/ADIS16477.cpp index cf4abb8b61..bc2cbfc9de 100644 --- a/src/drivers/imu/adis16477/ADIS16477.cpp +++ b/src/drivers/imu/adis16477/ADIS16477.cpp @@ -450,10 +450,6 @@ ADIS16477::gyro_ioctl(struct file *filp, int cmd, unsigned long arg) memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale)); return OK; - case GYROIOCSRANGE: - _set_gyro_dyn_range(arg); - return OK; - case GYROIOCGRANGE: return (unsigned long)(_gyro_range_rad_s * 180.0f / M_PI_F + 0.5f); diff --git a/src/drivers/imu/bmi055/BMI055_gyro.cpp b/src/drivers/imu/bmi055/BMI055_gyro.cpp index 1e28bea0f0..5beb1572e3 100644 --- a/src/drivers/imu/bmi055/BMI055_gyro.cpp +++ b/src/drivers/imu/bmi055/BMI055_gyro.cpp @@ -410,9 +410,6 @@ BMI055_gyro::ioctl(struct file *filp, int cmd, unsigned long arg) memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale)); return OK; - case GYROIOCSRANGE: - return set_gyro_range(arg); - case GYROIOCGRANGE: return (unsigned long)(_gyro_range_rad_s * 180.0f / M_PI_F + 0.5f); diff --git a/src/drivers/imu/bmi160/bmi160.cpp b/src/drivers/imu/bmi160/bmi160.cpp index 35dcc073b2..d843083e0b 100644 --- a/src/drivers/imu/bmi160/bmi160.cpp +++ b/src/drivers/imu/bmi160/bmi160.cpp @@ -711,9 +711,6 @@ BMI160::gyro_ioctl(struct file *filp, int cmd, unsigned long arg) memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale)); return OK; - case GYROIOCSRANGE: - return set_gyro_range(arg); - case GYROIOCGRANGE: return (unsigned long)(_gyro_range_rad_s * 180.0f / M_PI_F + 0.5f); diff --git a/src/drivers/imu/fxas21002c/fxas21002c.cpp b/src/drivers/imu/fxas21002c/fxas21002c.cpp index 76c7eae9b8..30b17f033f 100644 --- a/src/drivers/imu/fxas21002c/fxas21002c.cpp +++ b/src/drivers/imu/fxas21002c/fxas21002c.cpp @@ -745,10 +745,6 @@ FXAS21002C::ioctl(struct file *filp, int cmd, unsigned long arg) memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale)); return OK; - case GYROIOCSRANGE: - /* arg should be in dps */ - return set_range(arg); - case GYROIOCGRANGE: /* convert to dps and round */ return (unsigned long)(_gyro_range_rad_s * 180.0f / M_PI_F + 0.5f); diff --git a/src/drivers/imu/l3gd20/l3gd20.cpp b/src/drivers/imu/l3gd20/l3gd20.cpp index a4a6dfd17c..ba9045345d 100644 --- a/src/drivers/imu/l3gd20/l3gd20.cpp +++ b/src/drivers/imu/l3gd20/l3gd20.cpp @@ -669,10 +669,6 @@ L3GD20::ioctl(struct file *filp, int cmd, unsigned long arg) memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale)); return OK; - case GYROIOCSRANGE: - /* arg should be in dps */ - return set_range(arg); - case GYROIOCGRANGE: /* convert to dps and round */ return (unsigned long)(_gyro_range_rad_s * 180.0f / M_PI_F + 0.5f); diff --git a/src/drivers/imu/mpu6000/mpu6000.cpp b/src/drivers/imu/mpu6000/mpu6000.cpp index ec6fbf668e..0121100bd4 100644 --- a/src/drivers/imu/mpu6000/mpu6000.cpp +++ b/src/drivers/imu/mpu6000/mpu6000.cpp @@ -1421,13 +1421,6 @@ MPU6000::gyro_ioctl(struct file *filp, int cmd, unsigned long arg) memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale)); return OK; - case GYROIOCSRANGE: - /* XXX not implemented */ - // XXX change these two values on set: - // _gyro_range_scale = xx - // _gyro_range_rad_s = xx - return -EINVAL; - case GYROIOCGRANGE: return (unsigned long)(_gyro_range_rad_s * 180.0f / M_PI_F + 0.5f); diff --git a/src/drivers/imu/mpu9250/mpu9250.cpp b/src/drivers/imu/mpu9250/mpu9250.cpp index c22c7315d6..d9975b4658 100644 --- a/src/drivers/imu/mpu9250/mpu9250.cpp +++ b/src/drivers/imu/mpu9250/mpu9250.cpp @@ -887,13 +887,6 @@ MPU9250::gyro_ioctl(struct file *filp, int cmd, unsigned long arg) memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale)); return OK; - case GYROIOCSRANGE: - /* XXX not implemented */ - // XXX change these two values on set: - // _gyro_range_scale = xx - // _gyro_range_rad_s = xx - return -EINVAL; - case GYROIOCGRANGE: return (unsigned long)(_gyro_range_rad_s * 180.0f / M_PI_F + 0.5f); diff --git a/src/modules/simulator/gyrosim/gyrosim.cpp b/src/modules/simulator/gyrosim/gyrosim.cpp index 59b4110a43..fd2eb64f90 100644 --- a/src/modules/simulator/gyrosim/gyrosim.cpp +++ b/src/modules/simulator/gyrosim/gyrosim.cpp @@ -755,13 +755,6 @@ GYROSIM::gyro_ioctl(unsigned long cmd, unsigned long arg) memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale)); return OK; - case GYROIOCSRANGE: - /* XXX not implemented */ - // XXX change these two values on set: - // _gyro_range_scale = xx - // _gyro_range_rad_s = xx - return -EINVAL; - case GYROIOCGRANGE: return (unsigned long)(_gyro_range_rad_s * 180.0f / M_PI_F + 0.5f); diff --git a/src/systemcmds/config/config.c b/src/systemcmds/config/config.c index 958550ecb3..b741950055 100644 --- a/src/systemcmds/config/config.c +++ b/src/systemcmds/config/config.c @@ -198,16 +198,6 @@ do_gyro(int argc, char *argv[]) return 1; } - } else if (argc == 3 && !strcmp(argv[0], "range")) { - - /* set the range to i dps */ - ret = ioctl(fd, GYROIOCSRANGE, strtoul(argv[2], NULL, 0)); - - if (ret) { - PX4_ERR("range could not be set"); - return 1; - } - } else { print_usage(); return 1;