Новый веб!

This commit is contained in:
Dmitry Borisenko
2022-09-27 01:24:22 +02:00
parent e809c92c64
commit 1dd1958abc
11 changed files with 32 additions and 32 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -4,12 +4,12 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1" />
<title>IoT Manager 4.3.2</title> <title>IoT Manager 4.3.4</title>
<link rel="icon" type="image/png" href="/favicon.ico" /> <link rel="icon" type="image/png" href="/favicon.ico" />
<link rel="stylesheet" href="/build/bundle.css?432" /> <link rel="stylesheet" href="/build/bundle.css?434" />
<script defer src="/build/bundle.js?432"></script> <script defer src="/build/bundle.js?434"></script>
</head> </head>
<body></body> <body></body>

View File

@@ -429,21 +429,8 @@
"num": 33 "num": 33
}, },
{ {
"name": "34. UART", "name": "34. HC-SR04 Ультразвуковой дальномер",
"type": "Reading", "num": 34,
"subtype": "SoftUART",
"page": "",
"descr": "",
"widget": "nil",
"id": "u",
"tx": 12,
"rx": 13,
"speed": 9600,
"num": 34
},
{
"name": "35. HC-SR04 Ультразвуковой дальномер",
"num": 35,
"type": "Reading", "type": "Reading",
"subtype": "Sonar", "subtype": "Sonar",
"id": "sonar", "id": "sonar",
@@ -454,6 +441,19 @@
"pinEcho": 4, "pinEcho": 4,
"int": 5 "int": 5
}, },
{
"name": "35. UART",
"type": "Reading",
"subtype": "UART",
"page": "",
"descr": "",
"widget": "nil",
"id": "u",
"tx": 12,
"rx": 13,
"speed": 9600,
"num": 35
},
{ {
"header": "Исполнительные устройства" "header": "Исполнительные устройства"
}, },

View File

@@ -118,11 +118,11 @@
"active": true "active": true
}, },
{ {
"path": "src\\modules\\sensors\\SoftUart", "path": "src\\modules\\sensors\\Sonar",
"active": true "active": true
}, },
{ {
"path": "src\\modules\\sensors\\Sonar", "path": "src\\modules\\sensors\\UART",
"active": true "active": true
} }
], ],

View File

@@ -87,8 +87,8 @@ build_src_filter =
+<modules\sensors\RCswitch> +<modules\sensors\RCswitch>
+<modules\sensors\Sht20> +<modules\sensors\Sht20>
+<modules\sensors\Sht30> +<modules\sensors\Sht30>
+<modules\sensors\SoftUart>
+<modules\sensors\Sonar> +<modules\sensors\Sonar>
+<modules\sensors\UART>
+<modules\exec\ButtonIn> +<modules\exec\ButtonIn>
+<modules\exec\ButtonOut> +<modules\exec\ButtonOut>
+<modules\exec\IoTServo> +<modules\exec\IoTServo>

View File

@@ -17,8 +17,8 @@ void* getAPI_Pzem004(String subtype, String params);
void* getAPI_RCswitch(String subtype, String params); void* getAPI_RCswitch(String subtype, String params);
void* getAPI_Sht20(String subtype, String params); void* getAPI_Sht20(String subtype, String params);
void* getAPI_Sht30(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_Sonar(String subtype, String params);
void* getAPI_UART(String subtype, String params);
void* getAPI_ButtonIn(String subtype, String params); void* getAPI_ButtonIn(String subtype, String params);
void* getAPI_ButtonOut(String subtype, String params); void* getAPI_ButtonOut(String subtype, String params);
void* getAPI_IoTServo(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_RCswitch(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_Sht20(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_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_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_ButtonIn(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_ButtonOut(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_ButtonOut(subtype, params)) != nullptr) return tmpAPI;
if ((tmpAPI = getAPI_IoTServo(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_IoTServo(subtype, params)) != nullptr) return tmpAPI;

View File

@@ -3,7 +3,7 @@
#include "classes/IoTItem.h" #include "classes/IoTItem.h"
#include "PZEMSensor.h" #include "PZEMSensor.h"
#include "modules/sensors/SoftUart/SoftUart.h" #include "modules/sensors/UART/Uart.h"
PZEMSensor* pzem; PZEMSensor* pzem;

View File

@@ -3,7 +3,7 @@
#include "classes/IoTItem.h" #include "classes/IoTItem.h"
#include <Arduino.h> #include <Arduino.h>
#include "modules/sensors/SoftUart/SoftUart.h" #include "modules/sensors/UART/Uart.h"
#ifdef ESP8266 #ifdef ESP8266
SoftwareSerial* myUART = nullptr; SoftwareSerial* myUART = nullptr;
@@ -11,14 +11,14 @@ SoftwareSerial* myUART = nullptr;
HardwareSerial* myUART = nullptr; HardwareSerial* myUART = nullptr;
#endif #endif
class SoftUART : public IoTItem { class UART : public IoTItem {
private: private:
int tx; int tx;
int rx; int rx;
int speed; int speed;
public: public:
SoftUART(String parameters) : IoTItem(parameters) { UART(String parameters) : IoTItem(parameters) {
tx = jsonReadInt(parameters, "tx"); tx = jsonReadInt(parameters, "tx");
rx = jsonReadInt(parameters, "rx"); rx = jsonReadInt(parameters, "rx");
speed = jsonReadInt(parameters, "speed"); speed = jsonReadInt(parameters, "speed");
@@ -60,9 +60,9 @@ class SoftUART : public IoTItem {
} }
}; };
void* getAPI_SoftUART(String subtype, String param) { void* getAPI_UART(String subtype, String param) {
if (subtype == F("SoftUART")) { if (subtype == F("UART")) {
return new SoftUART(param); return new UART(param);
} else { } else {
return nullptr; return nullptr;
} }

View File

@@ -4,7 +4,7 @@
{ {
"name": "UART", "name": "UART",
"type": "Reading", "type": "Reading",
"subtype": "SoftUART", "subtype": "UART",
"page": "", "page": "",
"descr": "", "descr": "",
"widget": "nil", "widget": "nil",
@@ -19,7 +19,7 @@
"authorContact": "https://t.me/Dmitry_Borisenko", "authorContact": "https://t.me/Dmitry_Borisenko",
"authorGit": "https://github.com/DmitryBorisenko33", "authorGit": "https://github.com/DmitryBorisenko33",
"specialThanks": "Serghei Crasnicov @Serghei63", "specialThanks": "Serghei Crasnicov @Serghei63",
"moduleName": "SoftUART", "moduleName": "UART",
"moduleVersion": "1.0", "moduleVersion": "1.0",
"usedRam": 15, "usedRam": 15,
"subTypes": [ "subTypes": [