From 144b0a179a31f6efafed64cd185b9e0dbd2f9cae Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 31 May 2016 18:08:39 +0100 Subject: [PATCH] df_hmc5883_wrapper: fix wrong variable name --- .../posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp b/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp index 3fc6a33850..978977048a 100644 --- a/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp +++ b/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp @@ -282,9 +282,9 @@ int DfHmc9250Wrapper::_publish(struct mag_sensor_data &data) mag_report.z_raw = NAN; - math::Vector<3> mag_val((data.mag_ga_x - _mag_calibration.x_offset) * _mag_calibration.x_scale, - (data.mag_ga_y - _mag_calibration.y_offset) * _mag_calibration.y_scale, - (data.mag_ga_z - _mag_calibration.z_offset) * _mag_calibration.z_scale); + math::Vector<3> mag_val((data.field_x_ga - _mag_calibration.x_offset) * _mag_calibration.x_scale, + (data.field_y_ga - _mag_calibration.y_offset) * _mag_calibration.y_scale, + (data.field_z_ga - _mag_calibration.z_offset) * _mag_calibration.z_scale); // apply sensor rotation on the accel measurement mag_val = _rotation_matrix * mag_val;