mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 03:54:08 +08:00
delete unused IOCTL GYROIOCSRANGE
This commit is contained in:
parent
aaf0b6fb5c
commit
068dcb37df
@ -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)
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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…
x
Reference in New Issue
Block a user