delete MAGIOCSELFTEST

This commit is contained in:
Daniel Agar
2018-08-02 08:05:52 +02:00
committed by Lorenz Meier
parent daee7a4e4e
commit bb9c38a480
14 changed files with 0 additions and 206 deletions
@@ -810,9 +810,6 @@ BMM150::ioctl(struct file *filp, int cmd, unsigned long arg)
case MAGIOCEXSTRAP:
return OK;
case MAGIOCSELFTEST:
return OK;
case MAGIOCSSAMPLERATE:
return ioctl(filp, SENSORIOCSPOLLRATE, arg);
@@ -310,13 +310,6 @@ private:
*/
float meas_to_float(uint8_t in[2]);
/**
* Check the current calibration and update device status
*
* @return 0 if calibration is ok, 1 else
*/
int check_calibration();
/**
* Check the current scale calibration
*
@@ -724,8 +717,6 @@ HMC5883::ioctl(struct file *filp, int cmd, unsigned long arg)
case MAGIOCSSCALE:
/* set new scale factors */
memcpy(&_scale, (struct mag_calibration_s *)arg, sizeof(_scale));
/* check calibration, but not actually return an error */
(void)check_calibration();
return 0;
case MAGIOCGSCALE:
@@ -739,9 +730,6 @@ HMC5883::ioctl(struct file *filp, int cmd, unsigned long arg)
case MAGIOCEXSTRAP:
return set_excitement(arg);
case MAGIOCSELFTEST:
return check_calibration();
case MAGIOCGEXTERNAL:
DEVICE_DEBUG("MAGIOCGEXTERNAL in main driver");
return _interface->ioctl(cmd, dummy);
@@ -1271,19 +1259,6 @@ int HMC5883::check_offset()
return !offset_valid;
}
int HMC5883::check_calibration()
{
bool offset_valid = (check_offset() == OK);
bool scale_valid = (check_scale() == OK);
if (_calibrated != (offset_valid && scale_valid)) {
_calibrated = (offset_valid && scale_valid);
}
/* return 0 if calibrated, 1 else */
return (!_calibrated);
}
int HMC5883::set_excitement(unsigned enable)
{
int ret;
@@ -357,13 +357,6 @@ private:
*/
float meas_to_float(uint8_t in[2]);
/**
* Check the current calibration and update device status
*
* @return 0 if calibration is ok, 1 else
*/
int check_calibration();
/**
* Check the current scale calibration
*
@@ -707,8 +700,6 @@ IST8310::ioctl(struct file *filp, int cmd, unsigned long arg)
case MAGIOCSSCALE:
/* set new scale factors */
memcpy(&_scale, (struct mag_calibration_s *)arg, sizeof(_scale));
/* check calibration, but not actually return an error */
(void)check_calibration();
return 0;
case MAGIOCGSCALE:
@@ -719,11 +710,7 @@ IST8310::ioctl(struct file *filp, int cmd, unsigned long arg)
case MAGIOCCALIBRATE:
return calibrate(filp, arg);
case MAGIOCSELFTEST:
return check_calibration();
case MAGIOCGEXTERNAL:
DEVICE_DEBUG("MAGIOCGEXTERNAL in main driver");
return external();
default:
@@ -1148,25 +1135,6 @@ int IST8310::check_offset()
return !offset_valid;
}
int IST8310::check_calibration()
{
bool offset_valid = (check_offset() == OK);
bool scale_valid = (check_scale() == OK);
if (_calibrated != (offset_valid && scale_valid)) {
if (!scale_valid || !offset_valid) {
PX4_WARN("mag cal status changed %s%s", (scale_valid) ? "" : "scale invalid ",
(offset_valid) ? "" : "offset invalid");
}
_calibrated = (offset_valid && scale_valid);
}
/* return 0 if calibrated, 1 else */
return (!_calibrated);
}
int
IST8310::set_selftest(unsigned enable)
{
@@ -286,22 +286,6 @@ out:
return ret;
}
int
LIS3MDL::check_calibration()
{
bool offset_valid = (check_offset() == OK);
bool scale_valid = (check_scale() == OK);
if (_calibrated != (offset_valid && scale_valid)) {
PX4_WARN("mag cal status changed %s%s", (scale_valid) ? "" : "scale invalid ",
(offset_valid) ? "" : "offset invalid");
_calibrated = (offset_valid && scale_valid);
}
/* return 0 if calibrated, 1 else */
return !_calibrated;
}
int
LIS3MDL::check_offset()
{
@@ -613,8 +597,6 @@ LIS3MDL::ioctl(struct file *file_pointer, int cmd, unsigned long arg)
case MAGIOCSSCALE:
/* set new scale factors */
memcpy(&_scale, (struct mag_calibration_s *)arg, sizeof(_scale));
/* check calibration, but not actually return an error */
(void)check_calibration();
return 0;
case MAGIOCGSCALE:
@@ -622,17 +604,12 @@ LIS3MDL::ioctl(struct file *file_pointer, int cmd, unsigned long arg)
memcpy((struct mag_calibration_s *)arg, &_scale, sizeof(_scale));
return 0;
case MAGIOCCALIBRATE:
return calibrate(file_pointer, arg);
case MAGIOCEXSTRAP:
return set_excitement(arg);
case MAGIOCSELFTEST:
return check_calibration();
case MAGIOCGEXTERNAL:
DEVICE_DEBUG("MAGIOCGEXTERNAL in main driver");
return _interface->ioctl(cmd, dummy);
@@ -199,13 +199,6 @@ private:
*/
int collect();
/**
* Check the current calibration and update device status
*
* @return 0 if calibration is ok, 1 else
*/
int check_calibration();
/**
* Check the current scale calibration
*
@@ -331,7 +331,6 @@ LSM303AGR::ioctl(struct file *filp, int cmd, unsigned long arg)
return 0;
case MAGIOCGEXTERNAL:
DEVICE_DEBUG("MAGIOCGEXTERNAL in main driver");
return external();
default: