AP_Param: avoid a notify if value is already correct

This commit is contained in:
Andrew Tridgell 2016-12-10 08:15:11 +11:00 committed by Lucas De Marchi
parent 69f3c83c20
commit eaa68f32e3

View File

@ -536,8 +536,10 @@ public:
/// Value setter - set value, tell GCS /// Value setter - set value, tell GCS
/// ///
void set_and_notify(const T &v) { void set_and_notify(const T &v) {
set(v); if (v != _value) {
notify(); set(v);
notify();
}
} }
/// Combined set and save /// Combined set and save