mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 04:11:36 +08:00
delete unused IOCTL GYROIOCSSAMPLERATE
This commit is contained in:
committed by
Lorenz Meier
parent
60c14fe8f1
commit
3daf37433e
@@ -71,9 +71,6 @@ struct gyro_calibration_s {
|
|||||||
#define _GYROIOCBASE (0x2300)
|
#define _GYROIOCBASE (0x2300)
|
||||||
#define _GYROIOC(_n) (_PX4_IOC(_GYROIOCBASE, _n))
|
#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 */
|
#define GYRO_SAMPLERATE_DEFAULT 1000003 /**< default sample rate */
|
||||||
|
|
||||||
/** set the gyro scaling constants to (arg) */
|
/** set the gyro scaling constants to (arg) */
|
||||||
|
|||||||
@@ -1117,10 +1117,6 @@ ADIS16448::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
case GYROIOCSSAMPLERATE:
|
|
||||||
_set_sample_rate(arg);
|
|
||||||
return OK;
|
|
||||||
|
|
||||||
case GYROIOCSSCALE:
|
case GYROIOCSSCALE:
|
||||||
/* copy scale in */
|
/* copy scale in */
|
||||||
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
||||||
|
|||||||
@@ -438,10 +438,6 @@ ADIS16477::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
case SENSORIOCRESET:
|
case SENSORIOCRESET:
|
||||||
return ioctl(filp, cmd, arg);
|
return ioctl(filp, cmd, arg);
|
||||||
|
|
||||||
case GYROIOCSSAMPLERATE:
|
|
||||||
_set_sample_rate(arg);
|
|
||||||
return OK;
|
|
||||||
|
|
||||||
case GYROIOCSSCALE:
|
case GYROIOCSSCALE:
|
||||||
/* copy scale in */
|
/* copy scale in */
|
||||||
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
||||||
|
|||||||
@@ -399,9 +399,6 @@ BMI055_gyro::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
case GYROIOCSSAMPLERATE:
|
|
||||||
return gyro_set_sample_rate(arg);
|
|
||||||
|
|
||||||
case GYROIOCSSCALE:
|
case GYROIOCSSCALE:
|
||||||
/* copy scale in */
|
/* copy scale in */
|
||||||
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
||||||
|
|||||||
@@ -700,9 +700,6 @@ BMI160::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
case GYROIOCSSAMPLERATE:
|
|
||||||
return gyro_set_sample_rate(arg);
|
|
||||||
|
|
||||||
case GYROIOCSSCALE:
|
case GYROIOCSSCALE:
|
||||||
/* copy scale in */
|
/* copy scale in */
|
||||||
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
||||||
|
|||||||
@@ -734,9 +734,6 @@ FXAS21002C::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
reset();
|
reset();
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
case GYROIOCSSAMPLERATE:
|
|
||||||
return set_samplerate(arg);
|
|
||||||
|
|
||||||
case GYROIOCSSCALE:
|
case GYROIOCSSCALE:
|
||||||
/* copy scale in */
|
/* copy scale in */
|
||||||
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
||||||
|
|||||||
@@ -658,9 +658,6 @@ L3GD20::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
reset();
|
reset();
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
case GYROIOCSSAMPLERATE:
|
|
||||||
return set_samplerate(arg);
|
|
||||||
|
|
||||||
case GYROIOCSSCALE:
|
case GYROIOCSSCALE:
|
||||||
/* copy scale in */
|
/* copy scale in */
|
||||||
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
||||||
|
|||||||
@@ -1409,10 +1409,6 @@ MPU6000::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
case GYROIOCSSAMPLERATE:
|
|
||||||
_set_sample_rate(arg);
|
|
||||||
return OK;
|
|
||||||
|
|
||||||
case GYROIOCSSCALE:
|
case GYROIOCSSCALE:
|
||||||
/* copy scale in */
|
/* copy scale in */
|
||||||
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
||||||
|
|||||||
@@ -875,10 +875,6 @@ MPU9250::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
case GYROIOCSSAMPLERATE:
|
|
||||||
_set_sample_rate(arg);
|
|
||||||
return OK;
|
|
||||||
|
|
||||||
case GYROIOCSSCALE:
|
case GYROIOCSSCALE:
|
||||||
/* copy scale in */
|
/* copy scale in */
|
||||||
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
||||||
|
|||||||
@@ -741,10 +741,6 @@ GYROSIM::gyro_ioctl(unsigned long cmd, unsigned long arg)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
case GYROIOCSSAMPLERATE:
|
|
||||||
_set_sample_rate(arg);
|
|
||||||
return OK;
|
|
||||||
|
|
||||||
case GYROIOCSSCALE:
|
case GYROIOCSSCALE:
|
||||||
/* copy scale in */
|
/* copy scale in */
|
||||||
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
||||||
|
|||||||
@@ -178,17 +178,7 @@ do_gyro(int argc, char *argv[])
|
|||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (argc == 3 && !strcmp(argv[0], "sampling")) {
|
if (argc == 3 && !strcmp(argv[0], "rate")) {
|
||||||
|
|
||||||
/* 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")) {
|
|
||||||
|
|
||||||
/* set the driver to poll at i Hz */
|
/* set the driver to poll at i Hz */
|
||||||
ret = ioctl(fd, SENSORIOCSPOLLRATE, strtoul(argv[2], NULL, 0));
|
ret = ioctl(fd, SENSORIOCSPOLLRATE, strtoul(argv[2], NULL, 0));
|
||||||
|
|||||||
Reference in New Issue
Block a user