Skip to content

Commit d1c93ab

Browse files
authored
Merge branch 'wled:main' into main
2 parents b5f8b8b + e23751b commit d1c93ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2114
-895
lines changed

.github/workflows/pr-merge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
run: |
3434
jq -n \
3535
--arg content "Pull Request #${PR_NUMBER} \"${PR_TITLE}\" merged by ${ACTOR}
36-
${PR_URL}. It will be included in the next nightly builds, please test" \
36+
${PR_URL} . It will be included in the next nightly builds, please test" \
3737
'{content: $content}' \
3838
| curl -H "Content-Type: application/json" -d @- ${{ secrets.DISCORD_WEBHOOK_BETA_TESTERS }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
.pioenvs
88
.piolibdeps
99
.vscode
10+
compile_commands.json
11+
__pycache__/
1012

1113
esp01-update.sh
1214
platformio_override.ini

boards/lilygo-t7-s3.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"build": {
3+
"arduino":{
4+
"ldscript": "esp32s3_out.ld",
5+
"memory_type": "qio_opi",
6+
"partitions": "default_16MB.csv"
7+
},
8+
"core": "esp32",
9+
"extra_flags": [
10+
"-DARDUINO_TTGO_T7_S3",
11+
"-DBOARD_HAS_PSRAM",
12+
"-DARDUINO_USB_MODE=1"
13+
],
14+
"f_cpu": "240000000L",
15+
"f_flash": "80000000L",
16+
"flash_mode": "qio",
17+
"hwids": [
18+
[
19+
"0X303A",
20+
"0x1001"
21+
]
22+
],
23+
"mcu": "esp32s3",
24+
"variant": "esp32s3"
25+
},
26+
"connectivity": [
27+
"wifi",
28+
"bluetooth"
29+
],
30+
"debug": {
31+
"openocd_target": "esp32s3.cfg"
32+
},
33+
"frameworks": [
34+
"arduino",
35+
"espidf"
36+
],
37+
"name": "LILYGO T3-S3",
38+
"upload": {
39+
"flash_size": "16MB",
40+
"maximum_ram_size": 327680,
41+
"maximum_size": 16777216,
42+
"require_upload_port": true,
43+
"speed": 921600
44+
},
45+
"url": "https://www.aliexpress.us/item/3256804591247074.html",
46+
"vendor": "LILYGO"
47+
}

pio-scripts/set_repo.py

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
Import('env')
2+
import subprocess
3+
import re
4+
5+
def get_github_repo():
6+
"""Extract GitHub repository name from git remote URL.
7+
8+
Uses the remote that the current branch tracks, falling back to 'origin'.
9+
This handles cases where repositories have multiple remotes or where the
10+
main remote is not named 'origin'.
11+
12+
Returns:
13+
str: Repository name in 'owner/repo' format for GitHub repos,
14+
'unknown' for non-GitHub repos, missing git CLI, or any errors.
15+
"""
16+
try:
17+
remote_name = 'origin' # Default fallback
18+
19+
# Try to get the remote for the current branch
20+
try:
21+
# Get current branch name
22+
branch_result = subprocess.run(['git', 'rev-parse', '--abbrev-ref', 'HEAD'],
23+
capture_output=True, text=True, check=True)
24+
current_branch = branch_result.stdout.strip()
25+
26+
# Get the remote for the current branch
27+
remote_result = subprocess.run(['git', 'config', f'branch.{current_branch}.remote'],
28+
capture_output=True, text=True, check=True)
29+
tracked_remote = remote_result.stdout.strip()
30+
31+
# Use the tracked remote if we found one
32+
if tracked_remote:
33+
remote_name = tracked_remote
34+
except subprocess.CalledProcessError:
35+
# If branch config lookup fails, continue with 'origin' as fallback
36+
pass
37+
38+
# Get the remote URL for the determined remote
39+
result = subprocess.run(['git', 'remote', 'get-url', remote_name],
40+
capture_output=True, text=True, check=True)
41+
remote_url = result.stdout.strip()
42+
43+
# Check if it's a GitHub URL
44+
if 'github.com' not in remote_url.lower():
45+
return 'unknown'
46+
47+
# Parse GitHub URL patterns:
48+
# https://github.com/owner/repo.git
49+
# [email protected]:owner/repo.git
50+
# https://github.com/owner/repo
51+
52+
# Remove .git suffix if present
53+
if remote_url.endswith('.git'):
54+
remote_url = remote_url[:-4]
55+
56+
# Handle HTTPS URLs
57+
https_match = re.search(r'github\.com/([^/]+/[^/]+)', remote_url, re.IGNORECASE)
58+
if https_match:
59+
return https_match.group(1)
60+
61+
# Handle SSH URLs
62+
ssh_match = re.search(r'github\.com:([^/]+/[^/]+)', remote_url, re.IGNORECASE)
63+
if ssh_match:
64+
return ssh_match.group(1)
65+
66+
return 'unknown'
67+
68+
except FileNotFoundError:
69+
# Git CLI is not installed or not in PATH
70+
return 'unknown'
71+
except subprocess.CalledProcessError:
72+
# Git command failed (e.g., not a git repo, no remote, etc.)
73+
return 'unknown'
74+
except Exception:
75+
# Any other unexpected error
76+
return 'unknown'
77+
78+
repo = get_github_repo()
79+
env.Append(BUILD_FLAGS=[f'-DWLED_REPO=\\"{repo}\\"'])

