mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 02:36:37 +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) */
|
/** set the accel scaling constants to the structure pointed to by (arg) */
|
||||||
#define ACCELIOCSSCALE _ACCELIOC(5)
|
#define ACCELIOCSSCALE _ACCELIOC(5)
|
||||||
|
|
||||||
/** determine if hardware is external or onboard */
|
|
||||||
#define ACCELIOCGEXTERNAL _ACCELIOC(12)
|
|
||||||
|
|
||||||
#endif /* _DRV_ACCEL_H */
|
#endif /* _DRV_ACCEL_H */
|
||||||
|
|||||||
@@ -373,11 +373,7 @@ private:
|
|||||||
*
|
*
|
||||||
* @return true if the sensor is not on the main MCU board
|
* @return true if the sensor is not on the main MCU board
|
||||||
*/
|
*/
|
||||||
bool is_external()
|
bool is_external() { return _interface->external(); }
|
||||||
{
|
|
||||||
unsigned dummy;
|
|
||||||
return _interface->ioctl(ACCELIOCGEXTERNAL, dummy);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Measurement self test
|
* Measurement self test
|
||||||
@@ -1263,8 +1259,6 @@ MPU6000::gyro_read(struct file *filp, char *buffer, size_t buflen)
|
|||||||
int
|
int
|
||||||
MPU6000::ioctl(struct file *filp, int cmd, unsigned long arg)
|
MPU6000::ioctl(struct file *filp, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
unsigned dummy = arg;
|
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
|
|
||||||
case SENSORIOCRESET:
|
case SENSORIOCRESET:
|
||||||
@@ -1380,9 +1374,6 @@ MPU6000::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case ACCELIOCGEXTERNAL:
|
|
||||||
return _interface->ioctl(cmd, dummy);
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* give it to the superclass */
|
/* give it to the superclass */
|
||||||
return CDev::ioctl(filp, cmd, arg);
|
return CDev::ioctl(filp, cmd, arg);
|
||||||
|
|||||||
@@ -102,10 +102,6 @@ MPU6000_I2C::ioctl(unsigned operation, unsigned &arg)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
switch (operation) {
|
switch (operation) {
|
||||||
|
|
||||||
case ACCELIOCGEXTERNAL:
|
|
||||||
return external();
|
|
||||||
|
|
||||||
case DEVIOCGDEVICEID:
|
case DEVIOCGDEVICEID:
|
||||||
return CDev::ioctl(nullptr, operation, arg);
|
return CDev::ioctl(nullptr, operation, arg);
|
||||||
|
|
||||||
|
|||||||
@@ -234,12 +234,6 @@ MPU6000_SPI::ioctl(unsigned operation, unsigned &arg)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
switch (operation) {
|
switch (operation) {
|
||||||
|
|
||||||
case ACCELIOCGEXTERNAL:
|
|
||||||
external();
|
|
||||||
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
|
|
||||||
case DEVIOCGDEVICEID:
|
case DEVIOCGDEVICEID:
|
||||||
return CDev::ioctl(nullptr, operation, arg);
|
return CDev::ioctl(nullptr, operation, arg);
|
||||||
|
|
||||||
|
|||||||
@@ -100,10 +100,6 @@ AK8963_I2C::ioctl(unsigned operation, unsigned &arg)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
switch (operation) {
|
switch (operation) {
|
||||||
|
|
||||||
case ACCELIOCGEXTERNAL:
|
|
||||||
return external();
|
|
||||||
|
|
||||||
case DEVIOCGDEVICEID:
|
case DEVIOCGDEVICEID:
|
||||||
return CDev::ioctl(nullptr, operation, arg);
|
return CDev::ioctl(nullptr, operation, arg);
|
||||||
|
|
||||||
|
|||||||
@@ -490,11 +490,7 @@ private:
|
|||||||
*
|
*
|
||||||
* @return true if the sensor is not on the main MCU board
|
* @return true if the sensor is not on the main MCU board
|
||||||
*/
|
*/
|
||||||
bool is_external()
|
bool is_external() { return _interface->external(); }
|
||||||
{
|
|
||||||
unsigned dummy;
|
|
||||||
return _interface->ioctl(ACCELIOCGEXTERNAL, dummy);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Measurement self test
|
* Measurement self test
|
||||||
|
|||||||
@@ -97,10 +97,6 @@ MPU9250_I2C::ioctl(unsigned operation, unsigned &arg)
|
|||||||
int ret = PX4_ERROR;
|
int ret = PX4_ERROR;
|
||||||
|
|
||||||
switch (operation) {
|
switch (operation) {
|
||||||
|
|
||||||
case ACCELIOCGEXTERNAL:
|
|
||||||
return external();
|
|
||||||
|
|
||||||
case DEVIOCGDEVICEID:
|
case DEVIOCGDEVICEID:
|
||||||
return CDev::ioctl(nullptr, operation, arg);
|
return CDev::ioctl(nullptr, operation, arg);
|
||||||
|
|
||||||
|
|||||||
@@ -130,12 +130,6 @@ MPU9250_SPI::ioctl(unsigned operation, unsigned &arg)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
switch (operation) {
|
switch (operation) {
|
||||||
|
|
||||||
case ACCELIOCGEXTERNAL:
|
|
||||||
external();
|
|
||||||
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
|
|
||||||
case DEVIOCGDEVICEID:
|
case DEVIOCGDEVICEID:
|
||||||
return CDev::ioctl(nullptr, operation, arg);
|
return CDev::ioctl(nullptr, operation, arg);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user