Skip to content
Snippets Groups Projects
Commit 4763a119 authored by Beat Küng's avatar Beat Küng Committed by Lorenz Meier
Browse files

calibration: make sure to notify the system when temp calibration changes

This is needed so that temperature compensation reads in the updated values
and publishes the updated sensor_correction topic.
parent 7ebe2ac0
No related branches found
No related tags found
No related merge requests found
......@@ -345,7 +345,11 @@ int do_accel_calibration(orb_advert_t *mavlink_log_pub)
} else if (axis_index == 2) {
val *= accel_scale.z_scale;
}
failed |= (PX4_OK != param_set_no_notification(handle, &val));
if (axis_index == 2) { //notify the system about the change, but only once, for the last one
failed |= (PX4_OK != param_set(handle, &val));
} else {
failed |= (PX4_OK != param_set_no_notification(handle, &val));
}
}
// Ensure the calibration values used the driver are at default settings
......
......@@ -392,7 +392,11 @@ int do_gyro_calibration(orb_advert_t *mavlink_log_pub)
} else if (axis_index == 2) {
val += worker_data.gyro_scale[uorb_index].z_offset;
}
failed |= (PX4_OK != param_set_no_notification(handle, &val));
if (axis_index == 2) { //notify the system about the change, but only once, for the last one
failed |= (PX4_OK != param_set(handle, &val));
} else {
failed |= (PX4_OK != param_set_no_notification(handle, &val));
}
}
// Ensure the calibration values used the driver are at default settings
worker_data.gyro_scale[uorb_index].x_offset = 0.f;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment