From 790fa7667c4d8f1d66d435ad9ca60973fee8b196 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 22 Mar 2016 17:20:28 +0100 Subject: [PATCH] commander: cherry-pick fixes --- src/modules/commander/accelerometer_calibration.cpp | 2 +- src/modules/commander/gyro_calibration.cpp | 2 +- src/modules/commander/mag_calibration.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/commander/accelerometer_calibration.cpp b/src/modules/commander/accelerometer_calibration.cpp index 63ef33046c..1daf77826b 100644 --- a/src/modules/commander/accelerometer_calibration.cpp +++ b/src/modules/commander/accelerometer_calibration.cpp @@ -440,7 +440,7 @@ calibrate_return do_accel_calibration_measurements(int mavlink_fd, float (&accel device_id_primary = device_id[i]; } } else { - mavlink_and_console_log_critical(mavlink_log_pub, "[cal] Accel #%u no device id, abort", i); + mavlink_and_console_log_critical(mavlink_fd, "[cal] Accel #%u no device id, abort", i); result = calibrate_return_error; break; } diff --git a/src/modules/commander/gyro_calibration.cpp b/src/modules/commander/gyro_calibration.cpp index 2bc1bafa2b..d4225ded3e 100644 --- a/src/modules/commander/gyro_calibration.cpp +++ b/src/modules/commander/gyro_calibration.cpp @@ -256,7 +256,7 @@ int do_gyro_calibration(int mavlink_fd) device_id_primary = worker_data.device_id[s]; } } else { - mavlink_and_console_log_critical(mavlink_log_pub, "[cal] Gyro #%u no device id, abort", s); + mavlink_and_console_log_critical(mavlink_fd, "[cal] Gyro #%u no device id, abort", s); } } diff --git a/src/modules/commander/mag_calibration.cpp b/src/modules/commander/mag_calibration.cpp index 5588f8c4c3..330cc3cb0c 100644 --- a/src/modules/commander/mag_calibration.cpp +++ b/src/modules/commander/mag_calibration.cpp @@ -483,7 +483,7 @@ calibrate_return mag_calibrate_all(int mavlink_fd, int32_t (&device_ids)[max_mag device_ids[cur_mag] = mag_report.device_id; #endif if (worker_data.sub_mag[cur_mag] < 0) { - mavlink_and_console_log_critical(mavlink_log_pub, "[cal] Mag #%u not found, abort", cur_mag); + mavlink_and_console_log_critical(mavlink_fd, "[cal] Mag #%u not found, abort", cur_mag); result = calibrate_return_error; break; } @@ -498,7 +498,7 @@ calibrate_return mag_calibrate_all(int mavlink_fd, int32_t (&device_ids)[max_mag device_id_primary = device_ids[cur_mag]; } } else { - mavlink_and_console_log_critical(mavlink_log_pub, "[cal] Mag #%u no device id, abort", cur_mag); + mavlink_and_console_log_critical(mavlink_fd, "[cal] Mag #%u no device id, abort", cur_mag); result = calibrate_return_error; break; }