minor changes

This commit is contained in:
cschwinne 2017-03-20 20:56:07 +02:00
parent 678765fc88
commit 3105f834b2
6 changed files with 18 additions and 13 deletions

View File

@ -1,5 +1,4 @@
captive portal for ap captive portal for ap
alexa settings
ntp bug ntp bug
simple slide transition simple slide transition
additional color picker field additional color picker field
@ -46,6 +45,7 @@ toggle notifier
var. brightness var. brightness
BUGS BUGS
general forced reset (usually around 48h)
NTP crash (1-48h) NTP crash (1-48h)
static ip disables mdns static ip disables mdns
? authentification for security relevant areas ([/settings, /reset]) ? authentification for security relevant areas ([/settings, /reset])

View File

@ -146,7 +146,7 @@
Target brightness: <input name="TLBRI" maxlength="3" size="2"> (0-255) <br> Target brightness: <input name="TLBRI" maxlength="3" size="2"> (0-255) <br>
Change after: <input name="TLDUR" maxlength="3" size="2"> min <br> Change after: <input name="TLDUR" maxlength="3" size="2"> min <br>
Fade: <input type="checkbox" name="TLFDE"> <br> Fade: <input type="checkbox" name="TLFDE"> <br>
<h3>Daisy chain</h3> <h3>Broadcast</h3>
UDP Port: <input name="NUDPP" maxlength="5" size="2"><br> UDP Port: <input name="NUDPP" maxlength="5" size="2"><br>
Receive notifications: <input type="checkbox" name="NRCVE"> <br> Receive notifications: <input type="checkbox" name="NRCVE"> <br>
Send notifications on direct change: <input type="checkbox" name="NSDIR"> <br> Send notifications on direct change: <input type="checkbox" name="NSDIR"> <br>

View File

@ -150,7 +150,7 @@ const char PAGE_settings[] PROGMEM = R"=====(
Target brightness: <input name="TLBRI" maxlength="3" size="2"> (0-255) <br> Target brightness: <input name="TLBRI" maxlength="3" size="2"> (0-255) <br>
Change after: <input name="TLDUR" maxlength="3" size="2"> min <br> Change after: <input name="TLDUR" maxlength="3" size="2"> min <br>
Fade: <input type="checkbox" name="TLFDE"> <br> Fade: <input type="checkbox" name="TLFDE"> <br>
<h3>Daisy chain</h3> <h3>Broadcast</h3>
UDP Port: <input name="NUDPP" maxlength="5" size="2"><br> UDP Port: <input name="NUDPP" maxlength="5" size="2"><br>
Receive notifications: <input type="checkbox" name="NRCVE"> <br> Receive notifications: <input type="checkbox" name="NRCVE"> <br>
Send notifications on direct change: <input type="checkbox" name="NSDIR"> <br> Send notifications on direct change: <input type="checkbox" name="NSDIR"> <br>

View File

@ -21,8 +21,11 @@
#include "UpnpBroadcastResponder.h" #include "UpnpBroadcastResponder.h"
#include "CallbackFunction.h" #include "CallbackFunction.h"
//version in format yymmddb (b = daily build)
#define VERSION 1703202
//to toggle usb serial debug (un)comment following line //to toggle usb serial debug (un)comment following line
//#define DEBUG #define DEBUG
#ifdef DEBUG #ifdef DEBUG
#define DEBUG_PRINT(x) Serial.print (x) #define DEBUG_PRINT(x) Serial.print (x)
@ -40,8 +43,8 @@
* @author Christian Schwinne * @author Christian Schwinne
*/ */
//Hardware-settings (only changeble via code) //Hardware-settings (only changeble via code)
#define LEDCOUNT 255 //maximum, exact count set-able via settings #define LEDCOUNT 93 //maximum, exact count set-able via settings
#define MAXDIRECT 255 //for direct access like arls, should be >= LEDCOUNT #define MAXDIRECT 93 //for direct access like arls, should be >= LEDCOUNT
uint8_t buttonPin = 0; //needs pull-up uint8_t buttonPin = 0; //needs pull-up
uint8_t auxPin = 15; //use e.g. for external relay uint8_t auxPin = 15; //use e.g. for external relay
uint8_t auxDefaultState = 0; //0: input 1: high 2: low uint8_t auxDefaultState = 0; //0: input 1: high 2: low
@ -179,7 +182,7 @@ WS2812FX strip = WS2812FX(LEDCOUNT, 2, NEO_GRB + NEO_KHZ800);
File fsUploadFile; File fsUploadFile;
#ifdef DEBUG #ifdef DEBUG
int debugIndex = 0; long debugTime = 0;
int lastWifiState = 3; int lastWifiState = 3;
long wifiStateChangedTime = 0; long wifiStateChangedTime = 0;
#endif #endif
@ -241,8 +244,7 @@ void loop() {
//DEBUG //DEBUG
#ifdef DEBUG #ifdef DEBUG
debugIndex ++; if (millis() - debugTime > 5000)
if (debugIndex > 99999)
{ {
debugIndex = 0; debugIndex = 0;
DEBUG_PRINTLN("---MODULE DEBUG INFO---"); DEBUG_PRINTLN("---MODULE DEBUG INFO---");
@ -257,7 +259,8 @@ void loop() {
lastWifiState = WiFi.status(); lastWifiState = WiFi.status();
DEBUG_PRINT("Wifi state: "); DEBUG_PRINTLN(wifiStateChangedTime); DEBUG_PRINT("Wifi state: "); DEBUG_PRINTLN(wifiStateChangedTime);
DEBUG_PRINT("NTP last sync: "); DEBUG_PRINTLN(ntpLastSyncTime); DEBUG_PRINT("NTP last sync: "); DEBUG_PRINTLN(ntpLastSyncTime);
DEBUG_PRINT("Client IP: "); DEBUG_PRINTLN(WiFi.localIP()); DEBUG_PRINT("Client IP: "); DEBUG_PRINTLN(WiFi.localIP());
debugTime = millis();
} }
#endif #endif
} }

View File

@ -212,7 +212,9 @@ void XML_response_settings()
resp = resp + "Not active"; resp = resp + "Not active";
} }
resp = resp + "</sip>"; resp = resp + "</sip>";
resp = resp + "<msg>WLED 0.3pd OK</msg>"; resp = resp + "<msg>WLED 0.3pd (build";
resp = resp + VERSION;
resp = resp + ") OK</msg>";
resp = resp + "</vs>"; resp = resp + "</vs>";
DEBUG_PRINTLN(resp); DEBUG_PRINTLN(resp);
server.send(200, "text/xml", resp); server.send(200, "text/xml", resp);

View File

@ -58,11 +58,11 @@ void wledInit()
} }
DEBUG_PRINTLN("mDNS responder started"); DEBUG_PRINTLN("mDNS responder started");
if (udpPort > 0 && udpPort != ntpLocalPort) if (udpPort > 0 && udpPort != ntpLocalPort && WiFi.status() == WL_CONNECTED)
{ {
udpConnected = notifierUdp.begin(udpPort); udpConnected = notifierUdp.begin(udpPort);
} }
if (ntpEnabled) if (ntpEnabled && WiFi.status() == WL_CONNECTED)
ntpConnected = ntpUdp.begin(ntpLocalPort); ntpConnected = ntpUdp.begin(ntpLocalPort);
//SERVER INIT //SERVER INIT