aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2015-01-25 17:52:36 +0100
committerLorenz Meier <lm@inf.ethz.ch>2015-01-29 16:33:52 +0100
commit801e9ed4fbc66d0aa359184be9f4ed3899f10096 (patch)
tree006f3af094cd6644130e3679a03e8cf81d90e7b6 /src
parent114465aba4b65ecdc9ffe3f4125afb2391fbdc2b (diff)
downloadpx4-firmware-801e9ed4fbc66d0aa359184be9f4ed3899f10096.tar.gz
px4-firmware-801e9ed4fbc66d0aa359184be9f4ed3899f10096.tar.bz2
px4-firmware-801e9ed4fbc66d0aa359184be9f4ed3899f10096.zip
Commander: move sensor interface for mag to new multi-sub
Diffstat (limited to 'src')
-rw-r--r--src/modules/commander/mag_calibration.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/commander/mag_calibration.cpp b/src/modules/commander/mag_calibration.cpp
index 53013fdb9..2afb9a440 100644
--- a/src/modules/commander/mag_calibration.cpp
+++ b/src/modules/commander/mag_calibration.cpp
@@ -149,7 +149,7 @@ int do_mag_calibration(int mavlink_fd)
}
if (res == OK) {
- int sub_mag = orb_subscribe(ORB_ID(sensor_mag0));
+ int sub_mag = orb_subscribe_multi(ORB_ID(sensor_mag), 0);
if (sub_mag < 0) {
mavlink_log_critical(mavlink_fd, "No mag found, abort");
@@ -179,7 +179,7 @@ int do_mag_calibration(int mavlink_fd)
int poll_ret = poll(fds, 1, 1000);
if (poll_ret > 0) {
- orb_copy(ORB_ID(sensor_mag0), sub_mag, &mag);
+ orb_copy(ORB_ID(sensor_mag), sub_mag, &mag);
x[calibration_counter] = mag.x;
y[calibration_counter] = mag.y;