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
alexa settings
ntp bug
simple slide transition
additional color picker field
@ -46,6 +45,7 @@ toggle notifier
var. brightness
BUGS
general forced reset (usually around 48h)
NTP crash (1-48h)
static ip disables mdns
? 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>
Change after: <input name="TLDUR" maxlength="3" size="2"> min <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>
Receive notifications: <input type="checkbox" name="NRCVE"> <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>
Change after: <input name="TLDUR" maxlength="3" size="2"> min <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>
Receive notifications: <input type="checkbox" name="NRCVE"> <br>
Send notifications on direct change: <input type="checkbox" name="NSDIR"> <br>

View File

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

View File

@ -212,7 +212,9 @@ void XML_response_settings()
resp = resp + "Not active";
}
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>";
DEBUG_PRINTLN(resp);
server.send(200, "text/xml", resp);

View File

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