mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 03:43:35 +08:00
delete IOCTL SENSORIOCSQUEUEDEPTH
- only used in test routines
This commit is contained in:
committed by
Lorenz Meier
parent
d2ed091a1d
commit
dd0baaee91
@@ -532,19 +532,6 @@ ACCELSIM::devIOCTL(unsigned long cmd, unsigned long arg)
|
||||
}
|
||||
}
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((ul_arg < 1) || (ul_arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!_accel_reports->resize(ul_arg)) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
case SENSORIOCRESET:
|
||||
// Nothing to do for simulator
|
||||
return OK;
|
||||
@@ -612,19 +599,6 @@ ACCELSIM::mag_ioctl(unsigned long cmd, unsigned long arg)
|
||||
}
|
||||
}
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!_mag_reports->resize(arg)) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
case SENSORIOCRESET:
|
||||
// Nothing to do for simulator
|
||||
return OK;
|
||||
|
||||
@@ -216,23 +216,6 @@ AirspeedSim::ioctl(cdev::file_t *filp, int cmd, unsigned long arg)
|
||||
}
|
||||
}
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
//irqstate_t flags = px4_enter_critical_section();
|
||||
if (!_reports->resize(arg)) {
|
||||
//px4_leave_critical_section(flags);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
//px4_leave_critical_section(flags);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
case SENSORIOCRESET:
|
||||
/* XXX implement this */
|
||||
return -EINVAL;
|
||||
|
||||
@@ -667,19 +667,6 @@ GYROSIM::devIOCTL(unsigned long cmd, unsigned long arg)
|
||||
}
|
||||
}
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!_accel_reports->resize(arg)) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
case ACCELIOCSSCALE: {
|
||||
/* copy scale, but only if off by a few percent */
|
||||
struct accel_calibration_s *s = (struct accel_calibration_s *) arg;
|
||||
@@ -710,19 +697,6 @@ GYROSIM::gyro_ioctl(unsigned long cmd, unsigned long arg)
|
||||
case SENSORIOCRESET:
|
||||
return devIOCTL(cmd, arg);
|
||||
|
||||
case SENSORIOCSQUEUEDEPTH: {
|
||||
/* lower bound is mandatory, upper bound is a sanity check */
|
||||
if ((arg < 1) || (arg > 100)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!_gyro_reports->resize(arg)) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
case GYROIOCSSCALE:
|
||||
/* copy scale in */
|
||||
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
||||
|
||||
Reference in New Issue
Block a user