Skip to content

Commit

Permalink
Preparations for send stats and update screen
Browse files Browse the repository at this point in the history
  • Loading branch information
o0shojo0o committed Aug 18, 2022
1 parent 587ae26 commit d283295
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/PixelIt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -699,6 +701,16 @@ void SetConfigVariables(JsonObject &json)
{
initialVolume = json["initialVolume"].as<uint>();
}

if (json.containsKey("sendStats"))
{
sendStats = json["sendStats"].as<bool>();
}

if (json.containsKey("checkUpdateScreen"))
{
checkUpdateScreen = json["checkUpdateScreen"].as<bool>();
}
}

void EraseWifiCredentials()
Expand Down

0 comments on commit d283295

Please sign in to comment.