Merge pull request #12 from FabLab-Luenen/development

Merge
This commit is contained in:
bpohvoodoo
2019-03-20 20:57:33 +01:00
committed by GitHub
4 changed files with 1729 additions and 1697 deletions
+9 -9
View File
@@ -30,15 +30,6 @@
#include <ArduinoJson.h> //https://github.com/bblanchon/ArduinoJson #include <ArduinoJson.h> //https://github.com/bblanchon/ArduinoJson
#if defined(ENABLE_E131)
// ***************************************************************************
// Load libraries for E131 support
// ***************************************************************************
#include <ESPAsyncUDP.h> //https://github.com/me-no-dev/ESPAsyncUDP
#include <ESPAsyncE131.h> //https://github.com/forkineye/ESPAsyncE131
ESPAsyncE131* e131 = NULL; //(END_UNIVERSE - START_UNIVERSE + 1);
#endif
// MQTT // MQTT
#if defined(ENABLE_MQTT) #if defined(ENABLE_MQTT)
#if ENABLE_MQTT == 0 #if ENABLE_MQTT == 0
@@ -68,6 +59,15 @@
#endif #endif
#endif #endif
#if defined(ENABLE_E131)
// ***************************************************************************
// Load libraries for E131 support
// ***************************************************************************
#include <ESPAsyncUDP.h> //https://github.com/me-no-dev/ESPAsyncUDP
#include <ESPAsyncE131.h> //https://github.com/forkineye/ESPAsyncE131
ESPAsyncE131* e131 = NULL; //(END_UNIVERSE - START_UNIVERSE + 1);
#endif
#if defined(ENABLE_REMOTE) #if defined(ENABLE_REMOTE)
// *************************************************************************** // ***************************************************************************
// Load libraries for IR remote support // Load libraries for IR remote support
File diff suppressed because it is too large Load Diff
+15 -24
View File
@@ -1362,21 +1362,6 @@ function colorNumrVals(){
speedNumVal.value = speed.value; speedNumVal.value = speed.value;
} }
function configVals(){
document.getElementById("hostname").value = config.hostname;
document.getElementById("mqtt_host").value = config.mqtt_host;
document.getElementById("mqtt_port").value = config.mqtt_port;
document.getElementById("mqtt_user").value = config.mqtt_user;
document.getElementById("mqtt_pass").value = config.mqtt_pass;
document.getElementById("selectcount").value = config.ws_cnt;
document.getElementById("selectrgbo").value = config.ws_rgbo;
document.getElementById("selectpin").value = config.ws_pin;
document.getElementById("selectoptrev").value = (config.ws_fxopt & 128);
document.getElementById("selectoptfade").value = (config.ws_fxopt & 112);
document.getElementById("selectoptgamma").value = (config.ws_fxopt & 8);
document.getElementById("selectoptsize").value = (config.ws_fxopt & 6);
}
// initial colors when DOM is loaded // initial colors when DOM is loaded
function initSliderColors(){ function initSliderColors(){
// label bg colors // label bg colors
@@ -2177,14 +2162,15 @@ function ws_connect() {
} }
} }
// Config starts here // Config starts here
if (typeof res.hostname !== "undefined") config.hostname = res.hostname; if (typeof res.hostname !== "undefined") { config.hostname = res.hostname; document.getElementById("hostname").value = config.hostname; }
if (typeof res.mqtt_host !== "undefined") config.mqtt_host = res.mqtt_host; if (typeof res.mqtt_host !== "undefined") { config.mqtt_host = res.mqtt_host; document.getElementById("mqtt_host").value = config.mqtt_host; }
if (typeof res.mqtt_port !== "undefined") config.mqtt_port = res.mqtt_port; if (typeof res.mqtt_port !== "undefined") { config.mqtt_port = res.mqtt_port; document.getElementById("mqtt_port").value = config.mqtt_port; }
if (typeof res.mqtt_user !== "undefined") config.mqtt_user = res.mqtt_user; if (typeof res.mqtt_user !== "undefined") { config.mqtt_user = res.mqtt_user; document.getElementById("mqtt_user").value = config.mqtt_user; }
if (typeof res.mqtt_pass !== "undefined") config.mqtt_pass = res.mqtt_pass; if (typeof res.mqtt_pass !== "undefined") { config.mqtt_pass = res.mqtt_pass; document.getElementById("mqtt_pass").value = config.mqtt_pass; }
if (typeof res.ws_cnt !== "undefined") config.ws_cnt = res.ws_cnt; if (typeof res.ws_cnt !== "undefined") { config.ws_cnt = res.ws_cnt; document.getElementById("selectcount").value = config.ws_cnt; }
if (typeof res.ws_rgbo !== "undefined") { if (typeof res.ws_rgbo !== "undefined") {
config.ws_rgbo = res.ws_rgbo; config.ws_rgbo = res.ws_rgbo;
document.getElementById("selectrgbo").value = config.ws_rgbo;
config.enable_rgbw = config.ws_rgbo.includes("W"); config.enable_rgbw = config.ws_rgbo.includes("W");
if (config.enable_rgbw) { if (config.enable_rgbw) {
document.getElementById("white").parentNode.className = ""; document.getElementById("white").parentNode.className = "";
@@ -2197,8 +2183,14 @@ function ws_connect() {
} }
} }
if (typeof res.ws_pin !== "undefined") config.ws_pin = res.ws_pin; if (typeof res.ws_pin !== "undefined") { config.ws_pin = res.ws_pin; document.getElementById("selectpin").value = config.ws_pin; }
if (typeof res.ws_fxopt !== "undefined") config.ws_fxopt = res.ws_fxopt; if (typeof res.ws_fxopt !== "undefined") {
config.ws_fxopt = res.ws_fxopt;
document.getElementById("selectoptrev").value = (config.ws_fxopt & 128);
document.getElementById("selectoptfade").value = (config.ws_fxopt & 112);
document.getElementById("selectoptgamma").value = (config.ws_fxopt & 8);
document.getElementById("selectoptsize").value = (config.ws_fxopt & 6);
}
// Modes starts here // Modes starts here
if (typeof res[0] !== "undefined") { if (typeof res[0] !== "undefined") {
res.forEach(item => { res.forEach(item => {
@@ -2209,7 +2201,6 @@ function ws_connect() {
} }
// init Color Vals // init Color Vals
colorNumrVals(); colorNumrVals();
configVals();
initSliderColors(); initSliderColors();
// init Change Range Val // init Change Range Val
changeRangeNumVal(); changeRangeNumVal();
Binary file not shown.