From 600e66c34573ff26339a910d70297bdd43ac293d Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <49808844+DmitryBorisenko33@users.noreply.github.com> Date: Wed, 21 Oct 2020 01:08:24 +0300 Subject: [PATCH] 261 --- data/s.conf.csv | 2 +- data/set.device.json | 2 +- data/widgets/btn.json | 6 +++--- data/widgets/select.json | 11 ++++++----- include/Consts.h | 2 +- src/MqttClient.cpp | 11 +---------- 6 files changed, 13 insertions(+), 21 deletions(-) diff --git a/data/s.conf.csv b/data/s.conf.csv index 2d2f8d1d..40b35ae1 100644 --- a/data/s.conf.csv +++ b/data/s.conf.csv @@ -1 +1 @@ -Тип элемента;Id;Виджет;Имя вкладки;Имя виджета;Позиция виджета \ No newline at end of file +Удалить;Тип элемента;Id;Виджет;Имя вкладки;Имя виджета;Позиция виджета \ No newline at end of file diff --git a/data/set.device.json b/data/set.device.json index a75e7bf2..93f7c3fa 100644 --- a/data/set.device.json +++ b/data/set.device.json @@ -43,7 +43,7 @@ }, { "type": "h4", - "title": "LittleFS version: 260" + "title": "LittleFS version: 261" }, { "type": "hr" diff --git a/data/widgets/btn.json b/data/widgets/btn.json index 7b2bf78e..67dcc0d3 100644 --- a/data/widgets/btn.json +++ b/data/widgets/btn.json @@ -1,6 +1,6 @@ { "widget": "btn", - "icon": "switch", - "fill": "outline", - "color": "orange" + "size": "large", + "color": "green", + "send": "test" } \ No newline at end of file diff --git a/data/widgets/select.json b/data/widgets/select.json index c6531b70..bad018fd 100644 --- a/data/widgets/select.json +++ b/data/widgets/select.json @@ -1,7 +1,8 @@ { - "widget" : "select", - "size" : "small", - "fill" : "outline", - "options" : "["Zero item", "First item", "Second item"]", - "status" : 2 + "widget": "select", + "options": [ + "Выключен", + "Включен" + ], + "status": 0 } \ No newline at end of file diff --git a/include/Consts.h b/include/Consts.h index e2228407..8f245051 100644 --- a/include/Consts.h +++ b/include/Consts.h @@ -5,7 +5,7 @@ // #ifdef ESP8266 #define FIRMWARE_NAME "esp8266-iotm" -#define FIRMWARE_VERSION 260 +#define FIRMWARE_VERSION 261 #endif #ifdef ESP32 #define FIRMWARE_NAME "esp32-iotm" diff --git a/src/MqttClient.cpp b/src/MqttClient.cpp index 72b2afaa..34d83bbd 100644 --- a/src/MqttClient.cpp +++ b/src/MqttClient.cpp @@ -117,8 +117,7 @@ void mqttCallback(char* topic, uint8_t* payload, size_t length) { #endif } else if (topicStr.indexOf("control")) { - //iotTeam/12882830-1458415/light 1 - + String key = selectFromMarkerToMarker(topicStr, "/", 3); orderBuf += key; @@ -135,14 +134,6 @@ void mqttCallback(char* topic, uint8_t* payload, size_t length) { if (payloadStr == "1") { myNotAsyncActions->make(do_UPGRADE); } - - } else if (topicStr.indexOf("devc")) { - writeFile(String(DEVICE_CONFIG_FILE), payloadStr); - Device_init(); - - } else if (topicStr.indexOf("devs")) { - writeFile(String(DEVICE_SCENARIO_FILE), payloadStr); - loadScenario(); } }