mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 08:36:08 +08:00
delete unused IOCTL ACCELIOCGEXTERNAL
This commit is contained in:
committed by
Lorenz Meier
parent
e759e0e1a5
commit
22c9fb7290
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user