This commit is contained in:
Dmitry Borisenko
2022-08-11 18:32:56 +02:00
parent 35da88080d
commit 67004284c4
2 changed files with 4 additions and 3 deletions

View File

@@ -360,7 +360,7 @@
"header": "Исполнительные устройства"
},
{
"name": "28. Кнопка (подключенная физически)",
"name": "28. Кнопка подключенная к пину",
"type": "Writing",
"subtype": "ButtonIn",
"id": "btn",
@@ -376,7 +376,7 @@
"num": 28
},
{
"name": "29. Кнопка управляющая пином (Реле с кнопкой)",
"name": "29. Кнопка управляющая пином (Реле)",
"type": "Writing",
"subtype": "ButtonOut",
"id": "btn",

View File

@@ -23,11 +23,12 @@ void generateOrder(const String& id, const String& value) {
void handleOrder() {
if (orderBuf.length()) {
String order = selectToMarker(orderBuf, ",");
Serial.println("order: " + order);
SerialPrint("i", F("ORDER"), order);
//здесь нужно перебрать все методы execute всех векторов и выполнить те id которых совпали с id события
IoTItem* item = findIoTItem(selectToMarker(order, " "));
if (item) {
SerialPrint("i", F("ORDER"), "order matched " + order);
String valStr = selectToMarkerLast(order, " ");
item->setValue(valStr);
}