Remove F macro for "ps"

This commit is contained in:
cschwinne 2021-11-23 13:17:33 +01:00
parent c8d5218c65
commit b97b6dc144
2 changed files with 3 additions and 3 deletions

View File

@ -220,7 +220,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
CJSON(macroNl, light_nl["macro"]); CJSON(macroNl, light_nl["macro"]);
JsonObject def = doc[F("def")]; JsonObject def = doc[F("def")];
CJSON(bootPreset, def[F("ps")]); CJSON(bootPreset, def["ps"]);
CJSON(turnOnAtBoot, def["on"]); // true CJSON(turnOnAtBoot, def["on"]); // true
CJSON(briS, def["bri"]); // 128 CJSON(briS, def["bri"]); // 128
@ -593,7 +593,7 @@ void serializeConfig() {
light_nl["macro"] = macroNl; light_nl["macro"] = macroNl;
JsonObject def = doc.createNestedObject("def"); JsonObject def = doc.createNestedObject("def");
def[F("ps")] = bootPreset; def["ps"] = bootPreset;
def["on"] = turnOnAtBoot; def["on"] = turnOnAtBoot;
def["bri"] = briS; def["bri"] = briS;

View File

@ -429,7 +429,7 @@ void serializeState(JsonObject root, bool forPreset, bool includeBri, bool segme
if (!forPreset) { if (!forPreset) {
if (errorFlag) root[F("error")] = errorFlag; if (errorFlag) root[F("error")] = errorFlag;
root[F("ps")] = (currentPreset > 0) ? currentPreset : -1; root["ps"] = (currentPreset > 0) ? currentPreset : -1;
root[F("pl")] = currentPlaylist; root[F("pl")] = currentPlaylist;
usermods.addToJsonState(root); usermods.addToJsonState(root);