mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 01:44:06 +08:00
distance sensors delete unused IOCTL SENSORIOCSQUEUEDEPTH
This commit is contained in:
parent
ac04db6084
commit
9cd3e3d1cf
@ -339,11 +339,6 @@ BMP280::ioctl(struct file *filp, int cmd, unsigned long arg)
|
||||
|
||||
switch (arg) {
|
||||
|
||||
case SENSOR_POLLRATE_MANUAL:
|
||||
stop_cycle();
|
||||
_report_ticks = 0;
|
||||
return OK;
|
||||
|
||||
case 0:
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@ -409,24 +409,6 @@ HC_SR04::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ATOMIC_ENTER;
|
||||
|
||||
if (!_reports->resize(arg)) {
|
||||
ATOMIC_LEAVE;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ATOMIC_LEAVE;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
||||
@ -230,24 +230,6 @@ ok:
|
||||
int LidarLiteI2C::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
||||
{
|
||||
switch (cmd) {
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ATOMIC_ENTER;
|
||||
|
||||
if (!_reports->resize(arg)) {
|
||||
ATOMIC_LEAVE;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ATOMIC_LEAVE;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
default: {
|
||||
int result = LidarLite::ioctl(filp, cmd, arg);
|
||||
|
||||
|
||||
@ -405,24 +405,6 @@ MB12XX::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ATOMIC_ENTER;
|
||||
|
||||
if (!_reports->resize(arg)) {
|
||||
ATOMIC_LEAVE;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ATOMIC_LEAVE;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
||||
@ -386,24 +386,6 @@ SF0X::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ATOMIC_ENTER;
|
||||
|
||||
if (!_reports->resize(arg)) {
|
||||
ATOMIC_LEAVE;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ATOMIC_LEAVE;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
||||
@ -405,24 +405,6 @@ SF1XX::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ATOMIC_ENTER;
|
||||
|
||||
if (!_reports->resize(arg)) {
|
||||
ATOMIC_LEAVE;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ATOMIC_LEAVE;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
||||
@ -405,24 +405,6 @@ SRF02::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ATOMIC_ENTER;
|
||||
|
||||
if (!_reports->resize(arg)) {
|
||||
ATOMIC_LEAVE;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ATOMIC_LEAVE;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
||||
@ -483,24 +483,6 @@ TERARANGER::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ATOMIC_ENTER;
|
||||
|
||||
if (!_reports->resize(arg)) {
|
||||
ATOMIC_LEAVE;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ATOMIC_LEAVE;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
||||
@ -423,24 +423,6 @@ TFMINI::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
||||
|
||||
return (1000 / _measure_ticks);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ATOMIC_ENTER;
|
||||
|
||||
if (!_reports->resize(arg)) {
|
||||
ATOMIC_LEAVE;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ATOMIC_LEAVE;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user