mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
версия 428 исправлены все баги
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user