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

View File

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