mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-06-10 20:09:19 +03:00
избавление от двух файлов
This commit is contained in:
40
data_svelte/build/bundle.css
Normal file
40
data_svelte/build/bundle.css
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
2
data_svelte/build/bundle.js
Normal file
2
data_svelte/build/bundle.js
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -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.6</title>
|
<title>IoT Manager 4.3.7</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?436" />
|
<link rel="stylesheet" href="/build/bundle.css?437" />
|
||||||
|
|
||||||
<script defer src="/build/bundle.js?436"></script>
|
<script defer src="/build/bundle.js?437"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body></body>
|
<body></body>
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"scen": ""
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"scen": ""
|
||||||
|
}
|
||||||
@@ -96,7 +96,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length)
|
|||||||
sendFileToWs("/items.json", num, 1024);
|
sendFileToWs("/items.json", num, 1024);
|
||||||
sendFileToWs("/widgets.json", num, 1024);
|
sendFileToWs("/widgets.json", num, 1024);
|
||||||
sendFileToWs("/config.json", num, 1024);
|
sendFileToWs("/config.json", num, 1024);
|
||||||
sendFileToWs("/scenario.json", num, 1024);
|
sendFileToWs("/scenario.txt", num, 1024);
|
||||||
//шлется для того что бы получить топик устройства
|
//шлется для того что бы получить топик устройства
|
||||||
standWebSocket.sendTXT(num, settingsFlashJson);
|
standWebSocket.sendTXT(num, settingsFlashJson);
|
||||||
}
|
}
|
||||||
@@ -109,24 +109,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length)
|
|||||||
writeFileUint8tByFrames("layout.json", payload, length, headerLenth, 256);
|
writeFileUint8tByFrames("layout.json", payload, length, headerLenth, 256);
|
||||||
}
|
}
|
||||||
if (headerStr == "/oiranecs|") {
|
if (headerStr == "/oiranecs|") {
|
||||||
writeFileUint8tByFrames("scenario.json", payload, length, headerLenth, 256);
|
writeFileUint8tByFrames("scenario.txt", payload, length, headerLenth, 256);
|
||||||
|
|
||||||
String strFromFile;
|
|
||||||
File myfile = seekFile("/scenario.json");
|
|
||||||
if (myfile.available()) {
|
|
||||||
strFromFile = myfile.readString();
|
|
||||||
|
|
||||||
strFromFile.replace("{\"scen\":\"", "");
|
|
||||||
strFromFile.replace("\\n", "\n");
|
|
||||||
strFromFile.replace("\\\"", "\"");
|
|
||||||
strFromFile.replace(";", " ");
|
|
||||||
strFromFile.replace("\\t", " ");
|
|
||||||
strFromFile.remove(strFromFile.length() - 2, 2);
|
|
||||||
}
|
|
||||||
myfile.close();
|
|
||||||
|
|
||||||
writeFile("/scenario.txt", strFromFile);
|
|
||||||
|
|
||||||
clearConfigure();
|
clearConfigure();
|
||||||
configure("/config.json");
|
configure("/config.json");
|
||||||
iotScen.loadScenario("/scenario.txt");
|
iotScen.loadScenario("/scenario.txt");
|
||||||
|
|||||||
@@ -599,16 +599,16 @@ int IoTScenario::getLastChar() {
|
|||||||
LastChar = file.read();
|
LastChar = file.read();
|
||||||
if (LastChar == 10) curLine++;
|
if (LastChar == 10) curLine++;
|
||||||
return LastChar;
|
return LastChar;
|
||||||
} else
|
} else
|
||||||
return EOF;
|
return EOF;
|
||||||
} else if (mode == 1) {
|
} else if (mode == 1) {
|
||||||
if (charCount < strFromFile.length()) {
|
if (charCount < strFromFile.length()) {
|
||||||
LastChar = strFromFile.charAt(charCount);
|
LastChar = strFromFile.charAt(charCount);
|
||||||
//Serial.printf("%d, ", LastChar);
|
// Serial.printf("%d, ", LastChar);
|
||||||
if (LastChar == 10) curLine++;
|
if (LastChar == 10) curLine++;
|
||||||
charCount++;
|
charCount++;
|
||||||
return LastChar;
|
return LastChar;
|
||||||
} else
|
} else
|
||||||
return EOF;
|
return EOF;
|
||||||
} else {
|
} else {
|
||||||
return EOF;
|
return EOF;
|
||||||
@@ -980,6 +980,12 @@ void IoTScenario::loadScenario(String fileName) { // подготавливае
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
strFromFile = file.readString();
|
strFromFile = file.readString();
|
||||||
|
strFromFile.replace("{\"scen\":\"", "");
|
||||||
|
strFromFile.replace("\\n", "\n");
|
||||||
|
strFromFile.replace("\\\"", "\"");
|
||||||
|
strFromFile.replace(";", " ");
|
||||||
|
strFromFile.replace("\\t", " ");
|
||||||
|
strFromFile.remove(strFromFile.length() - 2, 2);
|
||||||
Serial.printf("strFromFile: %s, %s\n", strFromFile.c_str(), fileName.c_str());
|
Serial.printf("strFromFile: %s, %s\n", strFromFile.c_str(), fileName.c_str());
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user