Skip to content

Commit c0243dd

Browse files
authored
Merge pull request #153 from HaullingLlama/Restart-in-main-menue
Added a restart option to the main menu
2 parents dab4cca + 778c96c commit c0243dd

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ It is recommended to use Arduino IDE. You will need to configure Arduino IDE to
4848
* Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas. This will add support for the Wemos D1 Mini to Arduino IDE.
4949
* Open Boards Manager from Tools > Board menu and install esp8266 Core platform version **2.5.2**
5050
* Select Board: "LOLIN(WEMOS) D1 R2 & mini"
51-
* Set 1M SPIFFS -- **this project requires SPIFFS for saving and reading configuration settings.**
51+
* Set Flash Size to 1M SPIFFS -- **this project requires SPIFFS for saving and reading configuration settings.**
5252
* Select the **Port** from the tools menu.
5353

5454
## Loading Supporting Library Files in Arduino

marquee/marquee.ino

+7
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ 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>"
111112
"<a class='w3-bar-item w3-button' href='/update'><i class='fas fa-wrench'></i> Firmware Update</a>"
112113
"<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>";
113114

@@ -315,6 +316,7 @@ void setup() {
315316
server.on("/savepihole", handleSavePihole);
316317
server.on("/systemreset", handleSystemReset);
317318
server.on("/forgetwifi", handleForgetWifi);
319+
server.on("/restart", restartEsp);
318320
server.on("/configure", handleConfigure);
319321
server.on("/configurebitcoin", handleBitcoinConfigure);
320322
server.on("/configurewideclock", handleWideClockConfigure);
@@ -627,6 +629,11 @@ void handleForgetWifi() {
627629
ESP.restart();
628630
}
629631

632+
void restartEsp() {
633+
redirectHome();
634+
ESP.restart();
635+
}
636+
630637
void handleBitcoinConfigure() {
631638
if (!athentication()) {
632639
return server.requestAuthentication();

0 commit comments

Comments
 (0)