From 675b86550fe15a7c7cbd94c030f4907c5eb7ef18 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sat, 28 Feb 2015 20:49:54 +0100 Subject: Sensors: Clear old mag rotation param once new values is present --- src/modules/sensors/sensors.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/modules/sensors/sensors.cpp') diff --git a/src/modules/sensors/sensors.cpp b/src/modules/sensors/sensors.cpp index 1d392b0da..527ca2210 100644 --- a/src/modules/sensors/sensors.cpp +++ b/src/modules/sensors/sensors.cpp @@ -1543,6 +1543,9 @@ Sensors::parameter_update_poll(bool forced) if ((deprecated_mag_rot != 0) && (mag_rot <= 0)) { mag_rot = deprecated_mag_rot; param_set_no_notification(param_find(str), &mag_rot); + /* clear the old param, not supported in GUI anyway */ + deprecated_mag_rot = 0; + param_set_no_notification(param_find("SENS_EXT_MAG_ROT"), &deprecated_mag_rot); } /* handling of transition from internal to external */ -- cgit v1.2.3