версия 428 исправлены все баги

This commit is contained in:
Dmitry Borisenko
2022-09-29 22:48:33 +02:00
parent 27e30ab0ff
commit 8f708b9c13
11 changed files with 15 additions and 55 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

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

View File

@@ -1,3 +0,0 @@
{
"scen": ""
}

View File

@@ -1,7 +1,7 @@
#pragma once
//Версия прошивки
#define FIRMWARE_VERSION 427
#define FIRMWARE_VERSION 428
#ifdef esp8266_4mb
#define FIRMWARE_NAME "esp8266_4mb"

View File

@@ -11,6 +11,7 @@ struct updateFirm {
String settingsFlashJson;
String configJson;
String layoutJson;
String scenarioTxt;
};
extern void upgradeInit();

View File

@@ -118,12 +118,14 @@ void putUserDataToRam() {
update.configJson = readFile("config.json", 4096);
update.settingsFlashJson = readFile("settings.json", 4096);
update.layoutJson = readFile("layout.json", 4096);
update.scenarioTxt = readFile("scenario.txt", 4096);
}
void saveUserDataToFlash() {
writeFile("/config.json", update.configJson);
writeFile("/settings.json", update.settingsFlashJson);
writeFile("/layout.json", update.layoutJson);
writeFile("/scenario.txt", update.scenarioTxt);
}
void handleUpdateStatus(bool send, int state) {

View File

@@ -980,12 +980,12 @@ void IoTScenario::loadScenario(String fileName) { // подготавливае
return;
}
strFromFile = file.readString();
strFromFile.replace("{\"scen\":\"", "");
strFromFile.replace("\\n", "\n");
strFromFile.replace("\\\"", "\"");
strFromFile.replace(";", " ");
strFromFile.replace("\\t", " ");
strFromFile.remove(strFromFile.length() - 2, 2);
// 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());
file.close();
}

View File

@@ -9,6 +9,8 @@ void writeFileUint8tByFrames(const String& filename, uint8_t*& big_buf, size_t l
return;
}
size_t written{headerLenth};
// SerialPrint("i", "test", filename + ": length=" + String(length) + ", written=" + String(written));
if (length == written) file.print(" ");
while (length > written) {
size_t size = length - written;
if (size > frameSize) size = frameSize;