From b5ae21997c08961be6220f5a889500daca824eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20M=C3=BChl?= <31169771+Blueforcer@users.noreply.github.com> Date: Sat, 15 Apr 2023 20:54:18 +0200 Subject: [PATCH] V0.53 - fixes a bug when trying to set boolean settings. closes #62 --- src/DisplayManager.cpp | 10 +++++----- src/Globals.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/DisplayManager.cpp b/src/DisplayManager.cpp index 64079d72..056d509e 100644 --- a/src/DisplayManager.cpp +++ b/src/DisplayManager.cpp @@ -1250,14 +1250,14 @@ void DisplayManager_::setNewSettings(const char *json) TIME_PER_TRANSITION = doc.containsKey("TSPEED") ? doc["TSPEED"] : TIME_PER_TRANSITION; MATRIX_FPS = doc.containsKey("FPS") ? doc["FPS"] : MATRIX_FPS; BRIGHTNESS = doc.containsKey("BRI") ? doc["BRI"] : BRIGHTNESS; - START_ON_MONDAY = doc.containsKey("SOM") ? doc["SOM"] : START_ON_MONDAY; + START_ON_MONDAY = doc.containsKey("SOM") ? doc["SOM"].as() : START_ON_MONDAY; TIME_FORMAT = doc.containsKey("TFORMAT") ? doc["TFORMAT"].as() : TIME_FORMAT; GAMMA = doc.containsKey("GAMMA") ? doc["GAMMA"].as() : GAMMA; DATE_FORMAT = doc.containsKey("DFORMAT") ? doc["DFORMAT"].as() : DATE_FORMAT; - AUTO_BRIGHTNESS = doc.containsKey("ABRI") ? doc["ABRI"] : AUTO_BRIGHTNESS; - AUTO_TRANSITION = doc.containsKey("ATRANS") ? doc["ATRANS"] : AUTO_TRANSITION; - UPPERCASE_LETTERS = doc.containsKey("UPPERCASE") ? doc["UPPERCASE"] : UPPERCASE_LETTERS; - SHOW_WEEKDAY = doc.containsKey("WD") ? doc["WD"] : SHOW_WEEKDAY; + AUTO_BRIGHTNESS = doc.containsKey("ABRI") ? doc["ABRI"].as() : AUTO_BRIGHTNESS; + AUTO_TRANSITION = doc.containsKey("ATRANS") ? doc["ATRANS"].as() : AUTO_TRANSITION; + UPPERCASE_LETTERS = doc.containsKey("UPPERCASE") ? doc["UPPERCASE"].as() : UPPERCASE_LETTERS; + SHOW_WEEKDAY = doc.containsKey("WD") ? doc["WD"].as() : SHOW_WEEKDAY; if (doc.containsKey("CCORRECTION")) { auto color = doc["CCORRECTION"]; diff --git a/src/Globals.cpp b/src/Globals.cpp index 8dce1543..53353e58 100644 --- a/src/Globals.cpp +++ b/src/Globals.cpp @@ -174,7 +174,7 @@ IPAddress gateway; IPAddress subnet; IPAddress primaryDNS; IPAddress secondaryDNS; -const char *VERSION = "0.52"; +const char *VERSION = "0.53"; String MQTT_HOST = ""; uint16_t MQTT_PORT = 1883; String MQTT_USER;