Skip to content

Commit 6135f75

Browse files
authored
Merge pull request #198 from Qrome/release/2.18
Release/2.18
2 parents c0243dd + 314d4da commit 6135f75

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Double Wide LED version: https://www.thingiverse.com/thing:2989552
3939

4040
## Upgrading from version 2.5 or Higher
4141
Version 2.5 introduced the ability to upgrade pre-compiled firmware from a binary file. In version 2.6 and on you should find binary files that can be uploaded to your marque scrolling clock via the web interface. From the main menu in the web interface select "Firmware Update" and follow the prompts.
42-
* **marquee.ino.d1_mini_2.16.bin** - compiled for Wemos D1 Mini and standard 4x1 LED (default)
43-
* **marquee.ino.d1_mini_wide_2.16.bin** - compiled for Wemos D1 Mini and double wide 8x1 LED display
42+
* **marquee.ino.d1_mini_2.18.bin** - compiled for Wemos D1 Mini and standard 4x1 LED (default)
43+
* **marquee.ino.d1_mini_wide_2.18.bin** - compiled for Wemos D1 Mini and double wide 8x1 LED display
4444

4545
## Compiling and Loading to Wemos D1
4646
It is recommended to use Arduino IDE. You will need to configure Arduino IDE to work with the Wemos board and USB port and installed the required USB drivers etc.
Binary file not shown.
Binary file not shown.

Diff for: marquee/TimeDB.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ time_t TimeDB::getTime()
7575
client.stop(); //stop client
7676
Serial.println(result);
7777

78+
int timeStart = result.lastIndexOf('{'); // trim response to start of JSON -- issue 194
79+
result = result.substring(timeStart);
7880
char jsonArray [result.length() + 1];
7981
result.toCharArray(jsonArray, sizeof(jsonArray));
8082
jsonArray[result.length() + 1] = '\0';
@@ -178,4 +180,3 @@ String TimeDB::zeroPad(int number) {
178180
return String(number);
179181
}
180182
}
181-

Diff for: marquee/marquee.ino

+14-15
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#include "Settings.h"
2929

30-
#define VERSION "2.16"
30+
#define VERSION "2.18"
3131

3232
#define HOSTNAME "CLOCK-"
3333
#define CONFIG "/conf.txt"
@@ -108,7 +108,6 @@ static const char WEB_ACTIONS2[] PROGMEM = "<a class='w3-bar-item w3-button' hre
108108

109109
static const char WEB_ACTION3[] PROGMEM = "</a><a class='w3-bar-item w3-button' href='/systemreset' onclick='return confirm(\"Do you want to reset to default weather settings?\")'><i class='fas fa-undo'></i> Reset Settings</a>"
110110
"<a class='w3-bar-item w3-button' href='/forgetwifi' onclick='return confirm(\"Do you want to forget to WiFi connection?\")'><i class='fas fa-wifi'></i> Forget WiFi</a>"
111-
"<a class='w3-bar-item w3-button' href='/restart'><i class='fas fa-sync'></i> Restart</a>"
112111
"<a class='w3-bar-item w3-button' href='/update'><i class='fas fa-wrench'></i> Firmware Update</a>"
113112
"<a class='w3-bar-item w3-button' href='https://github.com/Qrome/marquee-scroller' target='_blank'><i class='fas fa-question-circle'></i> About</a>";
114113

@@ -316,7 +315,6 @@ void setup() {
316315
server.on("/savepihole", handleSavePihole);
317316
server.on("/systemreset", handleSystemReset);
318317
server.on("/forgetwifi", handleForgetWifi);
319-
server.on("/restart", restartEsp);
320318
server.on("/configure", handleConfigure);
321319
server.on("/configurebitcoin", handleBitcoinConfigure);
322320
server.on("/configurewideclock", handleWideClockConfigure);
@@ -447,11 +445,7 @@ void loop() {
447445
if (Wide_Clock_Style == "1") {
448446
// On Wide Display -- show the current temperature as well
449447
String currentTemp = weatherClient.getTempRounded(0);
450-
String timeSpacer = " ";
451-
if (currentTemp.length() >= 3) {
452-
timeSpacer = " ";
453-
}
454-
currentTime += timeSpacer + currentTemp + getTempSymbol();
448+
currentTime += " " + currentTemp + getTempSymbol();
455449
}
456450
if (Wide_Clock_Style == "2") {
457451
currentTime += secondsIndicator(false) + TimeDB.zeroPad(second());
@@ -629,11 +623,6 @@ void handleForgetWifi() {
629623
ESP.restart();
630624
}
631625

632-
void restartEsp() {
633-
redirectHome();
634-
ESP.restart();
635-
}
636-
637626
void handleBitcoinConfigure() {
638627
if (!athentication()) {
639628
return server.requestAuthentication();
@@ -1121,8 +1110,8 @@ void displayWeatherData() {
11211110
html += "</div>";
11221111
html += "<div class='w3-cell w3-container' style='width:100%'><p>";
11231112
html += weatherClient.getCondition(0) + " (" + weatherClient.getDescription(0) + ")<br>";
1124-
html += temperature + " " + getTempSymbol() + "<br>";
1125-
html += weatherClient.getHigh(0) + "/" + weatherClient.getLow(0) + " " + getTempSymbol() + "<br>";
1113+
html += temperature + " " + getTempSymbol(true) + "<br>";
1114+
html += weatherClient.getHigh(0) + "/" + weatherClient.getLow(0) + " " + getTempSymbol(true) + "<br>";
11261115
html += time + "<br>";
11271116
html += "<a href='https://www.google.com/maps/@" + weatherClient.getLat(0) + "," + weatherClient.getLon(0) + ",10000m/data=!3m1!1e3' target='_BLANK'><i class='fas fa-map-marker' style='color:red'></i> Map It!</a><br>";
11281117
html += "</p></div></div><hr>";
@@ -1220,13 +1209,23 @@ void flashLED(int number, int delayTime) {
12201209
}
12211210

12221211
String getTempSymbol() {
1212+
return getTempSymbol(false);
1213+
}
1214+
1215+
String getTempSymbol(bool forWeb) {
12231216
String rtnValue = "F";
12241217
if (IS_METRIC) {
12251218
rtnValue = "C";
12261219
}
1220+
if (forWeb) {
1221+
rtnValue = "°" + rtnValue;
1222+
} else {
1223+
rtnValue = char(247) + rtnValue;
1224+
}
12271225
return rtnValue;
12281226
}
12291227

1228+
12301229
String getSpeedSymbol() {
12311230
String rtnValue = "mph";
12321231
if (IS_METRIC) {

0 commit comments

Comments
 (0)