platformio.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ ldscript_4m1m = eagle.flash.4m1m.ld
111111
[scripts_defaults]
112112
extra_scripts =
113113
pre:pio-scripts/set_version.py
114+
pre:pio-scripts/set_repo.py
114115
post:pio-scripts/output_bins.py
115116
post:pio-scripts/strip-floats.py
116117
pre:pio-scripts/user_config_copy.py

platformio_override.sample.ini

Lines changed: 86 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ lib_deps = ${esp8266.lib_deps}
2828
; robtillaart/SHT85@~0.3.3
2929
; ;gmag11/QuickESPNow @ ~0.7.0 # will also load QuickDebug
3030
; https://github.com/blazoncek/QuickESPNow.git#optional-debug ;; exludes debug library
31-
; ${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE
3231

3332
build_unflags = ${common.build_unflags}
3433
build_flags = ${common.build_flags} ${esp8266.build_flags}
@@ -140,8 +139,6 @@ build_flags = ${common.build_flags} ${esp8266.build_flags}
140139
; -D PIR_SENSOR_MAX_SENSORS=2 # max allowable sensors (uses OR logic for triggering)
141140
;
142141
; Use Audioreactive usermod and configure I2S microphone
143-
; ${esp32.AR_build_flags} ;; default flags required to properly configure ArduinoFFT
144-
; ;; don't forget to add ArduinoFFT to your libs_deps: ${esp32.AR_lib_deps}
145142
; -D AUDIOPIN=-1
146143
; -D DMTYPE=1 # 0-analog/disabled, 1-I2S generic, 2-ES7243, 3-SPH0645, 4-I2S+mclk, 5-I2S PDM
147144
; -D I2S_SDPIN=36
@@ -180,7 +177,7 @@ build_flags = ${common.build_flags} ${esp8266.build_flags}
180177
;
181178
; enable IR by setting remote type
182179
; -D IRTYPE=0 # 0 Remote disabled | 1 24-key RGB | 2 24-key with CT | 3 40-key blue | 4 40-key RGB | 5 21-key RGB | 6 6-key black | 7 9-key red | 8 JSON remote
183-
;
180+
;
184181
; use PSRAM on classic ESP32 rev.1 (rev.3 or above has no issues)
185182
; -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue # needed only for classic ESP32 rev.1
186183
;
@@ -241,9 +238,7 @@ lib_deps = ${esp8266.lib_deps}
241238
extends = env:esp32dev # we want to extend the existing esp32dev environment (and define only updated options)
242239
board = esp32dev
243240
build_flags = ${common.build_flags} ${esp32.build_flags} #-D WLED_DISABLE_BROWNOUT_DET
244-
${esp32.AR_build_flags} ;; optional - includes USERMOD_AUDIOREACTIVE
245241
lib_deps = ${esp32.lib_deps}
246-
${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE
247242
monitor_filters = esp32_exception_decoder
248243
board_build.f_flash = 80000000L
249244
board_build.flash_mode = qio
@@ -255,9 +250,7 @@ board_build.flash_mode = qio
255250
extends = esp32_idf_V4 # based on newer "esp-idf V4" platform environment
256251
board = esp32dev
257252
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} #-D WLED_DISABLE_BROWNOUT_DET
258-
${esp32.AR_build_flags} ;; includes USERMOD_AUDIOREACTIVE
259253
lib_deps = ${esp32_idf_V4.lib_deps}
260-
${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE
261254
monitor_filters = esp32_exception_decoder
262255
board_build.partitions = ${esp32.default_partitions} ;; if you get errors about "out of program space", change this to ${esp32.extended_partitions} or even ${esp32.big_partitions}
263256
board_build.f_flash = 80000000L
@@ -375,11 +368,9 @@ build_flags = ${common.build_flags} ${esp32.build_flags}
375368
-D USERMOD_DALLASTEMPERATURE
376369
-D USERMOD_FOUR_LINE_DISPLAY
377370
-D TEMPERATURE_PIN=23
378-
${esp32.AR_build_flags} ;; includes USERMOD_AUDIOREACTIVE
379371
lib_deps = ${esp32.lib_deps}
380372
OneWire@~2.3.5 ;; needed for USERMOD_DALLASTEMPERATURE
381373
olikraus/U8g2 @ ^2.28.8 ;; needed for USERMOD_FOUR_LINE_DISPLAY
382-
${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE
383374
board_build.partitions = ${esp32.default_partitions}
384375

385376
[env:esp32_pico-D4]
@@ -391,13 +382,11 @@ build_flags = ${common.build_flags} ${esp32.build_flags}
391382
-D WLED_DISABLE_ADALIGHT ;; no serial-to-USB chip on this board - better to disable serial protocols
392383
-D DATA_PINS=2,18 ;; LED pins
393384
-D RLYPIN=19 -D BTNPIN=0 -D IRPIN=-1 ;; no default pin for IR
394-
${esp32.AR_build_flags} ;; include USERMOD_AUDIOREACTIVE
395385
-D UM_AUDIOREACTIVE_ENABLE ;; enable AR by default
396386
;; Audioreactive settings for on-board microphone (ICS-43432)
397387
-D SR_DMTYPE=1 -D I2S_SDPIN=25 -D I2S_WSPIN=15 -D I2S_CKPIN=14
398388
-D SR_SQUELCH=5 -D SR_GAIN=30
399389
lib_deps = ${esp32.lib_deps}
400-
${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE
401390
board_build.partitions = ${esp32.default_partitions}
402391
board_build.f_flash = 80000000L
403392

@@ -525,6 +514,7 @@ build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_DISABLE_BROWNOU
525514
-D USER_SETUP_LOADED
526515
monitor_filters = esp32_exception_decoder
527516

517+
528518
# ------------------------------------------------------------------------------
529519
# Usermod examples
530520
# ------------------------------------------------------------------------------
@@ -535,3 +525,87 @@ extends = env:esp32dev
535525
build_flags = ${env:esp32dev.build_flags} -D USERMOD_RF433
536526
lib_deps = ${env:esp32dev.lib_deps}
537527
sui77/rc-switch @ 2.6.4
528+
529+
# ------------------------------------------------------------------------------
530+
# Hub75 examples
531+
# ------------------------------------------------------------------------------
532+
533+
[env:esp32dev_hub75]
534+
board = esp32dev
535+
upload_speed = 921600
536+
platform = ${esp32_idf_V4.platform}
537+
platform_packages =
538+
build_unflags = ${common.build_unflags}
539+
build_flags = ${common.build_flags}
540+
-D WLED_RELEASE_NAME=\"ESP32_hub75\"
541+
-D WLED_ENABLE_HUB75MATRIX -D NO_GFX
542+
-D WLED_DEBUG_BUS
543+
; -D WLED_DEBUG
544+
lib_deps = ${esp32_idf_V4.lib_deps}
545+
https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-DMA.git#3.0.11
546+
547+
monitor_filters = esp32_exception_decoder
548+
board_build.partitions = ${esp32.default_partitions}
549+
board_build.flash_mode = dio
550+
551+
[env:esp32dev_hub75_forum_pinout]
552+
extends = env:esp32dev_hub75
553+
build_flags = ${common.build_flags}
554+
-D WLED_RELEASE_NAME=\"ESP32_hub75_forum_pinout\"
555+
-D WLED_ENABLE_HUB75MATRIX -D NO_GFX
556+
-D ESP32_FORUM_PINOUT ;; enable for SmartMatrix default pins
557+
-D WLED_DEBUG_BUS
558+
; -D WLED_DEBUG
559+
560+
561+
562+
[env:adafruit_matrixportal_esp32s3]
563+
; ESP32-S3 processor, 8 MB flash, 2 MB of PSRAM, dedicated driver pins for HUB75
564+
board = adafruit_matrixportal_esp32s3
565+
platform = ${esp32s3.platform}
566+
platform_packages =
567+
upload_speed = 921600
568+
build_unflags = ${common.build_unflags}
569+
build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_4M_qspi\"
570+
-DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
571+
-DBOARD_HAS_PSRAM
572+
-DLOLIN_WIFI_FIX ; seems to work much better with this
573+
-D WLED_WATCHDOG_TIMEOUT=0
574+
-D WLED_ENABLE_HUB75MATRIX -D NO_GFX
575+
-D S3_LCD_DIV_NUM=20 ;; Attempt to fix wifi performance issue when panel active with S3 chips
576+
-D ARDUINO_ADAFRUIT_MATRIXPORTAL_ESP32S3
577+
-D WLED_DEBUG_BUS
578+
579+
580+
lib_deps = ${esp32s3.lib_deps}
581+
https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-DMA.git#aa28e2a ;; S3_LCD_DIV_NUM fix
582+
583+
board_build.partitions = ${esp32.default_partitions}
584+
board_build.f_flash = 80000000L
585+
board_build.flash_mode = qio
586+
monitor_filters = esp32_exception_decoder
587+
588+
[env:esp32S3_PSRAM_HUB75]
589+
;; MOONHUB HUB75 adapter board
590+
board = lilygo-t7-s3
591+
platform = ${esp32s3.platform}
592+
platform_packages =
593+
upload_speed = 921600
594+
build_unflags = ${common.build_unflags}
595+
build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"esp32S3_16MB_PSRAM_HUB75\"
596+
-DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
597+
-DBOARD_HAS_PSRAM
598+
-DLOLIN_WIFI_FIX ; seems to work much better with this
599+
-D WLED_WATCHDOG_TIMEOUT=0
600+
-D WLED_ENABLE_HUB75MATRIX -D NO_GFX
601+
-D S3_LCD_DIV_NUM=20 ;; Attempt to fix wifi performance issue when panel active with S3 chips
602+
-D MOONHUB_S3_PINOUT ;; HUB75 pinout
603+
-D WLED_DEBUG_BUS
604+
605+
lib_deps = ${esp32s3.lib_deps}
606+
https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-DMA.git#aa28e2a ;; S3_LCD_DIV_NUM fix
607+
608+
board_build.partitions = ${esp32.default_partitions}
609+
board_build.f_flash = 80000000L
610+
board_build.flash_mode = qio
611+
monitor_filters = esp32_exception_decoder

tools/cdata.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ async function writeHtmlGzipped(sourceFile, resultFile, page) {
143143
console.info("Minified and compressed " + sourceFile + " from " + originalLength + " to " + result.length + " bytes");
144144
const array = hexdump(result);
145145
let src = singleHeader;
146-
src += `const uint16_t PAGE_${page}_L = ${result.length};\n`;
146+
src += `const uint16_t PAGE_${page}_length = ${result.length};\n`;
147147
src += `const uint8_t PAGE_${page}[] PROGMEM = {\n${array}\n};\n\n`;
148148
console.info("Writing " + resultFile);
149149
fs.writeFileSync(resultFile, src);
@@ -244,9 +244,22 @@ if (isAlreadyBuilt("wled00/data") && process.argv[2] !== '--force' && process.ar
244244

245245
writeHtmlGzipped("wled00/data/index.htm", "wled00/html_ui.h", 'index');
246246
writeHtmlGzipped("wled00/data/pixart/pixart.htm", "wled00/html_pixart.h", 'pixart');
247-
writeHtmlGzipped("wled00/data/cpal/cpal.htm", "wled00/html_cpal.h", 'cpal');
247+
//writeHtmlGzipped("wled00/data/cpal/cpal.htm", "wled00/html_cpal.h", 'cpal');
248248
writeHtmlGzipped("wled00/data/pxmagic/pxmagic.htm", "wled00/html_pxmagic.h", 'pxmagic');
249249

250+
writeChunks(
251+
"wled00/data/cpal",
252+
[
253+
{
254+
file: "cpal.htm",
255+
name: "PAGE_cpal",
256+
method: "gzip",
257+
filter: "html-minify"
258+
}
259+
],
260+
"wled00/html_cpal.h"
261+
);
262+
250263
writeChunks(
251264
"wled00/data",
252265
[

0 commit comments

Comments
 (0)