diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-25 17:52:36 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-29 16:33:52 +0100 |
commit | 801e9ed4fbc66d0aa359184be9f4ed3899f10096 (patch) | |
tree | 006f3af094cd6644130e3679a03e8cf81d90e7b6 /src/modules | |
parent | 114465aba4b65ecdc9ffe3f4125afb2391fbdc2b (diff) | |
download | px4-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/modules')
-rw-r--r-- | src/modules/commander/mag_calibration.cpp | 4 |
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; |