mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
fbs
This commit is contained in:
@@ -929,14 +929,14 @@ void IoTScenario::loadScenario(String fileName) { // посимвольно с
|
|||||||
|
|
||||||
File myfile = seekFile(fileName);
|
File myfile = seekFile(fileName);
|
||||||
if (myfile.available()) {
|
if (myfile.available()) {
|
||||||
strFromFile = new String("");
|
String strFromFile = "";
|
||||||
*strFromFile = myfile.readString();
|
strFromFile = myfile.readString();
|
||||||
Serial.println(*strFromFile);
|
Serial.println(strFromFile);
|
||||||
jsonRead(*strFromFile, "scen", *strFromFile, true);
|
jsonRead(strFromFile, "scen", strFromFile, true);
|
||||||
myfile.close();
|
myfile.close();
|
||||||
|
|
||||||
getNextToken();
|
getNextToken();
|
||||||
while (strIterator < strFromFile->length() - 1) {
|
while (strIterator < strFromFile.length() - 1) {
|
||||||
// Serial.printf("-%c", LastChar);
|
// Serial.printf("-%c", LastChar);
|
||||||
switch (CurTok) {
|
switch (CurTok) {
|
||||||
// case tok_eof: return;
|
// case tok_eof: return;
|
||||||
@@ -952,7 +952,7 @@ void IoTScenario::loadScenario(String fileName) { // посимвольно с
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete strFromFile;
|
// delete strFromFile;
|
||||||
strIterator = 0;
|
strIterator = 0;
|
||||||
} else {
|
} else {
|
||||||
Error("Open file scenario error");
|
Error("Open file scenario error");
|
||||||
|
|||||||
Reference in New Issue
Block a user