Корректируем алгоритм работы с наследными setValue в модулях

This commit is contained in:
2022-10-22 07:59:26 +03:00
parent 2078ecd17b
commit 55c0cfd718
8 changed files with 8 additions and 8 deletions

View File

@@ -40,7 +40,7 @@ class ButtonOut : public IoTItem {
void setValue(IoTValue Value, bool generateEvent = true) {
value = Value;
IoTgpio.digitalWrite(_pin, _inv?!value.valD:value.valD);
regEvent((String)(int)value.valD, "ButtonOut");
if (generateEvent) regEvent((String)(int)value.valD, "ButtonOut");
}
String getValue() {