delete unused IOCTL GYROIOCSSAMPLERATE

This commit is contained in:
Daniel Agar 2018-11-03 15:09:37 -04:00 committed by Lorenz Meier
parent 60c14fe8f1
commit 3daf37433e
11 changed files with 1 additions and 46 deletions

View File

@ -71,9 +71,6 @@ struct gyro_calibration_s {
#define _GYROIOCBASE (0x2300)
#define _GYROIOC(_n) (_PX4_IOC(_GYROIOCBASE, _n))
/** set the gyro internal sample rate to at least (arg) Hz */
#define GYROIOCSSAMPLERATE _GYROIOC(0)
#define GYRO_SAMPLERATE_DEFAULT 1000003 /**< default sample rate */
/** set the gyro scaling constants to (arg) */

View File

@ -1117,10 +1117,6 @@ ADIS16448::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
case GYROIOCSSAMPLERATE:
_set_sample_rate(arg);
return OK;
case GYROIOCSSCALE:
/* copy scale in */
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));

View File

@ -438,10 +438,6 @@ ADIS16477::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
case SENSORIOCRESET:
return ioctl(filp, cmd, arg);
case GYROIOCSSAMPLERATE:
_set_sample_rate(arg);
return OK;
case GYROIOCSSCALE:
/* copy scale in */
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));

View File

@ -399,9 +399,6 @@ BMI055_gyro::ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
case GYROIOCSSAMPLERATE:
return gyro_set_sample_rate(arg);
case GYROIOCSSCALE:
/* copy scale in */
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));

View File

@ -700,9 +700,6 @@ BMI160::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
case GYROIOCSSAMPLERATE:
return gyro_set_sample_rate(arg);
case GYROIOCSSCALE:
/* copy scale in */
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));

View File

@ -734,9 +734,6 @@ FXAS21002C::ioctl(struct file *filp, int cmd, unsigned long arg)
reset();
return OK;
case GYROIOCSSAMPLERATE:
return set_samplerate(arg);
case GYROIOCSSCALE:
/* copy scale in */
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));

View File

@ -658,9 +658,6 @@ L3GD20::ioctl(struct file *filp, int cmd, unsigned long arg)
reset();
return OK;
case GYROIOCSSAMPLERATE:
return set_samplerate(arg);
case GYROIOCSSCALE:
/* copy scale in */
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));

View File

@ -1409,10 +1409,6 @@ MPU6000::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
case GYROIOCSSAMPLERATE:
_set_sample_rate(arg);
return OK;
case GYROIOCSSCALE:
/* copy scale in */
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));

View File

@ -875,10 +875,6 @@ MPU9250::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
case GYROIOCSSAMPLERATE:
_set_sample_rate(arg);
return OK;
case GYROIOCSSCALE:
/* copy scale in */
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));

View File

@ -741,10 +741,6 @@ GYROSIM::gyro_ioctl(unsigned long cmd, unsigned long arg)
return OK;
}
case GYROIOCSSAMPLERATE:
_set_sample_rate(arg);
return OK;
case GYROIOCSSCALE:
/* copy scale in */
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));

View File

@ -178,17 +178,7 @@ do_gyro(int argc, char *argv[])
int ret;
if (argc == 3 && !strcmp(argv[0], "sampling")) {
/* set the gyro internal sampling rate up to at least i Hz */
ret = ioctl(fd, GYROIOCSSAMPLERATE, strtoul(argv[2], NULL, 0));
if (ret) {
PX4_ERR("sampling rate could not be set");
return 1;
}
} else if (argc == 3 && !strcmp(argv[0], "rate")) {
if (argc == 3 && !strcmp(argv[0], "rate")) {
/* set the driver to poll at i Hz */
ret = ioctl(fd, SENSORIOCSPOLLRATE, strtoul(argv[2], NULL, 0));