небольшие изменения

This commit is contained in:
Dmitry Borisenko
2022-02-23 17:54:18 +01:00
parent c565767260
commit 1dfab33e4c
4 changed files with 8 additions and 3 deletions

View File

@@ -108,6 +108,8 @@ extern unsigned long flashWriteNumber;
extern unsigned long wifiUptime; extern unsigned long wifiUptime;
extern bool udpReceivingData;
extern String mqttRootDevice; extern String mqttRootDevice;
extern String chipId; extern String chipId;
extern String prex; extern String prex;

View File

@@ -54,7 +54,7 @@ void asyncUdpInit() {
//будем отправлять каждые 30 секунд презентацию данного устройства //будем отправлять каждые 30 секунд презентацию данного устройства
ts.add( ts.add(
UDP, 30000, [&](void*) { UDP, 60000, [&](void*) {
if (isNetworkActive()) { if (isNetworkActive()) {
SerialPrint("i", F("UDP"), F("Broadcast device presentation")); SerialPrint("i", F("UDP"), F("Broadcast device presentation"));
asyncUdp.broadcastTo(getThisDevice().c_str(), 4210); asyncUdp.broadcastTo(getThisDevice().c_str(), 4210);

View File

@@ -59,6 +59,8 @@ unsigned long flashWriteNumber = 0;
unsigned long wifiUptime = 0; unsigned long wifiUptime = 0;
bool udpReceivingData = false;
String chipId = ""; String chipId = "";
String prex = ""; String prex = "";
String all_widgets = ""; String all_widgets = "";

View File

@@ -68,8 +68,8 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length)
//**сохранение**// //**сохранение**//
if (headerStr == "/gifnoc|") { if (headerStr == "/gifnoc|") {
writeFileUint8tByFrames("config.json", payload, length, headerLenth, 256); writeFileUint8tByFrames("config.json", payload, length, headerLenth, 256);
//clearConfigure(); // clearConfigure();
configure("/config.json"); // configure("/config.json");
} }
//**сохранение**// //**сохранение**//
if (headerStr == "/tuoyal|") { if (headerStr == "/tuoyal|") {
@@ -134,6 +134,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length)
if (headerStr == "/update|") { if (headerStr == "/update|") {
upgrade_firmware(3); upgrade_firmware(3);
} }
} break; } break;
case WStype_BIN: { case WStype_BIN: {