Browse Source

AP_Param: avoid a notify if value is already correct

master
Andrew Tridgell 8 years ago committed by Lucas De Marchi
parent
commit
eaa68f32e3
  1. 2
      libraries/AP_Param/AP_Param.h

2
libraries/AP_Param/AP_Param.h

@ -536,9 +536,11 @@ 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) {
if (v != _value) {
set(v); set(v);
notify(); notify();
} }
}
/// Combined set and save /// Combined set and save
/// ///

Loading…
Cancel
Save