Browse Source

delete unused IOCTL GYROIOCSRANGE

sbg
Daniel Agar 6 years ago committed by Lorenz Meier
parent
commit
068dcb37df
  1. 3
      src/drivers/drv_gyro.h
  2. 4
      src/drivers/imu/adis16448/adis16448.cpp
  3. 4
      src/drivers/imu/adis16477/ADIS16477.cpp
  4. 3
      src/drivers/imu/bmi055/BMI055_gyro.cpp
  5. 3
      src/drivers/imu/bmi160/bmi160.cpp
  6. 4
      src/drivers/imu/fxas21002c/fxas21002c.cpp
  7. 4
      src/drivers/imu/l3gd20/l3gd20.cpp
  8. 7
      src/drivers/imu/mpu6000/mpu6000.cpp
  9. 7
      src/drivers/imu/mpu9250/mpu9250.cpp
  10. 7
      src/modules/simulator/gyrosim/gyrosim.cpp
  11. 10
      src/systemcmds/config/config.c

3
src/drivers/drv_gyro.h

@ -82,9 +82,6 @@ struct gyro_calibration_s { @@ -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)

4
src/drivers/imu/adis16448/adis16448.cpp

@ -1129,10 +1129,6 @@ ADIS16448::gyro_ioctl(struct file *filp, int cmd, unsigned long arg) @@ -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);

4
src/drivers/imu/adis16477/ADIS16477.cpp

@ -450,10 +450,6 @@ ADIS16477::gyro_ioctl(struct file *filp, int cmd, unsigned long arg) @@ -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);

3
src/drivers/imu/bmi055/BMI055_gyro.cpp

@ -410,9 +410,6 @@ BMI055_gyro::ioctl(struct file *filp, int cmd, unsigned long arg) @@ -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);

3
src/drivers/imu/bmi160/bmi160.cpp

@ -711,9 +711,6 @@ BMI160::gyro_ioctl(struct file *filp, int cmd, unsigned long arg) @@ -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);

4
src/drivers/imu/fxas21002c/fxas21002c.cpp

@ -745,10 +745,6 @@ FXAS21002C::ioctl(struct file *filp, int cmd, unsigned long arg) @@ -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);

4
src/drivers/imu/l3gd20/l3gd20.cpp

@ -669,10 +669,6 @@ L3GD20::ioctl(struct file *filp, int cmd, unsigned long arg) @@ -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);

7
src/drivers/imu/mpu6000/mpu6000.cpp

@ -1421,13 +1421,6 @@ MPU6000::gyro_ioctl(struct file *filp, int cmd, unsigned long arg) @@ -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);

7
src/drivers/imu/mpu9250/mpu9250.cpp

@ -887,13 +887,6 @@ MPU9250::gyro_ioctl(struct file *filp, int cmd, unsigned long arg) @@ -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);

7
src/modules/simulator/gyrosim/gyrosim.cpp

@ -755,13 +755,6 @@ GYROSIM::gyro_ioctl(unsigned long cmd, unsigned long arg) @@ -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);

10
src/systemcmds/config/config.c

@ -198,16 +198,6 @@ do_gyro(int argc, char *argv[]) @@ -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;

Loading…
Cancel
Save