mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-24 16:01:53 +08:00
HMC5883: Always report as internal sensor in SPI mode, since the sensor is fixed to the autopilot assembly.
This commit is contained in:
1 parent
2e4c0c3156
commit
1e6bec6c77
1 file changed
+6
-9
@@ -138,15 +138,12 @@ HMC5883_SPI::ioctl(unsigned operation, unsigned &arg)
|
||||
switch (operation) {
|
||||
|
||||
case MAGIOCGEXTERNAL:
|
||||
|
||||
#ifdef PX4_SPI_BUS_EXT
|
||||
if (_bus == PX4_SPI_BUS_EXT) {
|
||||
return 1;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* Even if this sensor is on the external SPI
|
||||
* bus it is still internal to the autopilot
|
||||
* assembly, so always return 0 for internal.
|
||||
*/
|
||||
return 0;
|
||||
|
||||
case DEVIOCGDEVICEID:
|
||||
return CDev::ioctl(nullptr, operation, arg);
|
||||
|
||||
Reference in new issue
Block a user