|
@@ -15,10 +15,6 @@ ClockConfig loadConfig(void)
|
|
JsonObject correction = doc["correction"];
|
|
JsonObject correction = doc["correction"];
|
|
cfg.AddTZ = correction["TZ"];
|
|
cfg.AddTZ = correction["TZ"];
|
|
|
|
|
|
- JsonObject light = doc["light"];
|
|
|
|
- cfg.LightTrhLow = light["low"];
|
|
|
|
- cfg.LightTrhHigh = light["high"];
|
|
|
|
-
|
|
|
|
JsonObject bright = doc["bright"];
|
|
JsonObject bright = doc["bright"];
|
|
cfg.BrightnessLow = bright["low"];
|
|
cfg.BrightnessLow = bright["low"];
|
|
cfg.BrightnessMiddle = bright["mid"];
|
|
cfg.BrightnessMiddle = bright["mid"];
|
|
@@ -42,14 +38,10 @@ void saveConfig(ClockConfig& cfg)
|
|
auto correction = doc.createNestedObject("correction");
|
|
auto correction = doc.createNestedObject("correction");
|
|
correction["TZ"] = cfg.AddTZ;
|
|
correction["TZ"] = cfg.AddTZ;
|
|
|
|
|
|
- auto light = doc.createNestedObject("light");
|
|
|
|
- light["low"] = cfg.LightTrhLow;
|
|
|
|
- light["high"] = cfg.LightTrhHigh;
|
|
|
|
-
|
|
|
|
auto bright = doc.createNestedObject("bright");
|
|
auto bright = doc.createNestedObject("bright");
|
|
- bright["low"] = cfg.BrightnessLow;
|
|
|
|
- bright["mid"] = cfg.BrightnessMiddle;
|
|
|
|
- bright["high"] = cfg.BrightnessHigh;
|
|
|
|
|
|
+ bright["low"] = cfg.BrightnessLow;
|
|
|
|
+ bright["mid"] = cfg.BrightnessMiddle;
|
|
|
|
+ bright["high"] = cfg.BrightnessHigh;
|
|
|
|
|
|
Json::saveToFile(doc, CLOCK_CONFIG_FILE, Json::Pretty);
|
|
Json::saveToFile(doc, CLOCK_CONFIG_FILE, Json::Pretty);
|
|
}
|
|
}
|