mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
добавил возможные ошибки в файле конфигурации
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
void configure(String& path) {
|
void configure(String& path) {
|
||||||
File file = seekFile(path);
|
File file = seekFile(path);
|
||||||
|
|
||||||
while (file.available()) {
|
while (file.available()) {
|
||||||
String jsonArrayElement = file.readStringUntil('}') + "}";
|
String jsonArrayElement = file.readStringUntil('}') + "}";
|
||||||
String value;
|
String value;
|
||||||
@@ -11,9 +10,11 @@ void configure(String& path) {
|
|||||||
//=============================
|
//=============================
|
||||||
} else if (value == F("pwm-out")) {
|
} else if (value == F("pwm-out")) {
|
||||||
//=============================
|
//=============================
|
||||||
|
} else {
|
||||||
|
SerialPrint(F("E"), F("Config"), F("config.json error, type not exist"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SerialPrint(F("E"), F("System"), F("Fatal configuration error, type wrong or missing"));
|
SerialPrint(F("E"), F("Config"), F("config.json error, type wrong or missing"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file.close();
|
file.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user