Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
358 commits
Select commit Hold shift + click to select a range
b20936d
Merge branch 'dev-plus' into esp-now-search
blazoncek Dec 8, 2024
969e1a2
Debug tweaking
blazoncek Dec 8, 2024
a7b1c3a
Nested playlist
blazoncek Dec 12, 2024
3796783
Nested playlist
blazoncek Dec 12, 2024
d323b77
retrun value fix
blazoncek Dec 12, 2024
2cb9a04
retrun value fix
blazoncek Dec 12, 2024
27d14e0
Tuning
blazoncek Dec 14, 2024
43a9663
WizMote handling out of ESP-NOW callback
blazoncek Dec 14, 2024
fb5f97a
WizMote handling out of ESP-NOW callback
blazoncek Dec 14, 2024
76a1d21
Fix "Unit of Measurement" for BME280 temperature
euphi Dec 7, 2024
baa5d86
Debug tuning
blazoncek Dec 8, 2024
13c4e42
Nested playlist
blazoncek Dec 12, 2024
45edd2b
retrun value fix
blazoncek Dec 12, 2024
634a15a
WizMote handling out of ESP-NOW callback
blazoncek Dec 14, 2024
4f9feae
Idle current bugfix
blazoncek Dec 16, 2024
2fb5905
Remove \r
blazoncek Dec 16, 2024
a167a35
Edge case compilation fix
blazoncek Dec 16, 2024
eb748f5
Idle current bugfix
blazoncek Dec 16, 2024
ff04547
Merge branch 'stable' of https://github.com/blazoncek/WLED into stable
blazoncek Dec 16, 2024
a6f2205
Add PSTR
blazoncek Dec 16, 2024
812f1a8
NPB 2.8.3
blazoncek Dec 16, 2024
8e7ae6b
NPB 2.8.3
blazoncek Dec 16, 2024
7cfe2d4
Fix CI build
blazoncek Dec 16, 2024
b710aaa
Add ability to enter preferred BSSID
blazoncek Dec 21, 2024
9047cda
Attempt at better ESP-NOW sync
blazoncek Dec 24, 2024
f5affef
FX: Waterfall and Matripix fix
blazoncek Dec 25, 2024
41a9ad6
FX: Waterfall and Matripix fix
blazoncek Dec 25, 2024
3857f45
FX: Waterfall and Matripix fix
blazoncek Dec 25, 2024
ab39ec2
Update settings_sec.htm
dosipod Nov 26, 2024
460d1cc
Replaced single palette cases with an array to consolidate code
DedeHai Nov 10, 2024
4405eec
Merge pull request #4203 from maxi4329/minor-webui-enhancements
netmindz Dec 1, 2024
e4c022c
Fix update for #4193 (twinkle fox & cat)
DedeHai Dec 5, 2024
080d604
fix for repeating glitch
DedeHai Dec 19, 2024
9e58f37
fixed typo in LED Preferences
shafingazi Dec 22, 2024
7716c21
Update usermods_list.cpp
wled-install Dec 21, 2024
9fb01af
fixed CIE brightness calculation for PWM outputs
DedeHai Dec 23, 2024
a00b74f
Optimization: color_blend() (#4245)
DedeHai Dec 19, 2024
7fbf64a
Merge branch 'stable' into dev-plus
blazoncek Dec 25, 2024
35bb6e5
code consolidation in drawCircle() (#4302)
DedeHai Dec 19, 2024
cce4133
Merge branch 'stable' into dev-plus
blazoncek Dec 25, 2024
b30e9cd
Merge branch 'dev-plus' into esp-now-search
blazoncek Dec 25, 2024
e63a826
Compiler warning
blazoncek Dec 29, 2024
7ce3058
UI info
blazoncek Dec 29, 2024
7f54ef2
Minor speed & size tweaks
blazoncek Dec 29, 2024
bb4cfce
Fix for effects that shift pixels
blazoncek Dec 29, 2024
493645c
Minor speed & size tweaks
blazoncek Dec 29, 2024
b78696c
UI info
blazoncek Dec 29, 2024
6ffcad6
UI info
blazoncek Dec 29, 2024
7de8b45
Fix for effects that shift pixels
blazoncek Dec 29, 2024
178f05f
Version & build bump
blazoncek Dec 30, 2024
2c1899c
Fill SSID fix
blazoncek Dec 30, 2024
bbb02de
Merge branch 'stable' into dev-plus
blazoncek Dec 30, 2024
9af6444
Merge branch 'stable' into esp-now-search
blazoncek Dec 30, 2024
cfceb4e
Merge fix
blazoncek Dec 30, 2024
bf42ca3
Bugfix for color_blend
blazoncek Dec 31, 2024
8955415
Clear spaced segment
blazoncek Dec 31, 2024
13078a8
Attempt at better reconnect when connection is lost.
blazoncek Jan 1, 2025
2a4ca4c
Prevent LED glitches when applying preset on C3/S2
blazoncek Jan 1, 2025
d21059a
ESP8266 compile fix
blazoncek Jan 1, 2025
de0dd24
Ignore logs
blazoncek Jan 2, 2025
9a4957c
FX: Scrolling Text new templates
blazoncek Jan 2, 2025
f6f2c06
IRAM
blazoncek Jan 2, 2025
9f3b6bd
Minor speed & size tweaks
blazoncek Jan 2, 2025
74b3a7d
Add logging to file option in platformio.ini
blazoncek Jan 2, 2025
e32051b
Fix compiler warning
blazoncek Jan 2, 2025
72dd205
Replace WLED_BRAND with WLED_AP_SSID for unique SSID
blazoncek Jan 2, 2025
dd96339
Merge branch 'stable' into dev-plus
blazoncek Jan 2, 2025
ca59d40
Merge branch 'stable' into esp-now-search
blazoncek Jan 2, 2025
f4cfb84
Initial connect fix
blazoncek Jan 2, 2025
6c6df1d
Fix for ethernet compile
blazoncek Jan 3, 2025
008165a
Remove 8266 builds for CI
blazoncek Jan 3, 2025
3862d49
Bump NeoPixelBus to 2.8.3
blazoncek Jan 4, 2025
67c4dbf
Manual advance playlist
blazoncek Jan 4, 2025
aabb1b6
Merge branch 'stable' into dev-plus
blazoncek Jan 4, 2025
baca8a3
Merge branch 'stable' into esp-now-search
blazoncek Jan 4, 2025
6ae1f04
Merge branch 'dev-plus' into esp-now-search
blazoncek Jan 6, 2025
49c1685
Bus modifications
blazoncek Jan 6, 2025
33fd969
Parallel I2S support for S3 & S2
blazoncek Jan 6, 2025
060832d
Parallel I2S support for S3 & S2
blazoncek Jan 6, 2025
ada805e
Shifting bugfix & size tuning in fade_out
blazoncek Jan 7, 2025
d883c8d
FX tuning
blazoncek Jan 7, 2025
8774b7f
Shifting bugfix & size tuning in fade_out
blazoncek Jan 7, 2025
1acac0e
FX tuning
blazoncek Jan 7, 2025
36be8aa
W Hex entry bugfix & optiisation
blazoncek Jan 8, 2025
554855e
Complete transition of UsermodManager and PinManager away from classes
willmmiles Jan 9, 2025
669fc5c
Code robustnes by @softhack007
blazoncek Jan 9, 2025
819eb07
Merge pull request #4295 from WouterGritter/mqtt-use-topic-buffer-len
netmindz Jan 9, 2025
6d07250
Merge pull request #4450 from adafruit/main
softhack007 Jan 6, 2025
b0a229d
Replace PRNG with hardware RNG (#4225)
DedeHai Dec 20, 2024
bb890d3
progress() tuning
blazoncek Jan 10, 2025
651d0da
Merge branch 'stable' into dev-plus
blazoncek Jan 10, 2025
66775e1
Merge branch 'dev-plus' into esp-now-search
blazoncek Jan 10, 2025
e214bd0
Parallel I2S output bugfix
blazoncek Jan 11, 2025
d586fb4
Remove erroneous debug messages
blazoncek Jan 11, 2025
f751e0a
Get bus size from NPB (prototype)
blazoncek Jan 12, 2025
6c4b011
Bus creation bugfix
blazoncek Jan 13, 2025
f9db408
PSRAM malloc wrapper
blazoncek Jan 14, 2025
333282e
Use ps_calloc
blazoncek Jan 15, 2025
2f6314c
Use heap_caps_malloc_prefer instead of ps_malloc
blazoncek Jan 15, 2025
fa9588e
Clean up fcn_declare.h inclusion
blazoncek Jan 17, 2025
ebb2e53
Use different malloc when appropriate
blazoncek Jan 17, 2025
f7e2232
Replace magic with cosntant
blazoncek Jan 17, 2025
d8fe8db
Fix free() use
blazoncek Jan 17, 2025
c0f09d9
Fix memory calculation
blazoncek Jan 18, 2025
8692082
Reconnect update
blazoncek Jan 18, 2025
1365aee
Implement vector in bus manager
blazoncek Jan 18, 2025
0519f65
Bugfix in settings
blazoncek Jan 19, 2025
45a5f97
Remove numBusses, RMT idle bugfix
blazoncek Jan 19, 2025
e7672ec
Bugfix in settings
blazoncek Jan 19, 2025
4521ac7
Size tuning
blazoncek Jan 20, 2025
9785b58
Remove instance
blazoncek Jan 20, 2025
db06d7a
DeepSleep usermod (#4190)
DedeHai Jan 4, 2025
a5b4efd
Remove TOSTRING for releaseString and add quotes to WLED_RELEASE_NAME
blazoncek Jan 20, 2025
3fa801b
Merge branch 'release-name' into esp-now-search
blazoncek Jan 20, 2025
b2066ef
RF433 json usermod (#4234)
kilrah Jan 17, 2025
7ec6f1e
Convert BusManager class to namespace
blazoncek Jan 21, 2025
b9f18af
Revert getBus() changes
blazoncek Jan 21, 2025
3c61cd5
Allow "unlimited" virtual buses
blazoncek Jan 22, 2025
5117bf9
Default palette by @dedehai
blazoncek Jan 24, 2025
9ca28a8
CRLF messup fix
blazoncek Jan 24, 2025
735cfe9
Fix for aircoookie/WLED#4519
blazoncek Jan 27, 2025
cf807d3
Remove obsolete effects
blazoncek Jan 27, 2025
2306a66
Rework color_from_palette()
blazoncek Jan 27, 2025
2a027d1
Use constant CALL_MODE_INIT
blazoncek Jan 27, 2025
38b35df
Oscillator fix
blazoncek Jan 28, 2025
f8700d2
consolidated colorwaves and pride into one base function
DedeHai Jan 19, 2025
00f3aa7
fix reproduction in game of life
mlichvar Jan 21, 2025
643e71b
Use vector for usermod manager
DedeHai Dec 19, 2024
ed0d2ed
Tuning in Meteor FX
blazoncek Jan 30, 2025
00856a9
Early ESP-NOW search fix (another attempt)
blazoncek Jan 30, 2025
eb14e34
Replace unsigned with size_t
blazoncek Feb 1, 2025
3b8cd80
Minor cosmetic fixes
blazoncek Feb 2, 2025
0d06671
Remove additional effects
blazoncek Feb 3, 2025
1dca454
Simplify Chase 3
blazoncek Feb 3, 2025
70cebac
Clarify use of index counter
blazoncek Feb 4, 2025
f81d3fa
Add simulation modes (bugfix)
blazoncek Feb 4, 2025
51ed0dd
Lambda XY and tuning
blazoncek Feb 6, 2025
f406a9b
Avoid shadowing global col[]
blazoncek Feb 6, 2025
9ee7dfd
Move audio effects to Audioreactive usermod
blazoncek Feb 6, 2025
957ef8c
Bugfix
blazoncek Feb 7, 2025
effaddd
free() does not require null pointer check
blazoncek Feb 7, 2025
aece129
Move _data and allocation to derived class
blazoncek Feb 7, 2025
2dd3a44
Bugfix when no network is found during scan
blazoncek Feb 9, 2025
9d33a3e
Tweak in save/load SEGENV data
blazoncek Feb 9, 2025
a2b29ff
Uninitialised _data bugfix
blazoncek Feb 9, 2025
dece80b
Size optimisation
blazoncek Feb 9, 2025
2b3657a
Stepko credit and Soap tuning
blazoncek Feb 11, 2025
7b47243
Segment layering POC
blazoncek Feb 15, 2025
e2ebdb8
Prevent push transition if effect stays the same
blazoncek Feb 16, 2025
6a30f35
Implement 2D blending + some fixes
blazoncek Feb 16, 2025
b642058
Bugfix
blazoncek Feb 16, 2025
558e080
Bugfixes
blazoncek Feb 17, 2025
a88bb90
Add UI element
blazoncek Feb 17, 2025
9b82b25
Move opacity into blend
blazoncek Feb 17, 2025
2725d88
Added 4 more blend modes
blazoncek Feb 18, 2025
a66437b
Remove global LED buffer in favour of local buffers
blazoncek Feb 18, 2025
9a9ea7c
Tuning
blazoncek Feb 18, 2025
5105306
Implement opacity
blazoncek Feb 19, 2025
bdce639
Blend in drawLine
blazoncek Feb 19, 2025
f2f022d
Fix for compiler issues
blazoncek Feb 19, 2025
b1a7732
Remove FX workarounds
blazoncek Feb 19, 2025
59e7e5f
Minor code cleanup in bus manager
blazoncek Feb 20, 2025
e0006d5
Return of strip-level ABL
blazoncek Feb 20, 2025
eb6f5f5
Fix global col in Hue
blazoncek Feb 20, 2025
f48bb86
Convert lambdas to regular functions
blazoncek Feb 21, 2025
1a473a2
Missing LD bugfix in LED settings
blazoncek Feb 22, 2025
01f3c09
1D bugfix
blazoncek Feb 22, 2025
9953dbf
No digital bus bugfix
blazoncek Feb 22, 2025
04d948b
Bump
blazoncek Feb 22, 2025
411c7f7
Minor tweaks
blazoncek Feb 23, 2025
32ca667
Realtime mode support
blazoncek Feb 24, 2025
607803e
Some more realtime fixes
blazoncek Feb 24, 2025
e385808
Debug changes
blazoncek Feb 24, 2025
6fd504e
PIO.ini update
blazoncek Feb 25, 2025
831e923
Bugfix
blazoncek Feb 26, 2025
ff2242a
Fix for bounds change detection
blazoncek Feb 26, 2025
8b5521b
Do not run unchanged effect twice in fade blend style
blazoncek Feb 26, 2025
c5e8252
Unified blending and transitions
blazoncek Feb 27, 2025
136f4fb
Revert currentXXX
blazoncek Feb 28, 2025
7014092
Progress fixes
blazoncek Feb 28, 2025
f590e68
Tuning and fixes
blazoncek Mar 1, 2025
17c5199
Add circular transition.
blazoncek Mar 1, 2025
e0cb60d
Some MM fixes for buffer allocation
blazoncek Mar 2, 2025
4da35f0
Crash fix on ESP8266 due to yield()
blazoncek Mar 2, 2025
dd26572
Fixe missing lolin_s3_mini board from Tasmota
blazoncek Mar 2, 2025
e0fc1fb
Debug newline & DDDD in scrolling text
blazoncek Mar 2, 2025
7251250
Added integer based `sin()/cos()` functions, changed all trig functio…
DedeHai Oct 5, 2024
37ef1b1
added rounding to sin8_t
DedeHai Oct 6, 2024
2da0d29
fixed atan2_t
DedeHai Oct 15, 2024
8d3f8ee
cleanup and improvement to sin_appros()
DedeHai Oct 16, 2024
9be48ed
Speed improvements, commented legacy _t trig functions
DedeHai Nov 26, 2024
1539279
changed 90° offset to hex, fixed potential bug in FX using sin/cos wi…
DedeHai Nov 27, 2024
4a30b96
Bugfix in getPixelColor and waitForIt method
blazoncek Mar 3, 2025
5717337
Fix and clarification for legacy code in led.cpp
blazoncek Mar 3, 2025
dd1031b
Wait for strip updated
blazoncek Mar 3, 2025
370f5dd
Inline get/setPixelColor
blazoncek Mar 4, 2025
e8dff1b
Move customPalettes out of WS2812FX class
blazoncek Mar 4, 2025
f6686bb
Move multiWiFi vector init to compile time
blazoncek Mar 4, 2025
53058af
Replace strncpy with strlcpy
blazoncek Mar 4, 2025
ccad74c
Revert multiWiFi compile initialisation
blazoncek Mar 4, 2025
9e224bc
Mistakes happen, people learn.
blazoncek Mar 4, 2025
5927934
PIR sensor usermod bugfix
blazoncek Mar 4, 2025
ed802c4
Code cleanup
blazoncek Mar 5, 2025
393db7f
Move paletteBlend out of WS2812FX class
blazoncek Mar 6, 2025
6857fc7
Adding Particle System with many new FX (#4506)
DedeHai Feb 17, 2025
6d62fba
Code cleanup
blazoncek Mar 7, 2025
f4550bd
Minot tweaks
blazoncek Mar 9, 2025
25f97bb
UI refinements; mirror forces effect restart
blazoncek Mar 9, 2025
84ec297
Speed
blazoncek Mar 9, 2025
d991fc6
Odd -unsigned
blazoncek Mar 9, 2025
5e59aba
Address issues reported
blazoncek Mar 10, 2025
2b86485
Improvements in drawCharacter and Sctolling Text FX
blazoncek Mar 11, 2025
9138aee
Ramove placement new for transitioning segment
blazoncek Mar 11, 2025
7ed3839
Fixes
blazoncek Mar 12, 2025
9c6249c
Fix for erroneous transition start
blazoncek Mar 12, 2025
fab0915
Various updates
blazoncek Mar 14, 2025
5373355
Remove overlay feature form effects
blazoncek Mar 19, 2025
a4bc5b1
Pinwheel Rework
Brandon502 Feb 14, 2025
c3cd6b0
Pinwheel update
blazoncek Mar 23, 2025
d88de1b
Merge branch 'particle' of https://github.com/blazoncek/WLED into par…
blazoncek Mar 26, 2025
15f510b
Prevent matrix from being > 255 pixels in any dimension during constr…
blazoncek Mar 27, 2025
4cdd6b7
Gamma update
blazoncek Mar 28, 2025
1b4077f
Code robustness
blazoncek Mar 29, 2025
eee4a5d
Fix for #4610
blazoncek Mar 25, 2025
c85ca97
Random cycle palette 18h fix (finally!)
blazoncek Mar 26, 2025
960d5b0
Prevent matrix from being > 255 pixels in any dimension during constr…
blazoncek Mar 27, 2025
a52633a
Gamma update
blazoncek Mar 28, 2025
bae7f99
Code robustness
blazoncek Mar 29, 2025
e7f15b8
Allow clock overlay to use LED beyond 255
blazoncek Mar 29, 2025
fb1d9b4
Bugfix in realtime show()
blazoncek Mar 30, 2025
aa6a35b
Realtime tuning
blazoncek Mar 31, 2025
9f6ba84
Rainbow color wheel & transition bugfix
blazoncek Mar 31, 2025
cc5fdb1
Minor effect tweaks
blazoncek Mar 30, 2025
a1388a1
Color wheel update for effects
blazoncek Mar 31, 2025
09e2ef4
Reduce segment copy, save RAM
blazoncek Apr 1, 2025
9ccf5bb
Tuning and bugfixes
blazoncek Apr 2, 2025
7252fae
Build bump
blazoncek Apr 1, 2025
80baec5
Merge branch 'particle' of https://github.com/blazoncek/WLED into par…
blazoncek Apr 3, 2025
eb1a243
Fix compile issues when ESP-NOW is disabled
blazoncek Mar 24, 2025
47bfcf8
Missing assignment
blazoncek Apr 4, 2025
e5001c3
Bugfix in pinch mode
blazoncek Apr 4, 2025
4946854
Merge fix
blazoncek Apr 8, 2025
b80f2d9
PS update
blazoncek Apr 11, 2025
b16007e
Speed tuning and bugfix
blazoncek Apr 12, 2025
f3607be
Replace size_t with uint32_t
blazoncek Apr 12, 2025
854eb5c
fast scale bugfix
blazoncek Apr 12, 2025
ec31a79
Speed optimisation
blazoncek Apr 12, 2025
01fcad2
Add Fg color selector to PS effects
blazoncek Apr 12, 2025
db16cad
Replace color_fade with fast version
blazoncek Apr 13, 2025
480748f
Tune fast color functions
blazoncek Apr 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ wled-update.sh

/build_output/
/node_modules/
/logs/

/wled00/extLibs
/wled00/LittleFS
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
- v0.15.0-b2
- WS2805 support (RGB + WW + CW, 600kbps)
- Unified PSRAM use
- NeoPixelBus v2.7.9
- NeoPixelBus v2.7.9 (for future WS2805 support)
- Ubiquitous PSRAM mode for all variants of ESP32
- SSD1309_64 I2C Support for FLD Usermod (#3836 by @THATDONFC)
- Palette cycling fix (add support for `{"seg":[{"pal":"X~Y~"}]}` or `{"seg":[{"pal":"X~Yr"}]}`)
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wled",
"version": "0.15.0-b7",
"version": "0.15.1-b1",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {
Expand All @@ -27,5 +27,8 @@
"html-minifier-terser": "^7.2.0",
"inliner": "^1.13.1",
"nodemon": "^3.1.7"
},
"engines": {
"node": ">=20.0.0"
}
}
5 changes: 3 additions & 2 deletions pio-scripts/output_bins.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ def _create_dirs(dirs=["map", "release", "firmware"]):
os.makedirs(os.path.join(OUTPUT_DIR, d), exist_ok=True)

def create_release(source):
release_name = _get_cpp_define_value(env, "WLED_RELEASE_NAME")
if release_name:
release_name_def = _get_cpp_define_value(env, "WLED_RELEASE_NAME")
if release_name_def:
release_name = release_name_def.replace("\\\"", "")
version = _get_cpp_define_value(env, "WLED_VERSION")
release_file = os.path.join(OUTPUT_DIR, "release", f"WLED_{version}_{release_name}.bin")
release_gz_file = release_file + ".gz"
Expand Down
3 changes: 3 additions & 0 deletions pio-scripts/set_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Import('env')
import json
import datetime
t = datetime.datetime.now()
env.Append(BUILD_FLAGS=[f"-D BUILD={t.strftime('%y%m%d')}0"])

PACKAGE_FILE = "package.json"

Expand Down
159 changes: 91 additions & 68 deletions platformio.ini

Large diffs are not rendered by default.

57 changes: 51 additions & 6 deletions platformio_override.sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ build_flags = ${common.build_flags} ${esp8266.build_flags}
; -D WLED_WATCHDOG_TIMEOUT=10
;
; Create debug build (with remote debug)
; -D WLED_DEBUG_ALL ;; or
; -D WLED_DEBUG
; -D WLED_DEBUG_FS
; -D WLED_DEBUG_FX
; -D WLED_DEBUG_BUS
; -D WLED_DEBUG_PINMANAGER
; -D WLED_DEBUG_USERMODS
; -D WLED_DEBUG_MATH
; -D WLED_DEBUG_HOST='"192.168.0.100"'
; -D WLED_DEBUG_PORT=7868
;
Expand Down Expand Up @@ -216,7 +223,7 @@ board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags}
lib_deps = ${esp8266.lib_deps}
monitor_filters = esp8266_exception_decoder
monitor_filters = esp8266_exception_decoder #, log2file

[env:heltec_wifi_kit_8]
board = d1_mini
Expand All @@ -243,7 +250,7 @@ platform_packages = ${esp32.platform_packages}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32.build_flags} #-D WLED_DISABLE_BROWNOUT_DET
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
monitor_filters = esp32_exception_decoder #, log2file
board_build.partitions = ${esp32.default_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = qio
Expand All @@ -258,7 +265,7 @@ platform_packages = ${esp32_idf_V4.platform_packages}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} #-D WLED_DISABLE_BROWNOUT_DET
lib_deps = ${esp32_idf_V4.lib_deps}
monitor_filters = esp32_exception_decoder
monitor_filters = esp32_exception_decoder #, log2file
board_build.partitions = ${esp32_idf_V4.default_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = dio
Expand All @@ -284,6 +291,33 @@ extends = env:esp32s3dev_8MB_PSRAM_opi
board = esp32-s3-devkitc-1 ;; generic dev board; the next line adds PSRAM support
board_build.arduino.memory_type = qio_qspi ;; use with PSRAM: 2MB or 4MB

[env:esp32S3_wroom2]
;; For ESP32-S3 WROOM-2, a.k.a. ESP32-S3 DevKitC-1 v1.1
;; with >= 16MB FLASH and >= 8MB PSRAM (memory_type: opi_opi)
platform = ${esp32s3.platform}
platform_packages = ${esp32s3.platform_packages}
board = esp32s3camlcd ;; this is the only standard board with "opi_opi"
board_build.arduino.memory_type = opi_opi
upload_speed = 921600
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=ESP32-S3_WROOM-2
-D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0
-D ARDUINO_USB_CDC_ON_BOOT=0 ;; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip
;; -D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
-DBOARD_HAS_PSRAM
-D LEDPIN=38 -D DATA_PINS=38 ;; buildin WS2812b LED
-D BTNPIN=0 -D RLYPIN=16 -D IRPIN=17 -D AUDIOPIN=-1
-D WLED_DEBUG
${esp32.AR_build_flags}
-D SR_DMTYPE=1 -D I2S_SDPIN=13 -D I2S_CKPIN=14 -D I2S_WSPIN=15 -D MCLK_PIN=4 ;; I2S mic
lib_deps = ${esp32s3.lib_deps}
${esp32.AR_lib_deps}

board_build.partitions = ${esp32.extreme_partitions}
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
monitor_filters = esp32_exception_decoder #, log2file

[env:esp8285_4CH_MagicHome]
board = esp8285
platform = ${common.platform_wled_default}
Expand Down Expand Up @@ -514,8 +548,19 @@ build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_DISABLE_BROWNOU
-D TFT_RST=26
-D SPI_FREQUENCY=40000000
-D USER_SETUP_LOADED
monitor_filters = esp32_exception_decoder
monitor_filters = esp32_exception_decoder #, log2file
board_build.partitions = ${esp32.default_partitions}
lib_deps =
${esp32.lib_deps}
TFT_eSPI @ ^2.3.70
board_build.partitions = ${esp32.default_partitions}
TFT_eSPI @ 2.5.33 ;; this is the last version that compiles with the WLED default framework - newer versions require platform = espressif32 @ ^6.3.2

# ------------------------------------------------------------------------------
# Usermod examples
# ------------------------------------------------------------------------------

# 433MHz RF remote example for esp32dev
[env:esp32dev_usermod_RF433]
extends = env:esp32dev
build_flags = ${env:esp32dev.build_flags} -D USERMOD_RF433
lib_deps = ${env:esp32dev.lib_deps}
sui77/rc-switch @ 2.6.4
172 changes: 172 additions & 0 deletions tools/c3g-2-cpp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
"""
ChatGPT genrated code to convert .c3g (cpt-city palette in CSS3 format) file to C++ array for FastLED CRGBPalette16 generation.
Download palette files from http://seaviewsensing.com/pub/cpt-city/
"""
# Usage: python c3g-2-cpp.py <c3g_file_path> [<array_name>]

import argparse
import re
import os
import requests

def rgb_to_tuple(rgb_str):
"""
Convert a CSS3 rgb(r, g, b) string to an (R, G, B) tuple.
Example: "rgb(255, 0, 0)" -> (255, 0, 0)
"""
match = re.match(r'rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\)', rgb_str)
if match:
r = int(match.group(1))
g = int(match.group(2))
b = int(match.group(3))
return r, g, b
else:
raise ValueError(f"Invalid RGB format: {rgb_str}")

def extract_colors_from_gradient(gradient):
"""
Extract all color codes and their positions from a CSS3 linear-gradient string.
Example: "linear-gradient(0deg, rgb(252,216,252) 0.000%, rgb(255,192,255) 18.990%, ...)"
-> [("rgb(252,216,252)", 0.0), ("rgb(255,192,255)", 18.990), ...]
"""
# Regex to match the colors in rgb(r, g, b) format and their positions
color_position_regex = r'rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\)\s*(\d+\.\d+)%'

# Find all colors and their positions in the gradient string
return [(f'rgb({r}, {g}, {b})', float(position)) for r, g, b, position in re.findall(color_position_regex, gradient)]

def position_to_index(position):
"""
Convert a percentage position in the gradient (0.0 to 100.0) to an index in a 0-255 range.
The range of 0% to 100% is divided into 256 sections (for a palette of size 256).
"""
return int(position / 100 * 255) # Maps 0.0% to index 0, 100.0% to index 255

def c3g_to_cpp_array(c3g_file_path, array_name):
# Open the .c3g file
with open(c3g_file_path, 'r') as f:
lines = f.readlines()

# Initialize an empty list for the colors
color_array = []

# Process each line in the file
for line in lines:
# Remove comments (single-line and block comments)
line = re.sub(r'//.*$', '', line) # Remove single-line comments
line = re.sub(r'/\*.*?\*/', '', line, flags=re.DOTALL) # Remove block comments

# Strip any extra whitespace
line = line.strip()

# Skip empty lines
if not line:
continue

# If the line contains a linear-gradient, extract the colors and positions
if 'rgb(' in line:
# Extract the gradient colors and their positions
color_positions = extract_colors_from_gradient(line)
# Convert each color to RGB and map it to the appropriate index
for color, position in color_positions:
r, g, b = rgb_to_tuple(color)
index = position_to_index(position)
color_array.append(f"{index:>3}, {r:>3}, {g:>3}, {b:>3}")

# Format the final C++ array string with the custom array name
cpp_array = f"const uint8_t {array_name}[] PROGMEM = {{\n " + ",\n ".join(color_array) + "};"

return cpp_array


def download_file(url, save_path):
"""
Download a file from a URL and save it to a specified path.
"""
try:
response = requests.get(url)
response.raise_for_status() # Raise an error for bad status codes
with open(save_path, 'wb') as f:
f.write(response.content)
#print(f"Downloaded {url} to {save_path}")
except requests.exceptions.RequestException as e:
print(f"Error downloading {url}: {e}")

def process_urls_from_file(url_file, array_name=None):
"""
Process each URL from a file, download the corresponding .c3g file,
and convert it to a C++ array.
"""
with open(url_file, 'r') as f:
urls = f.readlines()

# For each URL, download the file and convert it
for url in urls:
url = url.strip() # Remove any leading/trailing whitespace or newlines
if not url:
continue

# Extract file name from the URL or use a default name
file_name = os.path.basename(url)
if not file_name.endswith('.c3g'):
file_name += '.c3g'

# Download the file
download_file(url, file_name)

if not os.path.exists(file_name):
continue

# Determine array name (use provided array name or file name without extension)
if array_name is None:
array_name = os.path.splitext(file_name)[0] + '_gp'

# Convert the .c3g file to C++ array
cpp_code = c3g_to_cpp_array(file_name, array_name)
print(f"// Gradient palette \"{array_name}\", originally from")
print(f"// {url}")
print(cpp_code)
print() # Empty line between outputs

array_name = None

# Optionally, you can save the C++ code to a file
# with open(f"{array_name}_palette.cpp", 'w') as f:
# f.write(cpp_code)
os.remove(file_name) # Remove the downloaded file after processing


def main():
# Create the parser object
parser = argparse.ArgumentParser(description="Convert .c3g file with gradients to a C++ array for FastLED.")

# Add command-line argument for the .c3g file
parser.add_argument("c3g_file", help="Path to the .c3g file to be converted or .txt file with URLs")
parser.add_argument("array_name", nargs="?", help="Name of the C++ array to be generated")

# Parse arguments
args = parser.parse_args()


if args.c3g_file.endswith('.c3g'):
# If no array name is provided, use the file name without extension as the array name
if not args.array_name:
array_name = os.path.splitext(os.path.basename(args.c3g_file))[0]
else:
array_name = args.array_name

# Call the function to process the file and convert to C++ array format
cpp_palette_code = c3g_to_cpp_array(args.c3g_file, array_name)

# Output the result to the console
print(f"// Gradient palette \"{array_name}\", originally from")
print(f"// {args.c3g_file}")
print(cpp_palette_code)

else:
# Process URLs from the provided text file
process_urls_from_file(args.c3g_file, args.array_name)


if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions tools/cdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function adoptVersionAndRepo(html) {
async function minify(str, type = "plain") {
const options = {
collapseWhitespace: true,
conservativeCollapse: true, // preserve spaces in text
collapseBooleanAttributes: true,
collapseInlineTagWhitespace: true,
minifyCSS: true,
Expand Down
Loading