Commander: move sensor interface for mag to new multi-sub

This commit is contained in:
Lorenz Meier
2015-01-25 17:52:36 +01:00
parent 114465aba4
commit 801e9ed4fb
+2 -2
View File
@@ -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;