FS working for ESP8266
This commit is contained in:
parent
362156c8ab
commit
98e4ac6b27
@ -124,7 +124,7 @@ build_flags = -g -w -DMQTT_MAX_PACKET_SIZE=1024 -DPIO_FRAMEWORK_ARDUINO_LWIP_HIG
|
|||||||
-D DECODE_LG=true
|
-D DECODE_LG=true
|
||||||
|
|
||||||
build_flags_esp8266 = ${common.build_flags} -DESP8266
|
build_flags_esp8266 = ${common.build_flags} -DESP8266
|
||||||
build_flags_esp32 = ${common.build_flags} -DARDUINO_ARCH_ESP32
|
build_flags_esp32 = ${common.build_flags} -DARDUINO_ARCH_ESP32 -DCONFIG_LITTLEFS_FOR_IDF_3_2
|
||||||
|
|
||||||
# enables all features for travis CI
|
# enables all features for travis CI
|
||||||
build_flags_all_features =
|
build_flags_all_features =
|
||||||
@ -138,6 +138,8 @@ build_flags_all_features =
|
|||||||
|
|
||||||
ldscript_512k = eagle.flash.512k.ld ;for older versions change this to eagle.flash.512k0.ld
|
ldscript_512k = eagle.flash.512k.ld ;for older versions change this to eagle.flash.512k0.ld
|
||||||
ldscript_1m0m = eagle.flash.1m.ld ;for older versions change this to eagle.flash.1m0.ld
|
ldscript_1m0m = eagle.flash.1m.ld ;for older versions change this to eagle.flash.1m0.ld
|
||||||
|
ldscript_1m128k = eagle.flash.1m128.ld
|
||||||
|
ldscript_2m512k = eagle.flash.2m512.ld
|
||||||
ldscript_2m1m = eagle.flash.2m1m.ld
|
ldscript_2m1m = eagle.flash.2m1m.ld
|
||||||
ldscript_4m1m = eagle.flash.4m1m.ld
|
ldscript_4m1m = eagle.flash.4m1m.ld
|
||||||
ldscript_4m3m = eagle.flash.4m3m.ld
|
ldscript_4m3m = eagle.flash.4m3m.ld
|
||||||
@ -165,13 +167,13 @@ lib_extra_dirs =
|
|||||||
lib_compat_mode = strict
|
lib_compat_mode = strict
|
||||||
lib_deps =
|
lib_deps =
|
||||||
FastLED@3.3.2
|
FastLED@3.3.2
|
||||||
#NeoPixelBus@2.5.7
|
NeoPixelBus@2.6.0
|
||||||
https://github.com/Makuna/NeoPixelBus
|
|
||||||
ESPAsyncTCP@1.2.0
|
ESPAsyncTCP@1.2.0
|
||||||
ESPAsyncUDP
|
ESPAsyncUDP
|
||||||
AsyncTCP@1.0.3
|
AsyncTCP@1.0.3
|
||||||
https://github.com/Aircoookie/ESPAsyncWebServer
|
https://github.com/Aircoookie/ESPAsyncWebServer
|
||||||
IRremoteESP8266@2.7.3
|
IRremoteESP8266@2.7.3
|
||||||
|
https://github.com/lorol/LITTLEFS.git
|
||||||
#For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line
|
#For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line
|
||||||
#TFT_eSPI
|
#TFT_eSPI
|
||||||
#For use SSD1306 OLED display uncomment following
|
#For use SSD1306 OLED display uncomment following
|
||||||
@ -213,7 +215,7 @@ build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_ALEXA -D WLED_DISABL
|
|||||||
[env:esp01_1m_full]
|
[env:esp01_1m_full]
|
||||||
board = esp01_1m
|
board = esp01_1m
|
||||||
platform = ${common.platform_wled_default}
|
platform = ${common.platform_wled_default}
|
||||||
board_build.ldscript = ${common.ldscript_1m0m}
|
board_build.ldscript = ${common.ldscript_1m128k}
|
||||||
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA
|
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA
|
||||||
|
|
||||||
[env:esp07]
|
[env:esp07]
|
||||||
|
@ -50,9 +50,9 @@
|
|||||||
/* each segment uses 52 bytes of SRAM memory, so if you're application fails because of
|
/* each segment uses 52 bytes of SRAM memory, so if you're application fails because of
|
||||||
insufficient memory, decreasing MAX_NUM_SEGMENTS may help */
|
insufficient memory, decreasing MAX_NUM_SEGMENTS may help */
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
#define MAX_NUM_SEGMENTS 10
|
#define MAX_NUM_SEGMENTS 12
|
||||||
#else
|
#else
|
||||||
#define MAX_NUM_SEGMENTS 10
|
#define MAX_NUM_SEGMENTS 16
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* How much data bytes all segments combined may allocate */
|
/* How much data bytes all segments combined may allocate */
|
||||||
|
@ -298,7 +298,7 @@ void deserializeConfig() {
|
|||||||
getStringFromJson(otaPass, pwd, 33); //normally not present due to security
|
getStringFromJson(otaPass, pwd, 33); //normally not present due to security
|
||||||
}
|
}
|
||||||
|
|
||||||
//DMX missing!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void serializeConfig() {
|
void serializeConfig() {
|
||||||
@ -564,6 +564,18 @@ void serializeConfig() {
|
|||||||
ota[F("lock-wifi")] = wifiLock;
|
ota[F("lock-wifi")] = wifiLock;
|
||||||
ota[F("pskl")] = strlen(otaPass);
|
ota[F("pskl")] = strlen(otaPass);
|
||||||
ota[F("aota")] = aOtaEnabled;
|
ota[F("aota")] = aOtaEnabled;
|
||||||
|
|
||||||
|
#ifdef WLED_ENABLE_DMX
|
||||||
|
JsonObject dmx = doc.createNestedObject("dmx");
|
||||||
|
dmx[F("chan")] = DMXChannels;
|
||||||
|
dmx[F("gap")] = DMXGap;
|
||||||
|
dmx[F("start")] = DMXStart;
|
||||||
|
dmx[F("start-led")] = DMXStartLED;
|
||||||
|
|
||||||
|
JsonArray dmx_fixmap = dmx.createNestedArray("fixmap");
|
||||||
|
for (byte i = 0; i < 15; i++)
|
||||||
|
dmx_fixmap.add(DMXFixtureMap[i]);
|
||||||
|
#endif
|
||||||
//}
|
//}
|
||||||
|
|
||||||
File f = WLED_FS.open("/cfg.json", "w");
|
File f = WLED_FS.open("/cfg.json", "w");
|
||||||
|
File diff suppressed because one or more lines are too long
@ -46,7 +46,7 @@
|
|||||||
var ih="<tr><th>Active</th><th>Hour</th><th>Minute</th><th>Preset</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th></tr>";
|
var ih="<tr><th>Active</th><th>Hour</th><th>Minute</th><th>Preset</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th></tr>";
|
||||||
for (i=0;i<8;i++)
|
for (i=0;i<8;i++)
|
||||||
{
|
{
|
||||||
ih+="<tr><td><input name=\"W"+i+"\" id=\"W"+i+"\" type=\"number\" style=\"display:none\"><input id=\"W"+i+"0\" type=\"checkbox\"></td><td><input name=\"H"+i+"\" type=\"number\" min=\"0\" max=\"24\"></td><td><input name=\"N"+i+"\" type=\"number\" min=\"0\" max=\"59\"></td><td><input name=\"T"+i+"\" type=\"number\" min=\"0\" max=\"16\"></td>";
|
ih+="<tr><td><input name=\"W"+i+"\" id=\"W"+i+"\" type=\"number\" style=\"display:none\"><input id=\"W"+i+"0\" type=\"checkbox\"></td><td><input name=\"H"+i+"\" type=\"number\" min=\"0\" max=\"24\"></td><td><input name=\"N"+i+"\" type=\"number\" min=\"0\" max=\"59\"></td><td><input name=\"T"+i+"\" type=\"number\" min=\"0\" max=\"250\"></td>";
|
||||||
for (j=1;j<8;j++) ih+="<td><input id=\"W"+i+j+"\" type=\"checkbox\"></td>";
|
for (j=1;j<8;j++) ih+="<td><input id=\"W"+i+j+"\" type=\"checkbox\"></td>";
|
||||||
}
|
}
|
||||||
gId("TMT").innerHTML=ih;
|
gId("TMT").innerHTML=ih;
|
||||||
@ -139,11 +139,11 @@
|
|||||||
<i>Presets now also can be used as macros to save both JSON and HTTP API commands.<br>
|
<i>Presets now also can be used as macros to save both JSON and HTTP API commands.<br>
|
||||||
Just enter the preset id below!</i>
|
Just enter the preset id below!</i>
|
||||||
<i>Use 0 for the default action instead of a preset</i><br>
|
<i>Use 0 for the default action instead of a preset</i><br>
|
||||||
Alexa On/Off Preset: <input name="A0" type="number" min="0" max="16" required> <input name="A1" type="number" min="0" max="16" required><br>
|
Alexa On/Off Preset: <input name="A0" type="number" min="0" max="250" required> <input name="A1" type="number" min="0" max="250" required><br>
|
||||||
Button short press Preset: Macro: <input name="MP" type="number" min="0" max="16" required><br>
|
Button short press Preset: Macro: <input name="MP" type="number" min="0" max="250" required><br>
|
||||||
Long Press: <input name="ML" type="number" min="0" max="16" required> Double press: <input name="MD" type="number" min="0" max="16" required><br>
|
Long Press: <input name="ML" type="number" min="0" max="250" required> Double press: <input name="MD" type="number" min="0" max="250" required><br>
|
||||||
Countdown-Over Preset: <input name="MC" type="number" min="0" max="16" required><br>
|
Countdown-Over Preset: <input name="MC" type="number" min="0" max="250" required><br>
|
||||||
Timed-Light-Over Presets: <input name="MN" type="number" min="0" max="16" required><br>
|
Timed-Light-Over Presets: <input name="MN" type="number" min="0" max="250" required><br>
|
||||||
<h3>Time-controlled presets</h3>
|
<h3>Time-controlled presets</h3>
|
||||||
<div style="display: inline-block">
|
<div style="display: inline-block">
|
||||||
<table id="TMT">
|
<table id="TMT">
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
|
|
||||||
#ifndef WLED_DISABLE_FILESYSTEM
|
#ifndef WLED_DISABLE_FILESYSTEM
|
||||||
|
|
||||||
#ifdef ARDUINO_ARCH_ESP32
|
#ifdef ARDUINO_ARCH_ESP32 //FS info bare IDF function until FS wrapper is available for ESP32
|
||||||
#include "esp_spiffs.h" //FS info bare IDF function until FS wrapper is available for ESP32
|
#if WLED_FS != LITTLEFS
|
||||||
|
#include "esp_spiffs.h"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FS_BUFSIZE 256
|
#define FS_BUFSIZE 256
|
||||||
@ -358,7 +360,12 @@ bool readObjectFromFile(const char* file, const char* key, JsonDocument* dest)
|
|||||||
|
|
||||||
void updateFSInfo() {
|
void updateFSInfo() {
|
||||||
#ifdef ARDUINO_ARCH_ESP32
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
|
#if WLED_FS == LITTLEFS
|
||||||
|
fsBytesTotal = LITTLEFS.totalBytes();
|
||||||
|
fsBytesUsed = LITTLEFS.usedBytes();
|
||||||
|
#else
|
||||||
esp_spiffs_info(nullptr, &fsBytesTotal, &fsBytesUsed);
|
esp_spiffs_info(nullptr, &fsBytesTotal, &fsBytesUsed);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
FSInfo fsi;
|
FSInfo fsi;
|
||||||
WLED_FS.info(fsi);
|
WLED_FS.info(fsi);
|
||||||
|
@ -283,7 +283,7 @@ type="submit">Save</button></form></body></html>)=====";
|
|||||||
// Autogenerated from wled00/data/settings_time.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_time.htm, do not edit!!
|
||||||
const char PAGE_settings_time[] PROGMEM = R"=====(<!DOCTYPE html><html><head><meta name="viewport" content="width=500"><meta
|
const char PAGE_settings_time[] PROGMEM = R"=====(<!DOCTYPE html><html><head><meta name="viewport" content="width=500"><meta
|
||||||
charset="utf-8"><title>Time Settings</title><script>
|
charset="utf-8"><title>Time Settings</title><script>
|
||||||
var d=document;function H(){window.open("https://github.com/Aircoookie/WLED/wiki/Settings#time-settings")}function B(){window.open("/settings","_self")}function S(){BTa(),GetV(),Cs(),FC()}function gId(t){return d.getElementById(t)}function Cs(){gId("cac").style.display="none",gId("coc").style.display="block",gId("ccc").style.display="none",gId("ca").selected&&(gId("cac").style.display="block"),gId("cc").selected&&(gId("coc").style.display="none",gId("ccc").style.display="block"),gId("cn").selected&&(gId("coc").style.display="none")}function BTa(){var t="<tr><th>Active</th><th>Hour</th><th>Minute</th><th>Macro</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th></tr>";for(i=0;i<8;i++)for(t+='<tr><td><input name="W'+i+'" id="W'+i+'" type="number" style="display:none"><input id="W'+i+'0" type="checkbox"></td><td><input name="H'+i+'" type="number" min="0" max="24"></td><td><input name="N'+i+'" type="number" min="0" max="59"></td><td><input name="T'+i+'" type="number" min="0" max="16"></td>',j=1;j<8;j++)t+='<td><input id="W'+i+j+'" type="checkbox"></td>';gId("TMT").innerHTML=t}function FC(){for(j=0;j<8;j++)for(i=0;i<8;i++)gId("W"+i+j).checked=gId("W"+i).value>>j&1}function Wd(){for(a=[0,0,0,0,0,0,0,0],i=0;i<8;i++){for(m=1,j=0;j<8;j++)a[i]+=gId("W"+i+j).checked*m,m*=2;gId("W"+i).value=a[i]}}function GetV() {
|
var d=document;function H(){window.open("https://github.com/Aircoookie/WLED/wiki/Settings#time-settings")}function B(){window.open("/settings","_self")}function S(){BTa(),GetV(),Cs(),FC()}function gId(t){return d.getElementById(t)}function Cs(){gId("cac").style.display="none",gId("coc").style.display="block",gId("ccc").style.display="none",gId("ca").selected&&(gId("cac").style.display="block"),gId("cc").selected&&(gId("coc").style.display="none",gId("ccc").style.display="block"),gId("cn").selected&&(gId("coc").style.display="none")}function BTa(){var t="<tr><th>Active</th><th>Hour</th><th>Minute</th><th>Preset</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th></tr>";for(i=0;i<8;i++)for(t+='<tr><td><input name="W'+i+'" id="W'+i+'" type="number" style="display:none"><input id="W'+i+'0" type="checkbox"></td><td><input name="H'+i+'" type="number" min="0" max="24"></td><td><input name="N'+i+'" type="number" min="0" max="59"></td><td><input name="T'+i+'" type="number" min="0" max="250"></td>',j=1;j<8;j++)t+='<td><input id="W'+i+j+'" type="checkbox"></td>';gId("TMT").innerHTML=t}function FC(){for(j=0;j<8;j++)for(i=0;i<8;i++)gId("W"+i+j).checked=gId("W"+i).value>>j&1}function Wd(){for(a=[0,0,0,0,0,0,0,0],i=0;i<8;i++){for(m=1,j=0;j<8;j++)a[i]+=gId("W"+i+j).checked*m,m*=2;gId("W"+i).value=a[i]}}function GetV() {
|
||||||
%CSS%%SCSS%</head><body onload="S()"><form
|
%CSS%%SCSS%</head><body onload="S()"><form
|
||||||
id="form_s" name="Sf" method="post" onsubmit="Wd()"><div class="helpB"><button
|
id="form_s" name="Sf" method="post" onsubmit="Wd()"><div class="helpB"><button
|
||||||
type="button" onclick="H()">?</button></div><button type="button" onclick="B()">
|
type="button" onclick="H()">?</button></div><button type="button" onclick="B()">
|
||||||
@ -318,28 +318,20 @@ Year: 20 <input name="CY" type="number" min="0" max="99" required> Month: <input
|
|||||||
type="number" min="1" max="31" required><br>Hour: <input name="CH"
|
type="number" min="1" max="31" required><br>Hour: <input name="CH"
|
||||||
type="number" min="0" max="23" required> Minute: <input name="CM" type="number"
|
type="number" min="0" max="23" required> Minute: <input name="CM" type="number"
|
||||||
min="0" max="59" required> Second: <input name="CS" type="number" min="0"
|
min="0" max="59" required> Second: <input name="CS" type="number" min="0"
|
||||||
max="59" required><br><h3>Advanced Macros</h3>Define API macros here:<br>1:
|
max="59" required><br><h3>Macro presets</h3><b>Macros have moved!</b><br><i>
|
||||||
<input name="M1" maxlength="64"><br>2: <input name="M2" maxlength="64"><br>3:
|
Presets now also can be used as macros to save both JSON and HTTP API commands.
|
||||||
<input name="M3" maxlength="64"><br>4: <input name="M4" maxlength="64"><br>5:
|
<br>Just enter the preset id below!</i> <i>
|
||||||
<input name="M5" maxlength="64"><br>6: <input name="M6" maxlength="64"><br>7:
|
Use 0 for the default action instead of a preset</i><br>Alexa On/Off Preset:
|
||||||
<input name="M7" maxlength="64"><br>8: <input name="M8" maxlength="64"><br>9:
|
<input name="A0" type="number" min="0" max="250" required> <input name="A1"
|
||||||
<input name="M9" maxlength="64"><br>10: <input name="M10" maxlength="64"><br>
|
type="number" min="0" max="250" required><br>Button short press Preset: Macro:
|
||||||
11: <input name="M11" maxlength="64"><br>12: <input name="M12" maxlength="64">
|
<input name="MP" type="number" min="0" max="250" required><br>Long Press: <input
|
||||||
<br>13: <input name="M13" maxlength="64"><br>14: <input name="M14"
|
name="ML" type="number" min="0" max="250" required> Double press: <input
|
||||||
maxlength="64"><br>15: <input name="M15" maxlength="64"><br>16: <input
|
name="MD" type="number" min="0" max="250" required><br>Countdown-Over Preset:
|
||||||
name="M16" maxlength="64"><br><br><i>
|
<input name="MC" type="number" min="0" max="250" required><br>
|
||||||
Use 0 for the default action instead of a macro</i><br>Boot Macro: <input
|
Timed-Light-Over Presets: <input name="MN" type="number" min="0" max="250"
|
||||||
name="MB" type="number" min="0" max="16" required><br>Alexa On/Off Macros:
|
required><br><h3>Time-controlled presets</h3><div style="display:inline-block">
|
||||||
<input name="A0" type="number" min="0" max="16" required> <input name="A1"
|
<table id="TMT"></table></div><hr><button type="button" onclick="B()">Back
|
||||||
type="number" min="0" max="16" required><br>Button short press macro: Macro:
|
</button><button type="submit">Save</button></form></body></html>)=====";
|
||||||
<input name="MP" type="number" min="0" max="16" required><br>Long Press: <input
|
|
||||||
name="ML" type="number" min="0" max="16" required> Double press: <input
|
|
||||||
name="MD" type="number" min="0" max="16" required><br>Countdown-Over Macro:
|
|
||||||
<input name="MC" type="number" min="0" max="16" required><br>
|
|
||||||
Timed-Light-Over Macro: <input name="MN" type="number" min="0" max="16"
|
|
||||||
required><br>Time-Controlled Macros:<br><div style="display:inline-block"><table
|
|
||||||
id="TMT"></table></div><hr><button type="button" onclick="B()">Back</button>
|
|
||||||
<button type="submit">Save</button></form></body></html>)=====";
|
|
||||||
|
|
||||||
|
|
||||||
// Autogenerated from wled00/data/settings_sec.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_sec.htm, do not edit!!
|
||||||
|
3929
wled00/html_ui.h
3929
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ void deserializeSegment(JsonObject elem, byte it)
|
|||||||
{
|
{
|
||||||
WS2812FX::Segment& seg = strip.getSegment(id);
|
WS2812FX::Segment& seg = strip.getSegment(id);
|
||||||
uint16_t start = elem[F("start")] | seg.start;
|
uint16_t start = elem[F("start")] | seg.start;
|
||||||
int stop = elem[F("stop")] | -1;
|
int stop = elem["stop"] | -1;
|
||||||
|
|
||||||
if (stop < 0) {
|
if (stop < 0) {
|
||||||
uint16_t len = elem[F("len")];
|
uint16_t len = elem[F("len")];
|
||||||
@ -170,7 +170,7 @@ bool deserializeState(JsonObject root)
|
|||||||
|
|
||||||
int cy = root[F("pl")] | -2;
|
int cy = root[F("pl")] | -2;
|
||||||
if (cy > -2) presetCyclingEnabled = (cy >= 0);
|
if (cy > -2) presetCyclingEnabled = (cy >= 0);
|
||||||
JsonObject ccnf = root[F("ccnf")];
|
JsonObject ccnf = root["ccnf"];
|
||||||
presetCycleMin = ccnf[F("min")] | presetCycleMin;
|
presetCycleMin = ccnf[F("min")] | presetCycleMin;
|
||||||
presetCycleMax = ccnf[F("max")] | presetCycleMax;
|
presetCycleMax = ccnf[F("max")] | presetCycleMax;
|
||||||
tr = ccnf[F("time")] | -1;
|
tr = ccnf[F("time")] | -1;
|
||||||
@ -183,7 +183,7 @@ bool deserializeState(JsonObject root)
|
|||||||
nightlightMode = nl[F("mode")] | nightlightMode;
|
nightlightMode = nl[F("mode")] | nightlightMode;
|
||||||
nightlightTargetBri = nl[F("tbri")] | nightlightTargetBri;
|
nightlightTargetBri = nl[F("tbri")] | nightlightTargetBri;
|
||||||
|
|
||||||
JsonObject udpn = root[F("udpn")];
|
JsonObject udpn = root["udpn"];
|
||||||
notifyDirect = udpn[F("send")] | notifyDirect;
|
notifyDirect = udpn[F("send")] | notifyDirect;
|
||||||
receiveNotifications = udpn[F("recv")] | receiveNotifications;
|
receiveNotifications = udpn[F("recv")] | receiveNotifications;
|
||||||
bool noNotification = udpn[F("nn")]; //send no notification just for this request
|
bool noNotification = udpn[F("nn")]; //send no notification just for this request
|
||||||
@ -200,7 +200,7 @@ bool deserializeState(JsonObject root)
|
|||||||
if (strip.getMainSegmentId() != prevMain) setValuesFromMainSeg();
|
if (strip.getMainSegmentId() != prevMain) setValuesFromMainSeg();
|
||||||
|
|
||||||
int it = 0;
|
int it = 0;
|
||||||
JsonVariant segVar = root[F("seg")];
|
JsonVariant segVar = root["seg"];
|
||||||
if (segVar.is<JsonObject>())
|
if (segVar.is<JsonObject>())
|
||||||
{
|
{
|
||||||
int id = segVar[F("id")] | -1;
|
int id = segVar[F("id")] | -1;
|
||||||
@ -235,8 +235,6 @@ bool deserializeState(JsonObject root)
|
|||||||
|
|
||||||
usermods.readFromJsonState(root);
|
usermods.readFromJsonState(root);
|
||||||
|
|
||||||
colorUpdated(noNotification ? NOTIFIER_CALL_MODE_NO_NOTIFY : NOTIFIER_CALL_MODE_DIRECT_CHANGE);
|
|
||||||
|
|
||||||
int ps = root[F("psave")] | -1;
|
int ps = root[F("psave")] | -1;
|
||||||
if (ps > 0) {
|
if (ps > 0) {
|
||||||
savePreset(ps, true, nullptr, root);
|
savePreset(ps, true, nullptr, root);
|
||||||
@ -246,7 +244,7 @@ bool deserializeState(JsonObject root)
|
|||||||
deletePreset(ps);
|
deletePreset(ps);
|
||||||
}
|
}
|
||||||
ps = root[F("ps")] | -1; //load preset (clears state request!)
|
ps = root[F("ps")] | -1; //load preset (clears state request!)
|
||||||
if (ps >= 0) applyPreset(ps);
|
if (ps >= 0) {applyPreset(ps); return stateResponse;}
|
||||||
|
|
||||||
//HTTP API commands
|
//HTTP API commands
|
||||||
const char* httpwin = root["win"];
|
const char* httpwin = root["win"];
|
||||||
@ -257,6 +255,8 @@ bool deserializeState(JsonObject root)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
colorUpdated(noNotification ? NOTIFIER_CALL_MODE_NO_NOTIFY : NOTIFIER_CALL_MODE_DIRECT_CHANGE);
|
||||||
|
|
||||||
return stateResponse;
|
return stateResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ void serializeSegment(JsonObject& root, WS2812FX::Segment& seg, byte id, bool fo
|
|||||||
root[F("id")] = id;
|
root[F("id")] = id;
|
||||||
if (segmentBounds) {
|
if (segmentBounds) {
|
||||||
root[F("start")] = seg.start;
|
root[F("start")] = seg.start;
|
||||||
root[F("stop")] = seg.stop;
|
root["stop"] = seg.stop;
|
||||||
}
|
}
|
||||||
if (!forPreset) root[F("len")] = seg.stop - seg.start;
|
if (!forPreset) root[F("len")] = seg.stop - seg.start;
|
||||||
root[F("grp")] = seg.grouping;
|
root[F("grp")] = seg.grouping;
|
||||||
@ -351,6 +351,9 @@ void serializeState(JsonObject root, bool forPreset, bool includeBri, bool segme
|
|||||||
{
|
{
|
||||||
JsonObject seg0 = seg.createNestedObject();
|
JsonObject seg0 = seg.createNestedObject();
|
||||||
serializeSegment(seg0, sg, s, forPreset, segmentBounds);
|
serializeSegment(seg0, sg, s, forPreset, segmentBounds);
|
||||||
|
} else if (forPreset && segmentBounds) { //disable segments not part of preset
|
||||||
|
JsonObject seg0 = seg.createNestedObject();
|
||||||
|
seg0["stop"] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ void checkTimers()
|
|||||||
&& (timerWeekday[i] & 0x01) //timer is enabled
|
&& (timerWeekday[i] & 0x01) //timer is enabled
|
||||||
&& timerWeekday[i] >> weekdayMondayFirst() & 0x01) //timer should activate at current day of week
|
&& timerWeekday[i] >> weekdayMondayFirst() & 0x01) //timer should activate at current day of week
|
||||||
{
|
{
|
||||||
applyMacro(timerMacro[i]);
|
applyPreset(timerMacro[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
/*
|
/*
|
||||||
Main sketch, global variable declarations
|
Main sketch, global variable declarations
|
||||||
@title WLED project sketch
|
@title WLED project sketch
|
||||||
@version 0.10.2
|
@version 0.11.0p
|
||||||
@author Christian Schwinne
|
@author Christian Schwinne
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2010300
|
#define VERSION 2011080
|
||||||
|
|
||||||
// ESP8266-01 (blue) got too little storage space to work with WLED. 0.10.2 is the last release supporting this unit.
|
// ESP8266-01 (blue) got too little storage space to work with WLED. 0.10.2 is the last release supporting this unit.
|
||||||
|
|
||||||
@ -61,7 +61,9 @@
|
|||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
#include <ESPmDNS.h>
|
#include <ESPmDNS.h>
|
||||||
#include <AsyncTCP.h>
|
#include <AsyncTCP.h>
|
||||||
#include "SPIFFS.h"
|
//#include "SPIFFS.h"
|
||||||
|
#define CONFIG_LITTLEFS_FOR_IDF_3_2
|
||||||
|
#include <LITTLEFS.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <ESPAsyncWebServer.h>
|
#include <ESPAsyncWebServer.h>
|
||||||
@ -131,11 +133,11 @@
|
|||||||
#include <IRutils.h>
|
#include <IRutils.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Filesystem to use for preset and config files. SPIFFS or LittleFS on ESP8266, SPIFFS only on ESP32
|
//Filesystem to use for preset and config files. SPIFFS or LittleFS on ESP8266, SPIFFS only on ESP32 (now using LITTLEFS port by lorol)
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
#define WLED_FS LittleFS
|
#define WLED_FS LittleFS
|
||||||
#else
|
#else
|
||||||
#define WLED_FS SPIFFS
|
#define WLED_FS LITTLEFS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// remove flicker because PWM signal of RGB channels can become out of phase (part of core as of Arduino core v2.7.0)
|
// remove flicker because PWM signal of RGB channels can become out of phase (part of core as of Arduino core v2.7.0)
|
||||||
|
@ -341,7 +341,7 @@ void loadSettingsFromEEPROM()
|
|||||||
for (int i=0;i<15;i++) {
|
for (int i=0;i<15;i++) {
|
||||||
DMXFixtureMap[i] = EEPROM.read(2535+i);
|
DMXFixtureMap[i] = EEPROM.read(2535+i);
|
||||||
} //last used: 2549
|
} //last used: 2549
|
||||||
EEPROM.write(2550, DMXStartLED);
|
EEPROM.read(2550, DMXStartLED);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Usermod memory
|
//Usermod memory
|
||||||
|
Loading…
Reference in New Issue
Block a user