From c0fd3afc8c03e72d5d1ed3da8202ca6c85267f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Mon, 30 Jan 2017 11:26:52 +0100 Subject: [PATCH] accelerometer_calibration: only notify system once (after last scale change) --- src/modules/commander/accelerometer_calibration.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/modules/commander/accelerometer_calibration.cpp b/src/modules/commander/accelerometer_calibration.cpp index 8b1b39f013..9cb3ccd3ad 100644 --- a/src/modules/commander/accelerometer_calibration.cpp +++ b/src/modules/commander/accelerometer_calibration.cpp @@ -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 */