delete unused IOCTL ACCELIOCGEXTERNAL

This commit is contained in:
Daniel Agar
2018-11-03 14:41:20 -04:00
committed by Lorenz Meier
parent e759e0e1a5
commit 22c9fb7290
8 changed files with 2 additions and 42 deletions
-3
View File
@@ -76,7 +76,4 @@ struct accel_calibration_s {
/** set the accel scaling constants to the structure pointed to by (arg) */
#define ACCELIOCSSCALE _ACCELIOC(5)
/** determine if hardware is external or onboard */
#define ACCELIOCGEXTERNAL _ACCELIOC(12)
#endif /* _DRV_ACCEL_H */
+1 -10
View File
@@ -373,11 +373,7 @@ private:
*
* @return true if the sensor is not on the main MCU board
*/
bool is_external()
{
unsigned dummy;
return _interface->ioctl(ACCELIOCGEXTERNAL, dummy);
}
bool is_external() { return _interface->external(); }
/**
* Measurement self test
@@ -1263,8 +1259,6 @@ MPU6000::gyro_read(struct file *filp, char *buffer, size_t buflen)
int
MPU6000::ioctl(struct file *filp, int cmd, unsigned long arg)
{
unsigned dummy = arg;
switch (cmd) {
case SENSORIOCRESET:
@@ -1380,9 +1374,6 @@ MPU6000::ioctl(struct file *filp, int cmd, unsigned long arg)
}
}
case ACCELIOCGEXTERNAL:
return _interface->ioctl(cmd, dummy);
default:
/* give it to the superclass */
return CDev::ioctl(filp, cmd, arg);
-4
View File
@@ -102,10 +102,6 @@ MPU6000_I2C::ioctl(unsigned operation, unsigned &arg)
int ret;
switch (operation) {
case ACCELIOCGEXTERNAL:
return external();
case DEVIOCGDEVICEID:
return CDev::ioctl(nullptr, operation, arg);
-6
View File
@@ -234,12 +234,6 @@ MPU6000_SPI::ioctl(unsigned operation, unsigned &arg)
int ret;
switch (operation) {
case ACCELIOCGEXTERNAL:
external();
/* FALLTHROUGH */
case DEVIOCGDEVICEID:
return CDev::ioctl(nullptr, operation, arg);
-4
View File
@@ -100,10 +100,6 @@ AK8963_I2C::ioctl(unsigned operation, unsigned &arg)
int ret;
switch (operation) {
case ACCELIOCGEXTERNAL:
return external();
case DEVIOCGDEVICEID:
return CDev::ioctl(nullptr, operation, arg);
+1 -5
View File
@@ -490,11 +490,7 @@ private:
*
* @return true if the sensor is not on the main MCU board
*/
bool is_external()
{
unsigned dummy;
return _interface->ioctl(ACCELIOCGEXTERNAL, dummy);
}
bool is_external() { return _interface->external(); }
/**
* Measurement self test
-4
View File
@@ -97,10 +97,6 @@ MPU9250_I2C::ioctl(unsigned operation, unsigned &arg)
int ret = PX4_ERROR;
switch (operation) {
case ACCELIOCGEXTERNAL:
return external();
case DEVIOCGDEVICEID:
return CDev::ioctl(nullptr, operation, arg);
-6
View File
@@ -130,12 +130,6 @@ MPU9250_SPI::ioctl(unsigned operation, unsigned &arg)
int ret;
switch (operation) {
case ACCELIOCGEXTERNAL:
external();
/* FALLTHROUGH */
case DEVIOCGDEVICEID:
return CDev::ioctl(nullptr, operation, arg);