forked from Archive/PX4-Autopilot
delete unused IOCTL MAGIOCGSAMPLERATE
This commit is contained in:
parent
60a40ec131
commit
0ea18b2b73
|
@ -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)
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -659,9 +659,6 @@ ACCELSIM::mag_ioctl(unsigned long cmd, unsigned long arg)
|
|||
// Nothing to do for simulator
|
||||
return OK;
|
||||
|
||||
case MAGIOCGSAMPLERATE:
|
||||
return _mag_samplerate;
|
||||
|
||||
case MAGIOCSSCALE:
|
||||
/* copy scale in */
|
||||
memcpy(&_mag_scale, (struct mag_calibration_s *) arg, sizeof(_mag_scale));
|
||||
|
|
|
@ -119,7 +119,6 @@ int UavcanMagnetometerBridge::ioctl(struct file *filp, int cmd, unsigned long ar
|
|||
}
|
||||
|
||||
case MAGIOCCALIBRATE:
|
||||
case MAGIOCGSAMPLERATE:
|
||||
case MAGIOCSRANGE:
|
||||
case MAGIOCGRANGE:
|
||||
case MAGIOCEXSTRAP: {
|
||||
|
|
|
@ -248,7 +248,6 @@ do_mag(int argc, char *argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
int srate = ioctl(fd, MAGIOCGSAMPLERATE, 0);
|
||||
int prate = ioctl(fd, SENSORIOCGPOLLRATE, 0);
|
||||
int range = ioctl(fd, MAGIOCGRANGE, 0);
|
||||
int id = ioctl(fd, DEVIOCGDEVICEID, 0);
|
||||
|
@ -256,8 +255,8 @@ do_mag(int argc, char *argv[])
|
|||
|
||||
param_get(param_find("CAL_MAG0_ID"), &(calibration_id));
|
||||
|
||||
PX4_INFO("mag: \n\tdevice id:\t0x%X\t(calibration is for device id 0x%X)\n\tsample rate:\t%d Hz\n\tread rate:\t%d Hz\n\trange:\t%d Ga",
|
||||
id, calibration_id, srate, prate, range);
|
||||
PX4_INFO("mag: \n\tdevice id:\t0x%X\t(calibration is for device id 0x%X)\n\tread rate:\t%d Hz\n\trange:\t%d Ga",
|
||||
id, calibration_id, prate, range);
|
||||
|
||||
close(fd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue