forked from Archive/PX4-Autopilot
delete unused IOCTL MAGIOCGRANGE
This commit is contained in:
parent
0ea18b2b73
commit
d76155107c
|
@ -78,9 +78,6 @@ struct mag_calibration_s {
|
|||
/** set the measurement range to handle (at least) arg Gauss */
|
||||
#define MAGIOCSRANGE _MAGIOC(6)
|
||||
|
||||
/** return the current mag measurement range in Gauss */
|
||||
#define MAGIOCGRANGE _MAGIOC(7)
|
||||
|
||||
/** perform self-calibration, update scale factors to canonical units */
|
||||
#define MAGIOCCALIBRATE _MAGIOC(8)
|
||||
|
||||
|
|
|
@ -1167,9 +1167,6 @@ ADIS16448::mag_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
memcpy((struct mag_calibration_s *) arg, &_mag_scale, sizeof(_mag_scale));
|
||||
return OK;
|
||||
|
||||
case MAGIOCGRANGE:
|
||||
return (unsigned long)(_mag_range_mgauss);
|
||||
|
||||
default:
|
||||
/* give it to the superclass */
|
||||
return SPI::ioctl(filp, cmd, arg);
|
||||
|
|
|
@ -700,9 +700,6 @@ HMC5883::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||
case MAGIOCSRANGE:
|
||||
return set_range(arg);
|
||||
|
||||
case MAGIOCGRANGE:
|
||||
return _range_ga;
|
||||
|
||||
case MAGIOCSSCALE:
|
||||
/* set new scale factors */
|
||||
memcpy(&_scale, (struct mag_calibration_s *)arg, sizeof(_scale));
|
||||
|
|
|
@ -587,9 +587,6 @@ LIS3MDL::ioctl(struct file *file_pointer, int cmd, unsigned long arg)
|
|||
case MAGIOCSRANGE:
|
||||
return set_range(arg);
|
||||
|
||||
case MAGIOCGRANGE:
|
||||
return _range_ga;
|
||||
|
||||
case MAGIOCSSCALE:
|
||||
/* set new scale factors */
|
||||
memcpy(&_scale, (struct mag_calibration_s *)arg, sizeof(_scale));
|
||||
|
|
|
@ -449,10 +449,6 @@ RM3100::ioctl(struct file *file_pointer, int cmd, unsigned long arg)
|
|||
/* field measurement range cannot be configured for this sensor (8 Gauss) */
|
||||
return OK;
|
||||
|
||||
case MAGIOCGRANGE:
|
||||
/* field measurement range cannot be configured for this sensor (8 Gauss) */
|
||||
return 8;
|
||||
|
||||
case MAGIOCSSCALE:
|
||||
/* set new scale factors */
|
||||
memcpy(&_scale, (struct mag_calibration_s *)arg, sizeof(_scale));
|
||||
|
|
|
@ -672,9 +672,6 @@ ACCELSIM::mag_ioctl(unsigned long cmd, unsigned long arg)
|
|||
case MAGIOCSRANGE:
|
||||
return mag_set_range(arg);
|
||||
|
||||
case MAGIOCGRANGE:
|
||||
return _mag_range_ga;
|
||||
|
||||
case MAGIOCGEXTERNAL:
|
||||
/* Even if this sensor is on the "external" SPI bus
|
||||
* it is still fixed to the autopilot assembly,
|
||||
|
|
|
@ -120,7 +120,6 @@ int UavcanMagnetometerBridge::ioctl(struct file *filp, int cmd, unsigned long ar
|
|||
|
||||
case MAGIOCCALIBRATE:
|
||||
case MAGIOCSRANGE:
|
||||
case MAGIOCGRANGE:
|
||||
case MAGIOCEXSTRAP: {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -249,14 +249,13 @@ do_mag(int argc, char *argv[])
|
|||
}
|
||||
|
||||
int prate = ioctl(fd, SENSORIOCGPOLLRATE, 0);
|
||||
int range = ioctl(fd, MAGIOCGRANGE, 0);
|
||||
int id = ioctl(fd, DEVIOCGDEVICEID, 0);
|
||||
int32_t calibration_id = 0;
|
||||
|
||||
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\tread rate:\t%d Hz\n\trange:\t%d Ga",
|
||||
id, calibration_id, prate, range);
|
||||
PX4_INFO("mag: \n\tdevice id:\t0x%X\t(calibration is for device id 0x%X)\n\tread rate:\t%d Hz",
|
||||
id, calibration_id, prate);
|
||||
|
||||
close(fd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue