diff --git a/extras/test/src/test_publishOnChange.cpp b/extras/test/src/test_publishOnChange.cpp index 8d5f3f533..2896e00b7 100644 --- a/extras/test/src/test_publishOnChange.cpp +++ b/extras/test/src/test_publishOnChange.cpp @@ -21,7 +21,7 @@ SCENARIO("An Arduino cloud property is published on value change", "[ArduinoClou CloudInt test = 10; int const DELTA = 6; - addPropertyToContainer(property_container, test, "test", Permission::ReadWrite).publishOnChange(DELTA); + addPropertyToContainer(property_container, test, "test", Permission::ReadWrite).publishOnChange(DELTA,0); WHEN("test = 10, delta = 6, the property is encoded for the 1st time") { THEN("The property should be encoded") { diff --git a/src/property/Property.h b/src/property/Property.h index 90848b64a..7393da192 100644 --- a/src/property/Property.h +++ b/src/property/Property.h @@ -143,7 +143,7 @@ class Property /* Composable configuration of the Property class */ Property & onUpdate(UpdateCallbackFunc func); Property & onSync(OnSyncCallbackFunc func); - Property & publishOnChange(float const min_delta_property, unsigned long const min_time_between_updates_millis = 0); + Property & publishOnChange(float const min_delta_property, unsigned long const min_time_between_updates_millis = DEFAULT_MIN_TIME_BETWEEN_UPDATES_MILLIS); Property & publishEvery(unsigned long const seconds); Property & publishOnDemand(); Property & encodeTimestamp();