mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Скрываем не используемый код
This commit is contained in:
@@ -35,7 +35,7 @@ extern FS* filesystem;
|
||||
extern bool fileSystemInit();
|
||||
extern void globalVarsSync();
|
||||
|
||||
extern String getParamsJson();
|
||||
//extern String getParamsJson();
|
||||
|
||||
extern void syncSettingsFlashJson();
|
||||
extern void syncValuesFlashJson();
|
||||
|
||||
@@ -90,7 +90,7 @@ class IoTItem {
|
||||
IoTItem* findIoTItem(const String& name); // поиск экземпляра элемента модуля по имени
|
||||
String getItemValue(const String& name); // поиск плюс получение значения
|
||||
bool isItemExist(const String& name); // существует ли айтем
|
||||
StaticJsonDocument<JSON_BUFFER_SIZE>* getLocalItemsAsJSON(); // сбор всех локальных значений Items
|
||||
//StaticJsonDocument<JSON_BUFFER_SIZE>* getLocalItemsAsJSON(); // сбор всех локальных значений Items
|
||||
|
||||
IoTItem* createItemFromNet(const String& itemId, const String& value, int interval);
|
||||
IoTItem* createItemFromNet(const String& msgFromNet);
|
||||
|
||||
@@ -27,12 +27,12 @@ void globalVarsSync() {
|
||||
}
|
||||
|
||||
//к удалению. не используется
|
||||
String getParamsJson() {
|
||||
String json;
|
||||
serializeJson(*getLocalItemsAsJSON(), json);
|
||||
jsonWriteStr_(json, "params", "");
|
||||
return json;
|
||||
}
|
||||
// String getParamsJson() {
|
||||
// String json;
|
||||
// serializeJson(*getLocalItemsAsJSON(), json);
|
||||
// jsonWriteStr_(json, "params", "");
|
||||
// return json;
|
||||
// }
|
||||
|
||||
void syncSettingsFlashJson() {
|
||||
writeFile(F("settings.json"), settingsFlashJson);
|
||||
|
||||
@@ -301,13 +301,13 @@ void analyzeMsgFromNet(const String& msg, String altId) {
|
||||
}
|
||||
}
|
||||
|
||||
StaticJsonDocument<JSON_BUFFER_SIZE> docForExport;
|
||||
//StaticJsonDocument<JSON_BUFFER_SIZE> docForExport;
|
||||
|
||||
StaticJsonDocument<JSON_BUFFER_SIZE>* getLocalItemsAsJSON() {
|
||||
docForExport.clear();
|
||||
for (std::list<IoTItem*>::iterator it = IoTItems.begin(); it != IoTItems.end(); ++it) {
|
||||
if ((*it)->iAmLocal) docForExport[(*it)->getID()] = (*it)->getValue();
|
||||
}
|
||||
// StaticJsonDocument<JSON_BUFFER_SIZE>* getLocalItemsAsJSON() {
|
||||
// docForExport.clear();
|
||||
// for (std::list<IoTItem*>::iterator it = IoTItems.begin(); it != IoTItems.end(); ++it) {
|
||||
// if ((*it)->iAmLocal) docForExport[(*it)->getID()] = (*it)->getValue();
|
||||
// }
|
||||
|
||||
return &docForExport;
|
||||
}
|
||||
// return &docForExport;
|
||||
// }
|
||||
Reference in New Issue
Block a user