From eaa68f32e3277738467dc869d8e79a2537a41818 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 10 Dec 2016 08:15:11 +1100 Subject: [PATCH] AP_Param: avoid a notify if value is already correct --- libraries/AP_Param/AP_Param.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Param/AP_Param.h b/libraries/AP_Param/AP_Param.h index f5568d9a4e..5fa05bb3d1 100644 --- a/libraries/AP_Param/AP_Param.h +++ b/libraries/AP_Param/AP_Param.h @@ -536,8 +536,10 @@ public: /// Value setter - set value, tell GCS /// void set_and_notify(const T &v) { - set(v); - notify(); + if (v != _value) { + set(v); + notify(); + } } /// Combined set and save