mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 14:12:16 +03:00
начал писать обновление параметров
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
#include "DeviceList.h"
|
||||
|
||||
void addThisDeviceToList() {
|
||||
jsonWriteStr_(devListJson, "devicelist", "devicelist");
|
||||
jsonWriteStr_(devListJson, "devicelist", ""); //метка для парсинга
|
||||
jsonWriteStr_(devListJson, "ip", jsonReadStr(settingsFlashJson, "ip"));
|
||||
jsonWriteStr_(devListJson, "id", jsonReadStr(settingsFlashJson, "id"));
|
||||
jsonWriteStr_(devListJson, "name", jsonReadStr(settingsFlashJson, "name"));
|
||||
|
||||
devListJson = devListJson + ",";
|
||||
String test;
|
||||
jsonWriteStr_(test, "ip", "192.168.88.88");
|
||||
jsonWriteStr_(test, "id", "123456789");
|
||||
jsonWriteStr_(test, "name", "test");
|
||||
devListJson = devListJson + test;
|
||||
// для проверки
|
||||
// devListJson = devListJson + ",";
|
||||
// String test;
|
||||
// jsonWriteStr_(test, "ip", "192.168.88.88");
|
||||
// jsonWriteStr_(test, "id", "123456789");
|
||||
// jsonWriteStr_(test, "name", "test");
|
||||
// devListJson = devListJson + test;
|
||||
|
||||
devListJson = "[" + devListJson + "]";
|
||||
Serial.println(devListJson);
|
||||
|
||||
Reference in New Issue
Block a user