delete IOCTL SENSORIOCSQUEUEDEPTH

- only used in test routines
This commit is contained in:
Daniel Agar
2018-11-06 07:43:43 +08:00
committed by Lorenz Meier
parent d2ed091a1d
commit dd0baaee91
31 changed files with 0 additions and 714 deletions
@@ -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;
-26
View File
@@ -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));
-18
View File
@@ -103,24 +103,6 @@ int UavcanBarometerBridge::ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
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;
}
default: {
return CDev::ioctl(filp, cmd, arg);
}
-3
View File
@@ -100,9 +100,6 @@ ssize_t UavcanMagnetometerBridge::read(struct file *filp, char *buffer, size_t b
int UavcanMagnetometerBridge::ioctl(struct file *filp, int cmd, unsigned long arg)
{
switch (cmd) {
case SENSORIOCSQUEUEDEPTH: {
return OK; // Pretend that this stuff is supported to keep APM happy
}
case MAGIOCSSCALE: {
std::memcpy(&_scale, reinterpret_cast<const void *>(arg), sizeof(_scale));