Skip to content

Commit 7c05914

Browse files
committed
Merge branch 'main' into aws-queue-0_16
2 parents 2181618 + daa438b commit 7c05914

File tree

10 files changed

+240
-45
lines changed

10 files changed

+240
-45
lines changed

.devcontainer/devcontainer.json

+22-21
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,30 @@
2424
// risk to running the build directly on the host.
2525
// "runArgs": ["--privileged", "-v", "/dev/bus/usb:/dev/bus/usb", "--group-add", "dialout"],
2626

27-
// Set *default* container specific settings.json values on container create.
28-
"settings": {
29-
"terminal.integrated.shell.linux": "/bin/bash",
30-
"python.pythonPath": "/usr/local/bin/python",
31-
"python.linting.enabled": true,
32-
"python.linting.pylintEnabled": true,
33-
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
34-
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
35-
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
36-
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
37-
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
38-
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
39-
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
40-
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
41-
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
27+
"customizations": {
28+
"vscode": {
29+
"settings": {
30+
"terminal.integrated.shell.linux": "/bin/bash",
31+
"python.pythonPath": "/usr/local/bin/python",
32+
"python.linting.enabled": true,
33+
"python.linting.pylintEnabled": true,
34+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
35+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
36+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
37+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
38+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
39+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
40+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
41+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
42+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
43+
},
44+
"extensions": [
45+
"ms-python.python",
46+
"platformio.platformio-ide"
47+
]
48+
}
4249
},
4350

44-
// Add the IDs of extensions you want installed when the container is created.
45-
"extensions": [
46-
"ms-python.python",
47-
"platformio.platformio-ide"
48-
],
49-
5051
// Use 'forwardPorts' to make a list of ports inside the container available locally.
5152
// "forwardPorts": [],
5253

.github/workflows/nightly.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ jobs:
3737
prerelease: true
3838
body: ${{ steps.changelog.outputs.changelog }}
3939
files: |
40-
./*.bin
40+
*.bin
41+
*.bin.gz

platformio.ini

+18-5
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,13 @@ lib_deps_compat =
238238
https://github.com/blazoncek/QuickESPNow.git#optional-debug
239239
https://github.com/Aircoookie/ESPAsyncWebServer.git#v2.4.0
240240

241+
[esp32_all_variants]
242+
lib_deps =
243+
willmmiles/AsyncTCP @ 1.3.1
244+
bitbank2/AnimatedGIF@^1.4.7
245+
https://github.com/Aircoookie/GifDecoder#bc3af18
246+
build_flags =
247+
-D WLED_ENABLE_GIF
241248

242249
[esp32]
243250
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.3/platform-espressif32-2.0.2.3.zip
@@ -251,6 +258,8 @@ build_flags = -g
251258
#use LITTLEFS library by lorol in ESP32 core 1.x.x instead of built-in in 2.x.x
252259
-D LOROL_LITTLEFS
253260
; -DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when building with arduino-esp32 >=2.0.3
261+
${esp32_all_variants.build_flags}
262+
254263
tiny_partitions = tools/WLED_ESP32_2MB_noOTA.csv
255264
default_partitions = tools/WLED_ESP32_4MB_1MB_FS.csv
256265
extended_partitions = tools/WLED_ESP32_4MB_700k_FS.csv
@@ -259,7 +268,7 @@ large_partitions = tools/WLED_ESP32_8MB.csv
259268
extreme_partitions = tools/WLED_ESP32_16MB_9MB_FS.csv
260269
lib_deps =
261270
https://github.com/lorol/LITTLEFS.git
262-
willmmiles/AsyncTCP @ 1.3.1
271+
${esp32_all_variants.lib_deps}
263272
${env.lib_deps}
264273
# additional build flags for audioreactive
265274
AR_build_flags = -D USERMOD_AUDIOREACTIVE
@@ -282,9 +291,10 @@ build_flags = -g
282291
-DARDUINO_ARCH_ESP32 -DESP32
283292
-D CONFIG_ASYNC_TCP_USE_WDT=0
284293
-DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when building with arduino-esp32 >=2.0.3
294+
${esp32_all_variants.build_flags}
285295
-D WLED_ENABLE_DMX_INPUT
286296
lib_deps =
287-
willmmiles/AsyncTCP @ 1.3.1
297+
${esp32_all_variants.lib_deps}
288298
https://github.com/someweisguy/esp_dmx.git#47db25d
289299
${env.lib_deps}
290300
board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs
@@ -303,8 +313,9 @@ build_flags = -g
303313
-DARDUINO_USB_MODE=0 ;; this flag is mandatory for ESP32-S2 !
304314
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
305315
;; ARDUINO_USB_CDC_ON_BOOT
316+
${esp32_all_variants.build_flags}
306317
lib_deps =
307-
willmmiles/AsyncTCP @ 1.3.1
318+
${esp32_all_variants.lib_deps}
308319
${env.lib_deps}
309320
board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs
310321

@@ -321,8 +332,9 @@ build_flags = -g
321332
-DARDUINO_USB_MODE=1 ;; this flag is mandatory for ESP32-C3
322333
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
323334
;; ARDUINO_USB_CDC_ON_BOOT
335+
${esp32_all_variants.build_flags}
324336
lib_deps =
325-
willmmiles/AsyncTCP @ 1.3.1
337+
${esp32_all_variants.lib_deps}
326338
${env.lib_deps}
327339
board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs
328340
board_build.flash_mode = qio
@@ -341,8 +353,9 @@ build_flags = -g
341353
-DCO
342354
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
343355
;; ARDUINO_USB_MODE, ARDUINO_USB_CDC_ON_BOOT
356+
${esp32_all_variants.build_flags}
344357
lib_deps =
345-
willmmiles/AsyncTCP @ 1.3.1
358+
${esp32_all_variants.lib_deps}
346359
${env.lib_deps}
347360
board_build.partitions = ${esp32.large_partitions} ;; default partioning for 8MB flash - can be overridden in build envs
348361

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.12
2+
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
55
# pip-compile

wled00/FX.cpp

+21-1
Original file line numberDiff line numberDiff line change
@@ -4450,6 +4450,24 @@ uint16_t mode_washing_machine(void) {
44504450
static const char _data_FX_MODE_WASHING_MACHINE[] PROGMEM = "Washing Machine@!,!;;!";
44514451

44524452

4453+
/*
4454+
Image effect
4455+
Draws a .gif image from filesystem on the matrix/strip
4456+
*/
4457+
uint16_t mode_image(void) {
4458+
#ifndef WLED_ENABLE_GIF
4459+
return mode_static();
4460+
#else
4461+
renderImageToSegment(SEGMENT);
4462+
return FRAMETIME;
4463+
#endif
4464+
// if (status != 0 && status != 254 && status != 255) {
4465+
// Serial.print("GIF renderer return: ");
4466+
// Serial.println(status);
4467+
// }
4468+
}
4469+
static const char _data_FX_MODE_IMAGE[] PROGMEM = "Image@!,;;;12;sx=128";
4470+
44534471
/*
44544472
Blends random colors across palette
44554473
Modified, originally by Mark Kriegsman https://gist.github.com/kriegsman/1f7ccbbfa492a73c015e
@@ -7734,7 +7752,9 @@ void WS2812FX::setupEffectData() {
77347752
addEffect(FX_MODE_TWO_DOTS, &mode_two_dots, _data_FX_MODE_TWO_DOTS);
77357753
addEffect(FX_MODE_FAIRYTWINKLE, &mode_fairytwinkle, _data_FX_MODE_FAIRYTWINKLE);
77367754
addEffect(FX_MODE_RUNNING_DUAL, &mode_running_dual, _data_FX_MODE_RUNNING_DUAL);
7737-
7755+
#ifdef WLED_ENABLE_GIF
7756+
addEffect(FX_MODE_IMAGE, &mode_image, _data_FX_MODE_IMAGE);
7757+
#endif
77387758
addEffect(FX_MODE_TRICOLOR_CHASE, &mode_tricolor_chase, _data_FX_MODE_TRICOLOR_CHASE);
77397759
addEffect(FX_MODE_TRICOLOR_WIPE, &mode_tricolor_wipe, _data_FX_MODE_TRICOLOR_WIPE);
77407760
addEffect(FX_MODE_TRICOLOR_FADE, &mode_tricolor_fade, _data_FX_MODE_TRICOLOR_FADE);

wled00/FX.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ extern byte realtimeMode; // used in getMappedPixelIndex()
184184
#define FX_MODE_TWO_DOTS 50
185185
#define FX_MODE_FAIRYTWINKLE 51 //was Two Areas prior to 0.13.0-b6 (use "Two Dots" with full intensity)
186186
#define FX_MODE_RUNNING_DUAL 52
187-
// #define FX_MODE_HALLOWEEN 53 // removed in 0.14!
187+
#define FX_MODE_IMAGE 53
188188
#define FX_MODE_TRICOLOR_CHASE 54
189189
#define FX_MODE_TRICOLOR_WIPE 55
190190
#define FX_MODE_TRICOLOR_FADE 56

wled00/FX_fcn.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ void Segment::resetIfRequired() {
199199
if (data && _dataLen > 0) memset(data, 0, _dataLen); // prevent heap fragmentation (just erase buffer instead of deallocateData())
200200
next_time = 0; step = 0; call = 0; aux0 = 0; aux1 = 0;
201201
reset = false;
202+
#ifdef WLED_ENABLE_GIF
203+
endImagePlayback(this);
204+
#endif
202205
}
203206

204207
CRGBPalette16 &Segment::loadPalette(CRGBPalette16 &targetPalette, uint8_t pal) {

wled00/data/index.htm

+15-15
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
<div style="padding: 8px 0;" id="btns">
129129
<button class="btn btn-xs" title="File editor" type="button" id="edit" onclick="window.location.href=getURL('/edit')"><i class="icons btn-icon">&#xe2c6;</i></button>
130130
<button class="btn btn-xs" title="Pixel Magic Tool" type="button" id="pxmb" onclick="window.location.href=getURL('/pxmagic.htm')"><i class="icons btn-icon">&#xe410;</i></button>
131-
<button class="btn btn-xs" title="Add custom palette" type="button" onclick="window.location.href=getURL('/cpal.htm')"><i class="icons btn-icon">&#xe18a;</i></button>
131+
<button class="btn btn-xs" title="Add custom palette" type="button" id="adPal" onclick="window.location.href=getURL('/cpal.htm')"><i class="icons btn-icon">&#xe18a;</i></button>
132132
<button class="btn btn-xs" title="Remove last custom palette" type="button" id="rmPal" onclick="palettesData=null;localStorage.removeItem('wledPalx');requestJson({rmcpal:true});setTimeout(loadPalettes,250,loadPalettesData);"><i class="icons btn-icon">&#xe037;</i></button>
133133
</div>
134134
<p class="labels hd" id="pall"><i class="icons sel-icon" onclick="tglHex()">&#xe2b3;</i> Color palette</p>
@@ -273,20 +273,20 @@
273273
<option value="1">Fairy Dust</option>
274274
<option value="2">Swipe right</option>
275275
<option value="3">Swipe left</option>
276-
<option value="4">Push right</option>
277-
<option value="5">Push left</option>
278-
<option value="6">Pinch-out</option>
279-
<option value="7">Inside-out</option>
280-
<option value="8" data-type="2D">Swipe up</option>
281-
<option value="9" data-type="2D">Swipe down</option>
282-
<option value="10" data-type="2D">Open V</option>
283-
<option value="11" data-type="2D">Open H</option>
284-
<option value="12" data-type="2D">Push up</option>
285-
<option value="13" data-type="2D">Push down</option>
286-
<option value="14" data-type="2D">Push TL</option>
287-
<option value="15" data-type="2D">Push TR</option>
288-
<option value="16" data-type="2D">Push BR</option>
289-
<option value="17" data-type="2D">Push BL</option>
276+
<option value="16">Push right</option>
277+
<option value="17">Push left</option>
278+
<option value="4">Pinch-out</option>
279+
<option value="5">Inside-out</option>
280+
<option value="6" data-type="2D">Swipe up</option>
281+
<option value="7" data-type="2D">Swipe down</option>
282+
<option value="8" data-type="2D">Open H</option>
283+
<option value="9" data-type="2D">Open V</option>
284+
<option value="18" data-type="2D">Push up</option>
285+
<option value="19" data-type="2D">Push down</option>
286+
<option value="20" data-type="2D">Push TL</option>
287+
<option value="21" data-type="2D">Push TR</option>
288+
<option value="22" data-type="2D">Push BR</option>
289+
<option value="23" data-type="2D">Push BL</option>
290290
</select>
291291
</p>
292292
<p id="ledmap" class="hide"></p>

wled00/fcn_declare.h

+13
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,19 @@ void onHueConnect(void* arg, AsyncClient* client);
219219
void sendHuePoll();
220220
void onHueData(void* arg, AsyncClient* client, void *data, size_t len);
221221

222+
#include "FX.h" // must be below colors.cpp declarations (potentially due to duplicate declarations of e.g. color_blend)
223+
224+
//image_loader.cpp
225+
#ifdef WLED_ENABLE_GIF
226+
bool fileSeekCallback(unsigned long position);
227+
unsigned long filePositionCallback(void);
228+
int fileReadCallback(void);
229+
int fileReadBlockCallback(void * buffer, int numberOfBytes);
230+
int fileSizeCallback(void);
231+
byte renderImageToSegment(Segment &seg);
232+
void endImagePlayback(Segment* seg);
233+
#endif
234+
222235
//improv.cpp
223236
enum ImprovRPCType {
224237
Command_Wifi = 0x01,

0 commit comments

Comments
 (0)