diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-07-17 07:33:50 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-07-17 07:33:50 +0200 |
commit | f89062fe3bf56aef23c2ea1a29ae3468694344fa (patch) | |
tree | f6d2ef6e950d21aa1a3baa1fdf58f19a79f41a82 /src/modules/commander | |
parent | 65c952e134daa7c505026ddf2139148fe3092161 (diff) | |
parent | 7705a24f7227035d5932a1288e26ce75cec07fdf (diff) | |
download | px4-firmware-f89062fe3bf56aef23c2ea1a29ae3468694344fa.tar.gz px4-firmware-f89062fe3bf56aef23c2ea1a29ae3468694344fa.tar.bz2 px4-firmware-f89062fe3bf56aef23c2ea1a29ae3468694344fa.zip |
Merge pull request #1186 from PX4/logging
Multi-instance handling for sensors
Diffstat (limited to 'src/modules/commander')
-rw-r--r-- | src/modules/commander/gyro_calibration.cpp | 4 | ||||
-rw-r--r-- | src/modules/commander/mag_calibration.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/commander/gyro_calibration.cpp b/src/modules/commander/gyro_calibration.cpp index cbc2844c1..d89c67c2b 100644 --- a/src/modules/commander/gyro_calibration.cpp +++ b/src/modules/commander/gyro_calibration.cpp @@ -92,7 +92,7 @@ int do_gyro_calibration(int mavlink_fd) unsigned poll_errcount = 0; /* subscribe to gyro sensor topic */ - int sub_sensor_gyro = orb_subscribe(ORB_ID(sensor_gyro)); + int sub_sensor_gyro = orb_subscribe(ORB_ID(sensor_gyro0)); struct gyro_report gyro_report; while (calibration_counter < calibration_count) { @@ -104,7 +104,7 @@ int do_gyro_calibration(int mavlink_fd) int poll_ret = poll(fds, 1, 1000); if (poll_ret > 0) { - orb_copy(ORB_ID(sensor_gyro), sub_sensor_gyro, &gyro_report); + orb_copy(ORB_ID(sensor_gyro0), sub_sensor_gyro, &gyro_report); gyro_scale.x_offset += gyro_report.x; gyro_scale.y_offset += gyro_report.y; gyro_scale.z_offset += gyro_report.z; 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; |