aboutsummaryrefslogtreecommitdiff
path: root/src/modules/uavcan/sensors/mag.cpp
diff options
context:
space:
mode:
authorHolger Steinhaus <holger@steinhaus-home.de>2014-11-11 11:13:08 +0100
committerHolger Steinhaus <holger@steinhaus-home.de>2014-11-11 11:29:35 +0100
commit51ffb887c39ecfd0cb94879475f032ee65505321 (patch)
tree49acb3996936fafd953cda26c6df5d338e9d3841 /src/modules/uavcan/sensors/mag.cpp
parent88093ebf1af5483d8b5c218adb1ea0c4798ee21e (diff)
downloadpx4-firmware-51ffb887c39ecfd0cb94879475f032ee65505321.tar.gz
px4-firmware-51ffb887c39ecfd0cb94879475f032ee65505321.tar.bz2
px4-firmware-51ffb887c39ecfd0cb94879475f032ee65505321.zip
UAVCAN: initialize device id for mag and baro to allow DEVIOCGDEVICEID ioctl to return useful data
Diffstat (limited to 'src/modules/uavcan/sensors/mag.cpp')
-rw-r--r--src/modules/uavcan/sensors/mag.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/uavcan/sensors/mag.cpp b/src/modules/uavcan/sensors/mag.cpp
index 8e6a9a22f..0d9ea08c5 100644
--- a/src/modules/uavcan/sensors/mag.cpp
+++ b/src/modules/uavcan/sensors/mag.cpp
@@ -49,6 +49,8 @@ UavcanMagnetometerBridge::UavcanMagnetometerBridge(uavcan::INode& node) :
UavcanCDevSensorBridgeBase("uavcan_mag", "/dev/uavcan/mag", MAG_DEVICE_PATH, MAG_TOPICS),
_sub_mag(node)
{
+ _device_id.devid_s.devtype = DRV_MAG_DEVTYPE_HMC5883;
+
_scale.x_scale = 1.0F;
_scale.y_scale = 1.0F;
_scale.z_scale = 1.0F;