delete unused IOCTL MAGIOCGSAMPLERATE

This commit is contained in:
Daniel Agar
2018-11-06 07:43:43 +08:00
committed by Lorenz Meier
parent 60a40ec131
commit 0ea18b2b73
14 changed files with 2 additions and 45 deletions
-3
View File
@@ -69,9 +69,6 @@ struct mag_calibration_s {
#define _MAGIOCBASE (0x2400)
#define _MAGIOC(_n) (_PX4_IOC(_MAGIOCBASE, _n))
/** return the mag internal sample rate in Hz */
#define MAGIOCGSAMPLERATE _MAGIOC(1)
/** set the mag scaling constants to the structure pointed to by (arg) */
#define MAGIOCSSCALE _MAGIOC(4)
-3
View File
@@ -1157,9 +1157,6 @@ ADIS16448::mag_ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
case MAGIOCGSAMPLERATE:
return _sample_rate;
case MAGIOCSSCALE:
/* copy scale in */
memcpy(&_mag_scale, (struct mag_calibration_s *) arg, sizeof(_mag_scale));
@@ -983,9 +983,6 @@ FXOS8701CQ::mag_ioctl(struct file *filp, int cmd, unsigned long arg)
reset();
return OK;
case MAGIOCGSAMPLERATE:
return _mag_samplerate;
case MAGIOCSSCALE:
/* copy scale in */
memcpy(&_mag_scale, (struct mag_calibration_s *) arg, sizeof(_mag_scale));
-3
View File
@@ -994,9 +994,6 @@ LSM303D::mag_ioctl(struct file *filp, int cmd, unsigned long arg)
reset();
return OK;
case MAGIOCGSAMPLERATE:
return _mag_samplerate;
case MAGIOCSSCALE:
/* copy scale in */
memcpy(&_mag_scale, (struct mag_calibration_s *) arg, sizeof(_mag_scale));
-3
View File
@@ -350,9 +350,6 @@ MPU9250_mag::ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
case MAGIOCGSAMPLERATE:
return MPU9250_AK8963_SAMPLE_RATE;
case MAGIOCSSCALE:
/* copy scale in */
memcpy(&_mag_scale, (struct mag_scale *) arg, sizeof(_mag_scale));
@@ -807,9 +807,6 @@ BMM150::ioctl(struct file *filp, int cmd, unsigned long arg)
case MAGIOCEXSTRAP:
return OK;
case MAGIOCGSAMPLERATE:
return 1000000 / _call_interval;
default:
/* give it to the superclass */
return I2C::ioctl(filp, cmd, arg);
@@ -697,10 +697,6 @@ HMC5883::ioctl(struct file *filp, int cmd, unsigned long arg)
case SENSORIOCRESET:
return reset();
case MAGIOCGSAMPLERATE:
/* same as pollrate because device is in single measurement mode*/
return 1000000 / TICK2USEC(_measure_ticks);
case MAGIOCSRANGE:
return set_range(arg);
@@ -677,10 +677,6 @@ IST8310::ioctl(struct file *filp, int cmd, unsigned long arg)
case SENSORIOCRESET:
return reset();
case MAGIOCGSAMPLERATE:
/* same as pollrate because device is in single measurement mode*/
return 1000000 / TICK2USEC(_measure_ticks);
case MAGIOCEXSTRAP:
return set_selftest(arg);
@@ -584,10 +584,6 @@ LIS3MDL::ioctl(struct file *file_pointer, int cmd, unsigned long arg)
case SENSORIOCRESET:
return reset();
case MAGIOCGSAMPLERATE:
/* same as pollrate because device is in single measurement mode*/
return 1000000 / TICK2USEC(_measure_ticks);
case MAGIOCSRANGE:
return set_range(arg);
@@ -308,10 +308,6 @@ LSM303AGR::ioctl(struct file *filp, int cmd, unsigned long arg)
case SENSORIOCRESET:
return reset();
case MAGIOCGSAMPLERATE:
/* same as pollrate because device is in single measurement mode*/
return 1000000 / TICK2USEC(_measure_ticks);
case MAGIOCSSCALE:
/* set new scale factors */
memcpy(&_mag_scale, (struct mag_calibration_s *)arg, sizeof(_mag_scale));
@@ -445,10 +445,6 @@ RM3100::ioctl(struct file *file_pointer, int cmd, unsigned long arg)
case SENSORIOCRESET:
return reset();
case MAGIOCGSAMPLERATE:
/* same as pollrate because device is in single measurement mode*/
return 1000000 / TICK2USEC(_measure_ticks);
case MAGIOCSRANGE:
/* field measurement range cannot be configured for this sensor (8 Gauss) */
return OK;