From d2832959ee4e9b12efc1fb13fb62e2239a27f327 Mon Sep 17 00:00:00 2001 From: Dennis Rathjen Date: Thu, 18 Aug 2022 12:06:05 +0200 Subject: [PATCH] Preparations for send stats and update screen --- src/PixelIt.ino | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/PixelIt.ino b/src/PixelIt.ino index dfe42c5..5f4db7a 100644 --- a/src/PixelIt.ino +++ b/src/PixelIt.ino @@ -276,7 +276,8 @@ float temperatureOffset = 0.0f; float humidityOffset = 0.0f; float pressureOffset = 0.0f; float gasOffset = 0.0f; - +bool sendStats = true; +bool checkUpdateScreen = true; // MP3Player Vars String OldGetMP3PlayerInfo; @@ -365,8 +366,9 @@ void SaveConfig() json["ldrDevice"] = ldrDevice; json["ldrPulldown"] = ldrPulldown; json["ldrSmoothing"] = ldrSmoothing; - json["initialVolume"] = initialVolume; + json["sendStats"] = sendStats; + json["checkUpdateScreen"] = checkUpdateScreen; #if defined(ESP8266) File configFile = LittleFS.open("/config.json", "w"); @@ -699,6 +701,16 @@ void SetConfigVariables(JsonObject &json) { initialVolume = json["initialVolume"].as(); } + + if (json.containsKey("sendStats")) + { + sendStats = json["sendStats"].as(); + } + + if (json.containsKey("checkUpdateScreen")) + { + checkUpdateScreen = json["checkUpdateScreen"].as(); + } } void EraseWifiCredentials()