diff --git a/data_svelte/build/bundle.css.gz b/data_svelte/build/bundle.css.gz
index ed8be8a5..c361c2f9 100644
Binary files a/data_svelte/build/bundle.css.gz and b/data_svelte/build/bundle.css.gz differ
diff --git a/data_svelte/build/bundle.js.gz b/data_svelte/build/bundle.js.gz
index 3264e402..06ffd07e 100644
Binary files a/data_svelte/build/bundle.js.gz and b/data_svelte/build/bundle.js.gz differ
diff --git a/data_svelte/index.html b/data_svelte/index.html
index 8767167e..b036526e 100644
--- a/data_svelte/index.html
+++ b/data_svelte/index.html
@@ -4,12 +4,12 @@
-
IoT Manager 4.3.2
+ IoT Manager 4.3.4
-
+
-
+
diff --git a/data_svelte/items.json b/data_svelte/items.json
index fd04a12f..84e13441 100644
--- a/data_svelte/items.json
+++ b/data_svelte/items.json
@@ -429,21 +429,8 @@
"num": 33
},
{
- "name": "34. UART",
- "type": "Reading",
- "subtype": "SoftUART",
- "page": "",
- "descr": "",
- "widget": "nil",
- "id": "u",
- "tx": 12,
- "rx": 13,
- "speed": 9600,
- "num": 34
- },
- {
- "name": "35. HC-SR04 Ультразвуковой дальномер",
- "num": 35,
+ "name": "34. HC-SR04 Ультразвуковой дальномер",
+ "num": 34,
"type": "Reading",
"subtype": "Sonar",
"id": "sonar",
@@ -454,6 +441,19 @@
"pinEcho": 4,
"int": 5
},
+ {
+ "name": "35. UART",
+ "type": "Reading",
+ "subtype": "UART",
+ "page": "",
+ "descr": "",
+ "widget": "nil",
+ "id": "u",
+ "tx": 12,
+ "rx": 13,
+ "speed": 9600,
+ "num": 35
+ },
{
"header": "Исполнительные устройства"
},
diff --git a/myProfile.json b/myProfile.json
index a50d1c86..c59a5521 100644
--- a/myProfile.json
+++ b/myProfile.json
@@ -118,11 +118,11 @@
"active": true
},
{
- "path": "src\\modules\\sensors\\SoftUart",
+ "path": "src\\modules\\sensors\\Sonar",
"active": true
},
{
- "path": "src\\modules\\sensors\\Sonar",
+ "path": "src\\modules\\sensors\\UART",
"active": true
}
],
diff --git a/platformio.ini b/platformio.ini
index b19a3d3d..b565b69f 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -87,8 +87,8 @@ build_src_filter =
+
+
+
- +
+
+ +
+
+
+
diff --git a/src/modules/API.cpp b/src/modules/API.cpp
index f1ce947d..b141dc71 100644
--- a/src/modules/API.cpp
+++ b/src/modules/API.cpp
@@ -17,8 +17,8 @@ void* getAPI_Pzem004(String subtype, String params);
void* getAPI_RCswitch(String subtype, String params);
void* getAPI_Sht20(String subtype, String params);
void* getAPI_Sht30(String subtype, String params);
-void* getAPI_SoftUART(String subtype, String params);
void* getAPI_Sonar(String subtype, String params);
+void* getAPI_UART(String subtype, String params);
void* getAPI_ButtonIn(String subtype, String params);
void* getAPI_ButtonOut(String subtype, String params);
void* getAPI_IoTServo(String subtype, String params);
@@ -47,8 +47,8 @@ if ((tmpAPI = getAPI_Pzem004(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_RCswitch(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Sht20(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Sht30(subtype, params)) != nullptr) return tmpAPI;
-if ((tmpAPI = getAPI_SoftUART(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Sonar(subtype, params)) != nullptr) return tmpAPI;
+if ((tmpAPI = getAPI_UART(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_ButtonIn(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_ButtonOut(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_IoTServo(subtype, params)) != nullptr) return tmpAPI;
diff --git a/src/modules/sensors/Pzem004t/Pzem004t.cpp b/src/modules/sensors/Pzem004t/Pzem004t.cpp
index 3793a018..1bbf4bbd 100644
--- a/src/modules/sensors/Pzem004t/Pzem004t.cpp
+++ b/src/modules/sensors/Pzem004t/Pzem004t.cpp
@@ -3,7 +3,7 @@
#include "classes/IoTItem.h"
#include "PZEMSensor.h"
-#include "modules/sensors/SoftUart/SoftUart.h"
+#include "modules/sensors/UART/Uart.h"
PZEMSensor* pzem;
diff --git a/src/modules/sensors/SoftUart/SoftUart.cpp b/src/modules/sensors/UART/Uart.cpp
similarity index 82%
rename from src/modules/sensors/SoftUart/SoftUart.cpp
rename to src/modules/sensors/UART/Uart.cpp
index 02d68dcc..052acb61 100644
--- a/src/modules/sensors/SoftUart/SoftUart.cpp
+++ b/src/modules/sensors/UART/Uart.cpp
@@ -3,7 +3,7 @@
#include "classes/IoTItem.h"
#include
-#include "modules/sensors/SoftUart/SoftUart.h"
+#include "modules/sensors/UART/Uart.h"
#ifdef ESP8266
SoftwareSerial* myUART = nullptr;
@@ -11,14 +11,14 @@ SoftwareSerial* myUART = nullptr;
HardwareSerial* myUART = nullptr;
#endif
-class SoftUART : public IoTItem {
+class UART : public IoTItem {
private:
int tx;
int rx;
int speed;
public:
- SoftUART(String parameters) : IoTItem(parameters) {
+ UART(String parameters) : IoTItem(parameters) {
tx = jsonReadInt(parameters, "tx");
rx = jsonReadInt(parameters, "rx");
speed = jsonReadInt(parameters, "speed");
@@ -60,9 +60,9 @@ class SoftUART : public IoTItem {
}
};
-void* getAPI_SoftUART(String subtype, String param) {
- if (subtype == F("SoftUART")) {
- return new SoftUART(param);
+void* getAPI_UART(String subtype, String param) {
+ if (subtype == F("UART")) {
+ return new UART(param);
} else {
return nullptr;
}
diff --git a/src/modules/sensors/SoftUart/SoftUart.h b/src/modules/sensors/UART/Uart.h
similarity index 100%
rename from src/modules/sensors/SoftUart/SoftUart.h
rename to src/modules/sensors/UART/Uart.h
diff --git a/src/modules/sensors/SoftUart/modinfo.json b/src/modules/sensors/UART/modinfo.json
similarity index 94%
rename from src/modules/sensors/SoftUart/modinfo.json
rename to src/modules/sensors/UART/modinfo.json
index 61de77fb..07b095ff 100644
--- a/src/modules/sensors/SoftUart/modinfo.json
+++ b/src/modules/sensors/UART/modinfo.json
@@ -4,7 +4,7 @@
{
"name": "UART",
"type": "Reading",
- "subtype": "SoftUART",
+ "subtype": "UART",
"page": "",
"descr": "",
"widget": "nil",
@@ -19,7 +19,7 @@
"authorContact": "https://t.me/Dmitry_Borisenko",
"authorGit": "https://github.com/DmitryBorisenko33",
"specialThanks": "Serghei Crasnicov @Serghei63",
- "moduleName": "SoftUART",
+ "moduleName": "UART",
"moduleVersion": "1.0",
"usedRam": 15,
"subTypes": [