diff --git a/marquee.ino.d1_mini_wide_3.01.bin b/marquee.ino.d1_mini_3.02.bin similarity index 68% rename from marquee.ino.d1_mini_wide_3.01.bin rename to marquee.ino.d1_mini_3.02.bin index 8c19d80..b5b8d20 100644 Binary files a/marquee.ino.d1_mini_wide_3.01.bin and b/marquee.ino.d1_mini_3.02.bin differ diff --git a/marquee.ino.d1_mini_3.01.bin b/marquee.ino.d1_mini_wide_3.02.bin similarity index 64% rename from marquee.ino.d1_mini_3.01.bin rename to marquee.ino.d1_mini_wide_3.02.bin index 4b2d970..685e565 100644 Binary files a/marquee.ino.d1_mini_3.01.bin and b/marquee.ino.d1_mini_wide_3.02.bin differ diff --git a/marquee/Settings.h b/marquee/Settings.h index 87cceba..7def999 100644 --- a/marquee/Settings.h +++ b/marquee/Settings.h @@ -117,3 +117,5 @@ String OTA_Password = ""; // Set an OTA password here -- leave blank if you //****************************** // End Settings //****************************** +//blue-grey +String themeColor = "blue-grey"; // this can be changed later in the web interface. diff --git a/marquee/marquee.ino b/marquee/marquee.ino index 99947ce..0a02dbe 100644 --- a/marquee/marquee.ino +++ b/marquee/marquee.ino @@ -27,7 +27,7 @@ #include "Settings.h" -#define VERSION "3.01" +#define VERSION "3.02" #define HOSTNAME "CLOCK-" #define CONFIG "/conf.txt" @@ -132,7 +132,8 @@ static const char CHANGE_FORM2[] PROGMEM = "
" "Display Scroll Speed
" "Minutes Between Refresh Data
" - "Minutes Between Scrolling Data
"; + "Minutes Between Scrolling Data
" + "Theme Color
"; static const char CHANGE_FORM3[] PROGMEM = "Use Security Credentials for Configuration Changes
" "" @@ -179,6 +180,29 @@ static const char OCTO_FORM[] PROGMEM = "" ""; +static const char COLOR_THEMES[] PROGMEM = "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + ""; const int TIMEOUT = 500; // 500 = 1/2 second @@ -560,6 +584,7 @@ void handleLocations() { timeDisplayTurnsOff = decodeHtmlString(server.arg("endTime")); displayIntensity = server.arg("ledintensity").toInt(); minutesBetweenDataRefresh = server.arg("refresh").toInt(); + themeColor = server.arg("theme"); minutesBetweenScrolling = server.arg("refreshDisplay").toInt(); displayScrollSpeed = server.arg("scrollspeed").toInt(); IS_BASIC_AUTH = server.hasArg("isBasicAuth"); @@ -832,6 +857,9 @@ void handleConfigure() { options.replace(">" + minutes + "<", " selected>" + minutes + "<"); form.replace("%OPTIONS%", options); form.replace("%REFRESH_DISPLAY%", String(minutesBetweenScrolling)); + String themeOptions = FPSTR(COLOR_THEMES); + themeOptions.replace(">" + String(themeColor) + "<", " selected>" + String(themeColor) + "<"); + form.replace("%THEME_OPTIONS%", themeOptions); server.sendContent(form); //Send another chunk of the form @@ -958,7 +986,7 @@ void sendHeader() { html += ""; html += ""; html += ""; - html += ""; + html += ""; html += ""; html += ""; server.sendContent(html); @@ -1320,6 +1348,7 @@ String writeCityIds() { f.println("USE_PIHOLE=" + String(USE_PIHOLE)); f.println("PiHoleServer=" + PiHoleServer); f.println("PiHolePort=" + String(PiHolePort)); + f.println("themeColor=" + themeColor); } f.close(); readCityIds(); @@ -1511,6 +1540,11 @@ void readCityIds() { PiHolePort = line.substring(line.lastIndexOf("PiHolePort=") + 11).toInt(); Serial.println("PiHolePort=" + String(PiHolePort)); } + if (line.indexOf("themeColor=") >= 0) { + themeColor = line.substring(line.lastIndexOf("themeColor=") + 11); + themeColor.trim(); + Serial.println("themeColor=" + themeColor); + } } fr.close(); matrix.setIntensity(displayIntensity);