accelerometer_calibration: only notify system once (after last scale change)

This commit is contained in:
Beat Küng
2017-01-30 11:26:52 +01:00
committed by Lorenz Meier
parent 998a407148
commit c0fd3afc8c
@@ -336,11 +336,7 @@ int do_accel_calibration(orb_advert_t *mavlink_log_pub)
} else if (axis_index == 2) {
val += accel_scale.z_offset;
}
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));
}
failed |= (PX4_OK != param_set_no_notification(handle, &val));
}
/* update the _SCL_ terms to include the scale factor */