mirror of
https://github.com/lora-aprs/LoRa_APRS_Tracker.git
synced 2026-01-06 08:40:08 +01:00
Merge e306e02dce into d97a929848
This commit is contained in:
commit
0101777d2f
|
|
@ -26,7 +26,7 @@ Configuration ConfigurationManagement::readConfiguration() {
|
|||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, "Configuration", "Failed to open file for reading...");
|
||||
return Configuration();
|
||||
}
|
||||
DynamicJsonDocument data(2048);
|
||||
JsonDocument data;
|
||||
DeserializationError error = deserializeJson(data, file);
|
||||
|
||||
if (error) {
|
||||
|
|
@ -94,11 +94,11 @@ void ConfigurationManagement::writeConfiguration(Configuration conf) {
|
|||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, "Configuration", "Failed to open file for writing...");
|
||||
return;
|
||||
}
|
||||
DynamicJsonDocument data(2048);
|
||||
JsonDocument data;
|
||||
|
||||
JsonArray beacons = data.createNestedArray("beacons");
|
||||
JsonArray beacons = data["beacons"].to<JsonArray>();
|
||||
for (Configuration::Beacon beacon : conf.beacons) {
|
||||
JsonObject v = beacons.createNestedObject();
|
||||
JsonObject v = beacons.add<JsonObject>();
|
||||
v["callsign"] = beacon.callsign;
|
||||
v["path"] = beacon.path;
|
||||
v["message"] = beacon.message;
|
||||
|
|
|
|||
Loading…
Reference in a new issue