delete unused IOCTLs ACCELIOCSSAMPLERATE and ACCEL_SAMPLERATE_DEFAULT

This commit is contained in:
Daniel Agar
2018-11-06 07:43:43 +08:00
committed by Lorenz Meier
parent eddbd3fc4b
commit e759e0e1a5
13 changed files with 6 additions and 64 deletions
-6
View File
@@ -73,12 +73,6 @@ struct accel_calibration_s {
#define _ACCELIOCBASE (0x2100)
#define _ACCELIOC(_n) (_PX4_IOC(_ACCELIOCBASE, _n))
/** set the accel internal sample rate to at least (arg) Hz */
#define ACCELIOCSSAMPLERATE _ACCELIOC(0)
#define ACCEL_SAMPLERATE_DEFAULT 1000003 /**< default sample rate */
/** set the accel scaling constants to the structure pointed to by (arg) */
#define ACCELIOCSSCALE _ACCELIOC(5)
-4
View File
@@ -1068,10 +1068,6 @@ ADIS16448::ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
case ACCELIOCSSAMPLERATE:
_set_sample_rate(arg);
return OK;
case ACCELIOCSSCALE: {
/* copy scale, but only if off by a few percent */
struct accel_calibration_s *s = (struct accel_calibration_s *) arg;
-4
View File
@@ -407,10 +407,6 @@ ADIS16477::ioctl(struct file *filp, int cmd, unsigned long arg)
return 1000000 / _call_interval;
case ACCELIOCSSAMPLERATE:
_set_sample_rate(arg);
return OK;
case ACCELIOCSSCALE: {
/* copy scale, but only if off by a few percent */
struct accel_calibration_s *s = (struct accel_calibration_s *) arg;
-3
View File
@@ -473,9 +473,6 @@ BMA180::ioctl(struct file *filp, int cmd, unsigned long arg)
/* XXX implement */
return -EINVAL;
case ACCELIOCSSAMPLERATE: /* sensor sample rate is not (really) adjustable */
return -EINVAL;
case ACCELIOCSSCALE:
/* copy scale in */
memcpy(&_accel_scale, (struct accel_calibration_s *) arg, sizeof(_accel_scale));
-3
View File
@@ -415,9 +415,6 @@ BMI055_accel::ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
case ACCELIOCSSAMPLERATE:
return accel_set_sample_rate(arg);
case ACCELIOCSSCALE: {
/* copy scale, but only if off by a few percent */
struct accel_calibration_s *s = (struct accel_calibration_s *) arg;
-3
View File
@@ -651,9 +651,6 @@ BMI160::ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
case ACCELIOCSSAMPLERATE:
return accel_set_sample_rate(arg);
case ACCELIOCSSCALE: {
/* copy scale, but only if off by a few percent */
struct accel_calibration_s *s = (struct accel_calibration_s *) arg;
+1 -4
View File
@@ -882,9 +882,6 @@ FXOS8701CQ::ioctl(struct file *filp, int cmd, unsigned long arg)
reset();
return OK;
case ACCELIOCSSAMPLERATE:
return accel_set_samplerate(arg);
case ACCELIOCSSCALE: {
/* copy scale, but only if off by a few percent */
struct accel_calibration_s *s = (struct accel_calibration_s *) arg;
@@ -1137,7 +1134,7 @@ FXOS8701CQ::accel_set_samplerate(unsigned frequency)
uint8_t active = read_reg(FXOS8701CQ_CTRL_REG1) & CTRL_REG1_ACTIVE;
if (frequency == 0 || frequency == ACCEL_SAMPLERATE_DEFAULT) {
if (frequency == 0) {
frequency = FXOS8701C_ACCEL_DEFAULT_RATE;
}
+1 -4
View File
@@ -894,9 +894,6 @@ LSM303D::ioctl(struct file *filp, int cmd, unsigned long arg)
reset();
return OK;
case ACCELIOCSSAMPLERATE:
return accel_set_samplerate(arg);
case ACCELIOCSSCALE: {
/* copy scale, but only if off by a few percent */
struct accel_calibration_s *s = (struct accel_calibration_s *) arg;
@@ -1214,7 +1211,7 @@ LSM303D::accel_set_samplerate(unsigned frequency)
uint8_t setbits = 0;
uint8_t clearbits = REG1_RATE_BITS_A;
if (frequency == 0 || frequency == ACCEL_SAMPLERATE_DEFAULT) {
if (frequency == 0) {
frequency = 1600;
}
+1 -6
View File
@@ -909,8 +909,7 @@ void
MPU6000::_set_sample_rate(unsigned desired_sample_rate_hz)
{
if (desired_sample_rate_hz == 0 ||
desired_sample_rate_hz == GYRO_SAMPLERATE_DEFAULT ||
desired_sample_rate_hz == ACCEL_SAMPLERATE_DEFAULT) {
desired_sample_rate_hz == GYRO_SAMPLERATE_DEFAULT) {
desired_sample_rate_hz = MPU6000_GYRO_DEFAULT_RATE;
}
@@ -1367,10 +1366,6 @@ MPU6000::ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
case ACCELIOCSSAMPLERATE:
_set_sample_rate(arg);
return OK;
case ACCELIOCSSCALE: {
/* copy scale, but only if off by a few percent */
struct accel_calibration_s *s = (struct accel_calibration_s *) arg;
+1 -6
View File
@@ -553,8 +553,7 @@ void
MPU9250::_set_sample_rate(unsigned desired_sample_rate_hz)
{
if (desired_sample_rate_hz == 0 ||
desired_sample_rate_hz == GYRO_SAMPLERATE_DEFAULT ||
desired_sample_rate_hz == ACCEL_SAMPLERATE_DEFAULT) {
desired_sample_rate_hz == GYRO_SAMPLERATE_DEFAULT) {
desired_sample_rate_hz = MPU9250_GYRO_DEFAULT_RATE;
}
@@ -827,10 +826,6 @@ MPU9250::ioctl(struct file *filp, int cmd, unsigned long arg)
return OK;
}
case ACCELIOCSSAMPLERATE:
_set_sample_rate(arg);
return OK;
case ACCELIOCSSCALE: {
/* copy scale, but only if off by a few percent */
struct accel_calibration_s *s = (struct accel_calibration_s *) arg;