Added /build subpage to view build options

This commit is contained in:
cschwinne 2018-01-10 00:37:45 +01:00
parent 6ce74a2f3a
commit e83ea97a68
4 changed files with 48 additions and 8 deletions

View File

@ -28,7 +28,8 @@
#include "WS2812FX.h" #include "WS2812FX.h"
//version in format yymmddb (b = daily build) //version in format yymmddb (b = daily build)
#define VERSION 1801095 #define VERSION 1801101
const String versionName = "WLED 0.5dev";
//AP and OTA default passwords (change them!) //AP and OTA default passwords (change them!)
String appass = "wled1234"; String appass = "wled1234";

View File

@ -161,7 +161,7 @@ String getSettings()
resp += "Not active"; resp += "Not active";
} }
resp += "\";"; resp += "\";";
resp += dg + "(\"msg\")[0]" + ih + "\"WLED 0.5dev (build " + VERSION + ") OK\";"; resp += dg + "(\"msg\")[0]" + ih + "\""+ versionName +" (build " + VERSION + ") OK\";";
return resp; return resp;
} }

View File

@ -122,6 +122,50 @@ void wledInit()
val += "mA currently\nNotice: This is just an estimate which does not take into account several factors (like effects and wire resistance). It is NOT an accurate measurement!"; val += "mA currently\nNotice: This is just an estimate which does not take into account several factors (like effects and wire resistance). It is NOT an accurate measurement!";
server.send(200, "text/plain", val); server.send(200, "text/plain", val);
}); });
server.on("/build", HTTP_GET, [](){
String info = "hard-coded build info:\r\n\n";
#ifdef ARDUINO_ARCH_ESP32
info += "platform: esp32\r\n";
#else
info += "platform: esp8266\r\n";
#endif
info += "name: " + versionName + "\r\n";
info += "version: " + (String)VERSION + "\r\n";
#ifdef RGBW
info += "rgbw: true\r\n";
#else
info += "rgbw: false\r\n";
#endif
info += "max-leds: " + (String)LEDCOUNT + "\r\n";
info += "max-direct: " + (String)MAXDIRECT + "\r\n";
#ifdef USEOVERLAYS
info += "overlays: true\r\n";
#else
info += "overlays: false\r\n";
#endif
#ifdef CRONIXIE
info += "cronixie: true\r\n";
#else
info += "cronixie: false\r\n";
#endif
#ifdef USEFS
info += "spiffs: true\r\n";
#else
info += "spiffs: false\r\n";
#endif
#ifdef DEBUG
info += "debug: true\r\n";
#else
info += "debug: false\r\n";
#endif
info += "button-pin: gpio" + String(buttonPin) + "\r\n";
#ifdef ARDUINO_ARCH_ESP32
info += "strip-pin: gpio" + String(PIN) + "\r\n";
#else
info += "strip-pin: gpio2\r\n";
#endif
server.send(200, "text/plain", info);
});
if (!otaLock){ if (!otaLock){
server.on("/edit", HTTP_GET, [](){ server.on("/edit", HTTP_GET, [](){
if(!handleFileRead("/edit.htm")) server.send(200, "text/html", PAGE_edit); if(!handleFileRead("/edit.htm")) server.send(200, "text/html", PAGE_edit);

View File

@ -5,7 +5,7 @@
* https://github.com/kakopappa/arduino-esp8266-alexa-wemo-switch * https://github.com/kakopappa/arduino-esp8266-alexa-wemo-switch
* https://github.com/probonopd/ESP8266HueEmulator * https://github.com/probonopd/ESP8266HueEmulator
*/ */
#ifndef TEST//ARDUINO_ARCH_ESP32
void alexaInit() void alexaInit()
{ {
if (alexaEnabled && WiFi.status() == WL_CONNECTED) if (alexaEnabled && WiFi.status() == WL_CONNECTED)
@ -277,8 +277,3 @@ boolean connectUDP(){
return state; return state;
} }
#else
void handleAlexa(){};
bool handleAlexaApiCall(String u, String b){return false;};
void alexaInit(){};
#endif