Before ESP32 support

This commit is contained in:
cschwinne 2017-05-15 12:24:59 +02:00
parent affb99507e
commit 4e48aeab3e
5 changed files with 12 additions and 13 deletions

View File

@ -13,7 +13,7 @@
<hr> <hr>
<h2>WiFi setup</h2> <h2>WiFi setup</h2>
<h3>Connect to existing network</h3> <h3>Connect to existing network</h3>
Network SSID (leave empty to not connect): <input name=CSSID maxlength=32> <br> Network SSID (leave empty to not connect): <br> <input name=CSSID maxlength=32> <br>
Network password: <br> <input type=password name=CPASS maxlength=63> <br> Network password: <br> <input type=password name=CPASS maxlength=63> <br>
Static IP (leave at 0.0.0.0 for DHCP): <br> Static IP (leave at 0.0.0.0 for DHCP): <br>
<input name=CSIP0 maxlength=3 size=2> . <input name=CSIP0 maxlength=3 size=2> .

View File

@ -89,7 +89,7 @@
<hr> <hr>
<h2>WiFi setup</h2> <h2>WiFi setup</h2>
<h3>Connect to existing network</h3> <h3>Connect to existing network</h3>
Network SSID (leave empty to not connect): <input name="CSSID" maxlength="32"> <br> Network SSID (leave empty to not connect): <br><input name="CSSID" maxlength="32"> <br>
Network password: <br> <input type="password" name="CPASS" maxlength="63"> <br> Network password: <br> <input type="password" name="CPASS" maxlength="63"> <br>
Static IP (leave at 0.0.0.0 for DHCP): <br> Static IP (leave at 0.0.0.0 for DHCP): <br>
<input name="CSIP0" maxlength="3" size="2"> . <input name="CSIP0" maxlength="3" size="2"> .

View File

@ -17,8 +17,8 @@ const char PAGE_settings[] PROGMEM = R"=====(
<hr> <hr>
<h2>WiFi setup</h2> <h2>WiFi setup</h2>
<h3>Connect to existing network</h3> <h3>Connect to existing network</h3>
Network SSID (leave empty to not connect): <input name=CSSID maxlength=32> <br> Network SSID (leave empty to not connect):<br><input name=CSSID maxlength=32> <br>
Network password: <br> <input type=password name=CPASS maxlength=63> <br> Network password:<br> <input type=password name=CPASS maxlength=63> <br>
Static IP (leave at 0.0.0.0 for DHCP): <br> Static IP (leave at 0.0.0.0 for DHCP): <br>
<input name=CSIP0 maxlength=3 size=2> . <input name=CSIP0 maxlength=3 size=2> .
<input name=CSIP1 maxlength=3 size=2> . <input name=CSIP1 maxlength=3 size=2> .

View File

@ -8,9 +8,7 @@
#include <ESP8266HTTPUpdateServer.h> #include <ESP8266HTTPUpdateServer.h>
#include <ESP8266mDNS.h> #include <ESP8266mDNS.h>
#include <EEPROM.h> #include <EEPROM.h>
#include <Hash.h>
#include "WS2812FX.h" #include "WS2812FX.h"
#include <FS.h>
#include <WiFiUDP.h> #include <WiFiUDP.h>
#include <Time.h> #include <Time.h>
#include <TimeLib.h> #include <TimeLib.h>
@ -22,7 +20,7 @@
#include "CallbackFunction.h" #include "CallbackFunction.h"
//version in format yymmddb (b = daily build) //version in format yymmddb (b = daily build)
#define VERSION 1705085 #define VERSION 1705090
//to toggle usb serial debug (un)comment following line //to toggle usb serial debug (un)comment following line
//#define DEBUG //#define DEBUG
@ -30,6 +28,10 @@
//spiffs FS only useful for debug //spiffs FS only useful for debug
//#define USEFS //#define USEFS
#ifdef USEFS
#include <FS.h>
#endif
#ifdef DEBUG #ifdef DEBUG
#define DEBUG_PRINT(x) Serial.print (x) #define DEBUG_PRINT(x) Serial.print (x)
#define DEBUG_PRINTLN(x) Serial.println (x) #define DEBUG_PRINTLN(x) Serial.println (x)
@ -181,7 +183,9 @@ WiFiUDP ntpUdp;
WS2812FX strip = WS2812FX(LEDCOUNT, 2, NEO_GRB + NEO_KHZ800); WS2812FX strip = WS2812FX(LEDCOUNT, 2, NEO_GRB + NEO_KHZ800);
#ifdef USEFS
File fsUploadFile; File fsUploadFile;
#endif
#ifdef DEBUG #ifdef DEBUG
long debugTime = 0; long debugTime = 0;
@ -232,6 +236,7 @@ void loop() {
handleNotifications(); handleNotifications();
handleTransitions(); handleTransitions();
handleNightlight(); handleNightlight();
yield();
handleButton(); handleButton();
handleNetworkTime(); handleNetworkTime();
handleOverlays(); handleOverlays();

View File

@ -73,12 +73,6 @@ void wledInit()
server.on("/settings", HTTP_GET, [](){ server.on("/settings", HTTP_GET, [](){
if(!handleFileRead("/settings.htm")) server.send(200, "text/html", PAGE_settings); if(!handleFileRead("/settings.htm")) server.send(200, "text/html", PAGE_settings);
}); });
server.on("/button.png", HTTP_GET, [](){
if(!handleFileRead("/button.png")) server.send(404, "text/plain", "FileNotFound");
});
server.on("/moon.png", HTTP_GET, [](){
if(!handleFileRead("/moon.png")) server.send(404, "text/plain", "FileNotFound");
});
server.on("/favicon.ico", HTTP_GET, [](){ server.on("/favicon.ico", HTTP_GET, [](){
if(!handleFileRead("/favicon.ico")) server.send(200, "image/x-icon", favicon); if(!handleFileRead("/favicon.ico")) server.send(200, "image/x-icon", favicon);
}); });