aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander/mag_calibration.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-06-10 15:04:56 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-06-10 15:04:56 +0200
commit07fb1e089d1d15d512a8a68b03020b1ffd877ed3 (patch)
treeef3e1204e2371a30e9046a3dc7b5342cd341c82f /src/modules/commander/mag_calibration.cpp
parent96accbf96cbc0262e4bb815d722282a318e8b8c5 (diff)
downloadpx4-firmware-07fb1e089d1d15d512a8a68b03020b1ffd877ed3.tar.gz
px4-firmware-07fb1e089d1d15d512a8a68b03020b1ffd877ed3.tar.bz2
px4-firmware-07fb1e089d1d15d512a8a68b03020b1ffd877ed3.zip
Make commander multi-device aware
Diffstat (limited to 'src/modules/commander/mag_calibration.cpp')
-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 0ead22f77..23900f386 100644
--- a/src/modules/commander/mag_calibration.cpp
+++ b/src/modules/commander/mag_calibration.cpp
@@ -145,7 +145,7 @@ int do_mag_calibration(int mavlink_fd)
}
if (res == OK) {
- int sub_mag = orb_subscribe(ORB_ID(sensor_mag));
+ int sub_mag = orb_subscribe(ORB_ID(sensor_mag0));
struct mag_report mag;
/* limit update rate to get equally spaced measurements over time (in ms) */
@@ -170,7 +170,7 @@ int do_mag_calibration(int mavlink_fd)
int poll_ret = poll(fds, 1, 1000);
if (poll_ret > 0) {
- orb_copy(ORB_ID(sensor_mag), sub_mag, &mag);
+ orb_copy(ORB_ID(sensor_mag0), sub_mag, &mag);
x[calibration_counter] = mag.x;
y[calibration_counter] = mag.y;