Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
14e46c2
Update .gitignore
srg74 Jun 2, 2025
bf5e5cc
Merge branch 'wled:main' into main
srg74 Jun 6, 2025
f91f5f3
Merge branch 'wled:main' into main
srg74 Jun 7, 2025
4e9978d
Merge branch 'wled:main' into main
srg74 Jun 8, 2025
e88b5fc
Merge branch 'wled:main' into main
srg74 Jun 9, 2025
101cea1
Merge branch 'wled:main' into main
srg74 Jun 13, 2025
359d5f1
Merge branch 'wled:main' into main
srg74 Jun 16, 2025
9236650
Merge branch 'wled:main' into main
srg74 Jun 20, 2025
1bc0fb0
Merge branch 'wled:main' into main
srg74 Jun 20, 2025
12dfa64
Merge branch 'wled:main' into main
srg74 Jun 25, 2025
4d803fc
Merge branch 'wled:main' into main
srg74 Jun 28, 2025
52a1468
Merge branch 'wled:main' into main
srg74 Jul 1, 2025
f242f21
Merge branch 'wled:main' into main
srg74 Jul 4, 2025
ff095c3
Merge branch 'wled:main' into main
srg74 Jul 7, 2025
5dd2332
Merge branch 'wled:main' into main
srg74 Jul 8, 2025
5d7793c
Merge branch 'wled:main' into main
srg74 Jul 9, 2025
6d3da55
Merge branch 'wled:main' into main
srg74 Jul 10, 2025
b0fe8a5
Merge branch 'wled:main' into main
srg74 Jul 12, 2025
9ed02f7
Merge branch 'wled:main' into main
srg74 Jul 25, 2025
9dc4472
Merge branch 'wled:main' into main
srg74 Jul 28, 2025
768d6c0
Merge branch 'wled:main' into main
srg74 Aug 3, 2025
5dd861b
Merge branch 'wled:main' into main
srg74 Aug 8, 2025
6f133f0
Merge branch 'wled:main' into main
srg74 Aug 9, 2025
fcf2797
Merge branch 'wled:main' into main
srg74 Aug 14, 2025
bb47ab7
Merge branch 'wled:main' into main
srg74 Aug 16, 2025
20df3d3
Merge branch 'wled:main' into main
srg74 Aug 21, 2025
35c8b02
Merge branch 'wled:main' into main
srg74 Aug 29, 2025
131728d
Merge branch 'wled:main' into main
srg74 Sep 1, 2025
7c29480
Merge branch 'wled:main' into main
srg74 Sep 1, 2025
4d469f2
Merge branch 'wled:main' into main
srg74 Sep 3, 2025
5266dbe
Merge branch 'wled:main' into main
srg74 Sep 10, 2025
f76422a
Merge branch 'wled:main' into main
srg74 Sep 16, 2025
aeea906
Merge branch 'wled:main' into main
srg74 Sep 17, 2025
c849310
Merge branch 'wled:main' into main
srg74 Sep 22, 2025
27a2f82
Merge branch 'wled:main' into main
srg74 Sep 23, 2025
6f57c60
Merge branch 'wled:main' into main
srg74 Sep 24, 2025
4946882
Merge branch 'wled:main' into main
srg74 Sep 25, 2025
b099eda
Update .gitignore
srg74 Sep 25, 2025
795e84c
Merge branch 'wled:main' into main
srg74 Sep 27, 2025
fff67c0
Merge branch 'wled:main' into main
srg74 Sep 29, 2025
bc939c9
Merge branch 'wled:main' into main
srg74 Oct 3, 2025
adbf826
Merge branch 'wled:main' into main
srg74 Oct 5, 2025
eb6bcf5
Merge branch 'wled:main' into main
srg74 Oct 7, 2025
bb717e4
Merge branch 'wled:main' into main
srg74 Oct 10, 2025
8d1d661
Merge branch 'wled:main' into main
srg74 Oct 13, 2025
c79aad2
Merge branch 'wled:main' into main
srg74 Oct 18, 2025
bb9ecfe
Merge branch 'wled:main' into main
srg74 Oct 26, 2025
bd015ea
Merge branch 'wled:main' into main
srg74 Nov 8, 2025
a6a070b
Merge branch 'wled:main' into main
srg74 Nov 10, 2025
b9c1ee4
Merge branch 'wled:main' into main
srg74 Nov 11, 2025
9c37575
Merge branch 'wled:main' into main
srg74 Nov 14, 2025
4184194
Merge branch 'wled:main' into main
srg74 Nov 15, 2025
7c31e29
Merge branch 'wled:main' into main
srg74 Nov 16, 2025
adb2a1d
Merge branch 'wled:main' into main
srg74 Nov 17, 2025
96e1dd3
Merge branch 'wled:main' into main
srg74 Nov 20, 2025
68a59ce
Merge branch 'wled:main' into main
srg74 Nov 23, 2025
0daabb2
Merge branch 'wled:main' into main
srg74 Nov 28, 2025
51a7431
Merge branch 'wled:main' into main
srg74 Nov 30, 2025
e2c8fc6
Merge branch 'wled:main' into main
srg74 Dec 1, 2025
fdb86ea
Merge branch 'wled:main' into main
srg74 Dec 3, 2025
536c51b
Merge branch 'wled:main' into main
srg74 Dec 11, 2025
d90b522
Merge branch 'wled:main' into main
srg74 Dec 15, 2025
7b21f88
Merge branch 'wled:main' into main
srg74 Dec 17, 2025
7c12ca5
Merge branch 'wled:main' into main
srg74 Dec 18, 2025
8a44f28
Merge branch 'wled:main' into main
srg74 Dec 20, 2025
6742bf4
Merge branch 'wled:main' into main
srg74 Dec 25, 2025
f33489f
Merge branch 'wled:main' into main
srg74 Dec 26, 2025
c039dc8
Merge branch 'wled:main' into main
srg74 Dec 27, 2025
bfd8277
Merge branch 'wled:main' into main
srg74 Dec 28, 2025
d06cb86
Merge branch 'wled:main' into main
srg74 Dec 29, 2025
26eea90
Merge branch 'wled:main' into main
srg74 Jan 2, 2026
9fc69d3
Merge branch 'wled:main' into main
srg74 Jan 3, 2026
f5ac263
Merge branch 'wled:main' into main
srg74 Jan 5, 2026
21c1906
Merge branch 'wled:main' into main
srg74 Jan 6, 2026
9acb828
Merge branch 'wled:main' into main
srg74 Jan 7, 2026
da6b56d
Merge branch 'wled:main' into main
srg74 Jan 11, 2026
18ec45d
Merge branch 'wled:main' into main
srg74 Jan 12, 2026
41b0200
Merge branch 'wled:main' into main
srg74 Jan 17, 2026
454bed6
Merge branch 'wled:main' into main
srg74 Jan 18, 2026
d453ae0
Merge branch 'wled:main' into main
srg74 Jan 20, 2026
3179d9a
Merge branch 'wled:main' into main
srg74 Jan 23, 2026
ecd4443
Merge branch 'wled:main' into main
srg74 Jan 23, 2026
1d9256c
Merge branch 'wled:main' into main
srg74 Jan 25, 2026
6c34014
Merge branch 'wled:main' into main
srg74 Jan 28, 2026
9148c07
Update fork with upstream WLED main branch
srg74 Feb 8, 2026
6aad438
Merge branch 'wled:main' into main
srg74 Feb 9, 2026
4d3daba
Merge branch 'wled:main' into main
srg74 Feb 11, 2026
45687b9
Merge branch 'wled:main' into main
srg74 Feb 12, 2026
225ed4b
Merge branch 'wled:main' into main
srg74 Feb 16, 2026
584502b
Merge branch 'wled:main' into main
srg74 Feb 20, 2026
9fcb223
Merge branch 'wled:main' into main
srg74 Feb 22, 2026
b172281
Merge branch 'wled:main' into main
srg74 Feb 24, 2026
0f12124
Merge branch 'wled:main' into main
srg74 Feb 26, 2026
c01d691
Merge branch 'wled:main' into main
srg74 Feb 27, 2026
8a74eb6
Update .gitignore
srg74 Jun 2, 2025
4689375
Update .gitignore
srg74 Sep 25, 2025
4d52ebd
Add GC9A01 round TFT display usermod
srg74 Oct 6, 2025
9e9cc47
Fix palette navigation wraparound in rotary encoder ALT
srg74 Oct 6, 2025
3fe5866
Address PR feedback: fix documentation and palette handling
srg74 Oct 6, 2025
012f5ef
Remove Wire library dependency from library.json
srg74 Oct 6, 2025
ef22813
Address PR feedback for GC9A01 usermod
srg74 Oct 6, 2025
4521b22
Address PR feedback for GC9A01 usermod
srg74 Oct 7, 2025
7d6a2c6
Use DEBUG_PRINTF/DEBUG_PRINTLN macros for consistency
srg74 Oct 7, 2025
0c9c80f
Remove redundant Serial.println calls in rotary encoder usermod
srg74 Oct 7, 2025
49c6099
Add null pointer checks for gc9a01Display->updateRedrawTime() calls
srg74 Oct 7, 2025
b927bae
Fix null pointer dereference in rotary encoder ui usermod display calls
srg74 Feb 28, 2026
de40a6f
Merge branch 'wled:main' into main
srg74 Mar 2, 2026
9a45350
Merge branch 'wled:main' into main
srg74 Mar 3, 2026
a922285
Merge branch 'wled:main' into main
srg74 Mar 4, 2026
4f97333
Merge branch 'wled:main' into main
srg74 Mar 9, 2026
90e36cf
Merge branch 'wled:main' into main
srg74 Mar 11, 2026
9edd538
Merge branch 'wled:main' into main
srg74 Mar 13, 2026
9a926e7
Merge branch 'wled:main' into main
srg74 Mar 16, 2026
ef09ea3
Merge branch 'wled:main' into main
srg74 Mar 19, 2026
1d10ba0
Merge branch 'wled:main' into main
srg74 Mar 23, 2026
ba7a14e
Merge branch 'wled:main' into main
srg74 Mar 24, 2026
f9e1182
Merge branch 'main' into feature/gc9a01-display-usermod
srg74 Mar 24, 2026
5f3e2a4
Merge branch 'wled:main' into main
srg74 Mar 27, 2026
7c96cea
Merge branch 'wled:main' into main
srg74 Mar 30, 2026
38bbb3a
Merge branch 'wled:main' into main
srg74 Apr 1, 2026
203fa09
Merge branch 'wled:main' into main
srg74 Apr 3, 2026
9a0bd8f
Merge branch 'wled:main' into main
srg74 Apr 6, 2026
a89b674
Merge branch 'wled:main' into main
srg74 Apr 9, 2026
f644ea8
Merge branch 'wled:main' into main
srg74 Apr 10, 2026
39991bb
Merge branch 'wled:main' into main
srg74 Apr 11, 2026
49055b6
Update wled.h
srg74 Apr 11, 2026
560ad03
Merge branch 'wled:main' into main
srg74 Apr 12, 2026
0b9d799
Merge branch 'wled:main' into main
srg74 Apr 17, 2026
09d15ea
Merge branch 'wled:main' into main
srg74 Apr 19, 2026
c39d6d9
Merge branch 'wled:main' into main
srg74 Apr 21, 2026
afbbd0d
Merge branch 'wled:main' into main
srg74 Apr 25, 2026
b22fcbd
Merge branch 'wled:main' into main
srg74 Apr 28, 2026
ed3a44a
Merge branch 'main' into main
srg74 May 3, 2026
e3fbd3d
Merge branch 'wled:main' into main
srg74 May 9, 2026
b89f4bd
Merge branch 'wled:main' into main
srg74 May 15, 2026
632283c
Merge branch 'wled:main' into main
srg74 May 17, 2026
2727936
Merge branch 'wled:main' into main
srg74 May 23, 2026
75be308
Merge branch 'wled:main' into main
srg74 May 27, 2026
1756b8d
Merge branch 'wled:main' into main
srg74 May 30, 2026
e650912
Merge branch 'main' into feature/gc9a01-display-usermod
srg74 May 30, 2026
e228aca
Address PR review findings for GC9A01 display usermod
srg74 May 30, 2026
3187524
Update platformio.ini
srg74 May 30, 2026
2f83275
Merge branch 'wled:main' into main
srg74 Jun 14, 2026
dae5331
Merge branch 'wled:main' into main
srg74 Jun 15, 2026
03d2f97
Merge branch 'wled:main' into main
srg74 Jun 17, 2026
ef02013
Merge branch 'wled:main' into main
srg74 Jun 18, 2026
749259e
Merge branch 'wled:main' into main
srg74 Jun 21, 2026
faa6a07
Merge branch 'wled:main' into main
srg74 Jun 26, 2026
2d6f4d5
Merge branch 'wled:main' into main
srg74 Jun 30, 2026
da13541
Merge branch 'wled:main' into main
srg74 Jul 1, 2026
da64430
Merge branch 'wled:main' into main
srg74 Jul 3, 2026
f6cecaf
Merge branch 'wled:main' into main
srg74 Jul 4, 2026
987fa43
Merge branch 'wled:main' into main
srg74 Jul 9, 2026
dd0d643
Merge branch 'wled:main' into main
srg74 Jul 12, 2026
2dfb637
Merge branch 'wled:main' into main
srg74 Jul 18, 2026
b7066e2
Merge branch 'wled:main' into main
srg74 Jul 23, 2026
a97e586
Merge branch 'wled:main' into main
srg74 Jul 24, 2026
f3ef0a2
Merge branch 'wled:main' into main
srg74 Jul 28, 2026
819e68f
Merge branch 'wled:main' into main
srg74 Aug 9, 2026
6fc73d1
Merge branch 'main' into feature/gc9a01-display-usermod
srg74 Aug 9, 2026
ba93585
Trying to fix compilation errors (even doh they not important)
srg74 Aug 9, 2026
5596a69
Update usermod_v2_gc9a01_display.h
srg74 Aug 9, 2026
86bbcc7
Next fix try
srg74 Aug 9, 2026
86d0cc6
Update usermod_v2_gc9a01_display.h
srg74 Aug 9, 2026
1ef0bf3
Update library.json
srg74 Aug 9, 2026
6c669c1
Create SPIFFS.h
srg74 Aug 9, 2026
a04875e
Update platformio_override.usermods.ini
srg74 Aug 9, 2026
008a5c9
Update platformio_override.usermods.ini
srg74 Aug 9, 2026
32e1632
Update platformio_override.usermods.ini
srg74 Aug 9, 2026
105aaf5
Update platformio_override.usermods.ini
srg74 Aug 9, 2026
e869528
CI: add SPIFFS compatibility shim and include flags for GC9A01 usermod
srg74 Aug 9, 2026
ed975af
CI: add lib-compatible SPIFFS shim so CI finds SPIFFS.h without extra…
srg74 Aug 9, 2026
8966055
ci: trigger rerun with SPIFFS shim
srg74 Aug 9, 2026
a9738aa
CI: place SPIFFS shim in lib/.../src so PlatformIO library include pa…
srg74 Aug 9, 2026
6fa6ef4
usermods: add lib_extra_dirs for compat_spiffs to CI override
srg74 Aug 9, 2026
1f81644
Update readme.md
srg74 Aug 9, 2026
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ wled-update.sh
/build_output/
/node_modules/
/logs/

/tools/organize_firmware.py
/wled00/extLibs
/wled00/LittleFS
/wled00/my_config.h
/wled00/Release
/wled00/wled00.ino.cpp
/wled00/html_*.h
/wled00/js_*.h
WLED.code-workspace
12 changes: 12 additions & 0 deletions include/SPIFFS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

#include <LittleFS.h>

// Compatibility shim for libraries that still include SPIFFS.h.
// WLED uses LittleFS for filesystem access, so we map the legacy SPIFFS
// symbol to LittleFS to keep TFT_eSPI and similar libraries buildable.
namespace fs {
using SPIFFSFS = LittleFSFS;
}

inline fs::LittleFSFS SPIFFS;
Comment on lines +5 to +12

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== repository files matching SPIFFS.h and LittleFS references =="
git ls-files | rg '(^|/)(SPIFFS\.h|.*LittleFS.*)|platform\.txt|platform\.properties|_fs.*' || true

echo
echo "== include/SPIFFS.h =="
if [ -f include/SPIFFS.h ]; then cat -n include/SPIFFS.h; fi

echo
echo "== lib/compat_spiffs/include/SPIFFS.h =="
if [ -f lib/compat_spiffs/include/SPIFFS.h ]; then cat -n lib/compat_spiffs/include/SPIFFS.h; fi

echo
echo "== references to SPIFFS outside compatibility headers =="
rg -n '\bSPIFFS\b|SPIFFSFS|LittleFSFS|LittleFS\.(begin|format|mkdir|open|read|write|remove|rename|listDir)|LittleFSFS\s+LittleFS|inline\s+fs::LittleFSFS\s+LittleFS' .

Repository: wled/WLED

Length of output: 2431


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== inspect likely LittleFS declarations/usages =="
rg -n "fs::LittleFSFS|LittleFSFS\s+(LittleFS|SPIFFS)|LittleFSFS LittleFS|LittleFSFS\s*LittleFS|LittleFSFS\\* LittleFS|LittleFSFS\\*SPIFFS|\\bLittleFS\\.begin\\(" -g '!lib/compat_spiffs' .

Repository: wled/WLED

Length of output: 249


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
for p in [Path("include/SPIFFS.h"), Path("lib/compat_spiffs/include/SPIFFS.h")]:
    if p.exists():
        txt = p.read_text()
        print(f"{p}: bytes={len(txt)} lines={len(txt.splitlines())} contains inline fs::LittleFSFS SPIFFS: {bool('inline fs::LittleFSFS SPIFFS;' in txt)} exists variable SPIFFS: {bool('\\bSPIFFS\\b' in txt)}")
        for i, line in enumerate(txt.splitlines(), 1):
            if "LittleFS" in line or "SPIFFS" in line:
                print(f"  {i}: {line}")
PY

Repository: wled/WLED

Length of output: 649


🌐 Web query:

Arduino ESP32 LittleFS.h class LittleFSFS begin method inline global LittleFS instance

💡 Result:

In the ESP32 Arduino LittleFS library, LittleFSFS::begin(...) is declared as a bool member function and the global Arduino instance is named LittleFS (of type fs::LittleFSFS). [1][2] 1) LittleFSFS class and begin signature (Arduino-ESP32) - The class is declared as class LittleFSFS: public FS, with begin(...) as: - bool begin(bool formatOnFail = false, const char * basePath = "/littlefs", uint8_t maxOpenFiles = 10, const char * partitionLabel = "spiffs"); This is shown in the header. [2] 2) Implementation details of LittleFSFS::begin - The begin implementation: - Stores partitionLabel_ (allocating a copy when partitionLabel is provided). [3] - Checks esp_littlefs_mounted(partitionLabel_) and returns true if already mounted. [3] - Builds an esp_vfs_littlefs_conf_t with.base_path and.partition_label and calls esp_vfs_littlefs_register(&conf). [3] - If esp_vfs_littlefs_register fails with ESP_FAIL and formatOnFail is true, it calls format and then retries esp_vfs_littlefs_register. [3] - On success it sets the mountpoint to basePath via _impl->mountpoint(basePath) and returns true. [3] - Returns false on mount/register failure. [3] 3) Global LittleFS instance (what you call in sketches) - The header declares an extern global instance: - extern fs::LittleFSFS LittleFS; so sketches use LittleFS.begin(...). [2] 4) How begin is called in practice (example sketch) - In the LittleFS_test.ino example, setup calls begin on the global LittleFS instance, e.g.: - if (!LittleFS.begin(FORMAT_LITTLEFS_IF_FAILED)) {... } and in the TWOPART case it calls begin(...) with arguments including basePath and partition label. [4] Example usage pattern (Arduino sketch) - Include the header and call the global instance: - #include <LittleFS.h> - if (!LittleFS.begin(/formatOnFail/ true)) { /handle error/ } This matches the example’s use of the global LittleFS instance. [4]

Citations:


Route the SPIFFS compatibility shim to the mounted WLED LittleFS instance.

begin() mounts the LittleFS global, but these headers define a separate SPIFFS object. The extra object stays unmounted, so compatibility libraries can fail on file operations even after the mounted LittleFS filesystem appears ready. Keep both compatibility headers’ SPIFFS definition as an alias or external reference to the same mounted LittleFS instance, or mount this exact shim object before use.

📍 Affects 2 files
  • include/SPIFFS.h#L5-L12 (this comment)
  • lib/compat_spiffs/include/SPIFFS.h#L5-L12
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@include/SPIFFS.h` around lines 5 - 12, Update the SPIFFS definitions in
include/SPIFFS.h lines 5-12 and lib/compat_spiffs/include/SPIFFS.h lines 5-12 so
SPIFFS aliases or references the mounted global LittleFS instance used by
begin(), rather than creating a separate fs::LittleFSFS object; alternatively,
ensure this exact shim object is mounted before compatibility-library file
operations.

Source: MCP tools

12 changes: 12 additions & 0 deletions lib/compat_spiffs/include/SPIFFS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

#include <LittleFS.h>

// Compatibility shim for libraries that still include SPIFFS.h.
// WLED uses LittleFS for filesystem access, so we map the legacy SPIFFS
// symbol to LittleFS to keep TFT_eSPI and similar libraries buildable.
namespace fs {
using SPIFFSFS = LittleFSFS;
}

inline fs::LittleFSFS SPIFFS;
12 changes: 12 additions & 0 deletions lib/compat_spiffs/src/SPIFFS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

#include <LittleFS.h>

// Compatibility shim for libraries that still include SPIFFS.h.
// Placed in lib/compat_spiffs/src so PlatformIO adds it to the include path
// automatically when scanning libraries.
namespace fs {
using SPIFFSFS = LittleFSFS;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Apply the required two-space indentation.

Line 9 places the namespace member at column 1.

-using SPIFFSFS = LittleFSFS;
+  using SPIFFSFS = LittleFSFS;

As per path instructions, C++ headers must use 2-space indentation and match the existing C++ style.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
using SPIFFSFS = LittleFSFS;
using SPIFFSFS = LittleFSFS;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/compat_spiffs/src/SPIFFS.h` at line 9, Indent the SPIFFSFS alias
declaration by two spaces to match the required C++ header namespace style.

Source: Path instructions

}

inline fs::LittleFSFS SPIFFS;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n --glob '*.{cpp,h,hpp,ino}' \
  '\b(SPIFFS|LittleFS)[[:space:]]*\.[[:space:]]*(begin|end|open|format|exists|remove|rename|mkdir|rmdir)[[:space:]]*\(' .

Repository: wled/WLED

Length of output: 147


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | rg '(^|/)SPIFFS\.h$|LittleFS|WLED\.ino$' || true

echo "== SPIFFS.h if present =="
if [ -f lib/compat_spiffs/src/SPIFFS.h ]; then
  cat -n lib/compat_spiffs/src/SPIFFS.h
fi

echo "== references to SPIFFS/LittleFS symbols =="
rg -n '\b(SPIFFS|LittleFS)\b' -g '*.{cpp,h,hpp,ino,c}' . || true

echo "== filesystem lifecycle references =="
rg -n '\b(SPIFFS|LittleFS)[[:space:]]*\.[[:space:]]*(begin|end|open|format|exists|remove|rename|mkdir|rmdir|fs|size|free)\s*\(' . || true

Repository: wled/WLED

Length of output: 2499


🌐 Web query:

Arduino ESP32 LittleFS LittleFSFS begin mount partition returns true mounted without assigning mount point

💡 Result:

In the Arduino ESP32 environment, the LittleFS begin() method provides default values for its parameters, which explains why it can return true even when you do not explicitly assign a mount point [1][2]. The signature of the begin method is typically: bool begin(bool formatOnFail = false, const char *basePath = "/littlefs", uint8_t maxOpenFiles = 10, const char *partitionLabel = "littlefs") When you call LittleFS.begin() without arguments: 1. It uses the default base path (mount point) of "/littlefs" [1]. 2. It attempts to mount the partition labeled "littlefs" [1]. If your call returns true, the filesystem has been successfully mounted at the default location (/littlefs). If you were expecting it to mount elsewhere or if you have a custom partition setup, you must explicitly provide the basePath and partitionLabel parameters [1][3][4]. Key considerations: - Default Behavior: If you do not specify parameters, the library defaults to "/littlefs" as the mount point [1]. This is why code often works "without" visible assignment; it is assigned automatically by the library's default arguments [2]. - Partition Table: LittleFS requires a partition of the correct type (often defined as spiffs or littlefs in your partitions.csv file) [5][6][7]. If the library cannot find a partition with the specified label (defaulting to "littlefs"), mounting will fail and return false [1][4]. - Legacy/Third-Party Libraries: Note that if you are using the older lorol/LITTLEFS library instead of the built-in core library, some behaviors regarding default parameters and labels may vary, though the core espressif/arduino-esp32 implementation follows the standard described above [1][8][9]. To ensure explicit control, always define your parameters: if (!LittleFS.begin(true, "/your_mount_point", 10, "your_partition_label")) { ... } [4]

Citations:


🌐 Web query:

espressif arduino-esp32 LittleFS.cpp LittleFSFS begin _mount return true

💡 Result:

In the espressif/arduino-esp32 framework, the LittleFSFS::begin method returns true when the LittleFS partition is successfully mounted or if it is already mounted [1][2]. The specific implementation logic in LittleFS.cpp functions as follows: 1. Check for existing mount: The method first calls esp_littlefs_mounted(partitionLabel_) [1][2]. If this returns true, the filesystem is already accessible, and the function immediately returns true [1][2]. 2. Registration: If not already mounted, it prepares an esp_vfs_littlefs_conf_t configuration structure and attempts to register the filesystem using esp_vfs_littlefs_register(&conf) [1][2]. 3. Optional Formatting: If the registration fails (ESP_FAIL) and formatOnFail is set to true, it attempts to format the partition [1][2]. If formatting succeeds, it tries to register the filesystem again [1][2]. 4. Success Criteria: If registration is successful (err == ESP_OK), the method sets the internal mount point path via _impl->mountpoint(basePath) and returns true [1][2]. If the registration fails and cannot be recovered by formatting, it logs an error and returns false [1][2]. The return value indicates that the VFS (Virtual File System) layer has successfully associated the LittleFS partition with the specified base path [1][2].

Citations:


🌐 Web query:

espressif arduino-esp32 LittleFS.cpp LittleFSFS end esp_littlefs_unmount unregister partition _impl mountpoint

💡 Result:

In the arduino-esp32 framework, the LittleFS.end method is responsible for properly unmounting and unregistering the LittleFS filesystem from the Virtual File System (VFS) layer [1]. When LittleFS.end is called, the following process occurs: 1. Verification: It checks if the filesystem is currently mounted by calling esp_littlefs_mounted(partitionLabel_) [1][2]. 2. Unregistration: If mounted, it calls esp_vfs_littlefs_unregister(partitionLabel_) to unregister the partition [1][2]. 3. VFS Update: Internally, esp_vfs_littlefs_unregister handles unmounting the underlying filesystem and freeing the associated resources [3][4]. 4. Cleanup: After successfully unregistering, it calls _impl->mountpoint(NULL) to clear the mountpoint reference in the filesystem implementation wrapper [1][2]. This ensures that the partition is no longer associated with a VFS path, allowing it to be re-mounted later if needed [1][4].

Citations:


🌐 Web query:

espressif arduino-esp32 LittleFS.cpp LittleFSFS end existing mount another begin false

💡 Result:

If you’re referring to the Arduino-ESP32 LittleFS implementation, the behavior is: 1) LittleFSFS::begin will do nothing harmful if the same partition is already mounted. - In LittleFSFS::begin, arduino-esp32 checks esp_littlefs_mounted(partitionLabel_) and, if already mounted, logs “LittleFS Already Mounted!” and returns true immediately [1]. - That means you do NOT need (and should not do) an explicit “end; begin;” just to re-mount the same partition; begin is already idempotent for an already-mounted partition [1]. 2) LittleFSFS::end unmounts only if the partition is currently mounted. - end checks esp_littlefs_mounted(partitionLabel_) and, if mounted, calls esp_vfs_littlefs_unregister(partitionLabel_) and then clears the stored mountpoint [1]. 3) “end existing mount another begin false” / “begin false” in practice: - The “begin” parameter “formatOnFail” controls only whether formatting is attempted if mount fails; it is set via LittleFSFS::begin(bool formatOnFail,...) and the code passes.format_if_mount_failed = false in the esp_vfs_littlefs_conf_t, but then conditionally retries with format only when formatOnFail is true [1]. - Therefore, calling LittleFS.begin(false) (i.e., formatOnFail=false) will NOT format on mount failure; mount will fail and return false instead [1]. 4) Mounting a different LittleFS partition (different partitionLabel) can coexist with “another begin”. - The implementation supports specifying a partitionLabel; begin stores/updates partitionLabel_ and uses it for the mounted-check and registration [1]. - The official LittleFS_test example shows mounting a second partition by calling LittleFS.begin(..., basePath, maxOpenFiles, "part2") and then LittleFS.end when done, before using the first partition again [2]. What to do in your situation - If you just want to ensure a single mount: call LittleFS.begin(false) once at startup. If it’s already mounted, begin will just return true [1]. - If you need to switch to a different partition/basePath: call LittleFS.end first (so the previous partition is unregistered), then call LittleFS.begin(false, newBasePath, newMaxOpenFiles, newPartitionLabel) [1][2]. - If begin(false) fails: because formatOnFail is false, it will not format; you must either repair/format externally or call begin(true) / format intentionally [1]. Code sketch (switch partitions) - end previous mount, then mount another without formatting on fail: LittleFS.end; bool ok = LittleFS.begin(false, "/lfs2", 5, "part2"); If you tell me the exact call sequence you’re using (the basePath + partitionLabel values and whether you expect re-mounting same vs different partition), I can map it precisely to the code paths above.

Citations:


Reuse the existing LittleFS singleton.

This compatibility shim currently constructs a duplicate LittleFSFS wrapper with default mount parameters. A legacy SPIFFS shim is useful, but avoid exposing a second instance that can interfere with the same LittleFS partition when filesystem lifecycle calls are used.

Suggested fix
-inline fs::LittleFSFS SPIFFS;
+#define SPIFFS LittleFS
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
inline fs::LittleFSFS SPIFFS;
`#define` SPIFFS LittleFS
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/compat_spiffs/src/SPIFFS.h` at line 12, Update the SPIFFS compatibility
alias to reuse the existing LittleFS singleton instead of constructing a new
LittleFSFS instance; preserve the legacy SPIFFS symbol while ensuring filesystem
lifecycle calls operate on the same LittleFS object.

10 changes: 8 additions & 2 deletions usermods/platformio_override.usermods.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,43 @@ default_envs = usermods_esp32, usermods_esp32c3, usermods_esp32s2, usermods_esp3
[env:usermods_esp32]
extends = env:esp32dev
build_flags = ${env:esp32dev.build_flags}
-Iinclude
-DTOUCH_CS=9 -D WLED_USE_SD_SPI ;; help a few usermods that require special flags to compile
custom_usermods = ${usermods.custom_usermods}
board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat
lib_extra_dirs = lib/compat_spiffs


[env:usermods_esp32c3]
extends = env:esp32c3dev
build_flags = ${env:esp32c3dev.build_flags}
-Iinclude
-DTOUCH_CS=9 -D WLED_USE_SD_SPI ;; help a few usermods that require special flags to compile
board = esp32-c3-devkitm-1
custom_usermods = ${usermods.custom_usermods}
board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat
lib_extra_dirs = lib/compat_spiffs


[env:usermods_esp32s2]
extends = env:lolin_s2_mini
build_flags = ${env:lolin_s2_mini.build_flags}
-Iinclude
-DTOUCH_CS=9 -D WLED_USE_SD_SPI ;; help a few usermods that require special flags to compile
custom_usermods = ${usermods.custom_usermods}
board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat
lib_extra_dirs = lib/compat_spiffs


[env:usermods_esp32s3]
extends = env:esp32s3dev_16MB_opi
build_flags = ${env:esp32s3dev_16MB_opi.build_flags}
-Iinclude
-DTOUCH_CS=9 -D WLED_USE_SD_SPI ;; help a few usermods that require special flags to compile
-D WLED_DEBUG ;; try to catch broken DEBUG_PRINT statements
custom_usermods = ${usermods.custom_usermods}
board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat


lib_extra_dirs = lib/compat_spiffs

[usermods]
# Added in CI
7 changes: 7 additions & 0 deletions usermods/usermod_v2_gc9a01_display/library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "gc9a01_display",
"build": { "libArchive": false },
"dependencies": {
"bodmer/TFT_eSPI": "^2.5.43"
}
}
125 changes: 125 additions & 0 deletions usermods/usermod_v2_gc9a01_display/logo_data.h

Large diffs are not rendered by default.

120 changes: 120 additions & 0 deletions usermods/usermod_v2_gc9a01_display/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# GC9A01 Display Usermod

A fully-featured WLED usermod providing comprehensive visual interface on GC9A01 240x240 round TFT displays with complete rotary encoder integration.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use “fully featured”.

Replace fully-featured with fully featured in the opening sentence.

🧰 Tools
🪛 LanguageTool

[grammar] ~3-~3: Ensure spelling is correct
Context: ... Display Usermod A fully-featured WLED usermod providing comprehensive visual interface on GC9A0...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@usermods/usermod_v2_gc9a01_display/readme.md` at line 3, Update the opening
description to replace “fully-featured” with “fully featured,” preserving the
rest of the sentence unchanged.

Source: Linters/SAST tools


## Features

### Visual Interface

- **Circular Design**: Optimized for 240x240 round displays with blue bezel theming
- **Real-time Clock**: Large digital clock display (12/24-hour formats)
- **WiFi Signal Strength**: Visual signal strength indicator with 4-level bars (25%, 50%, 75%, 100%)
- **Power Status**: Dynamic "OFF [switch] ON" layout with contextual text
- **Brightness Arc**: Semicircular brightness visualization
- **Color Controls**: Three color buttons (FX, BG, CS) with live color preview and automatic updates
- **Effect Display**: Current effect name
- **Palette Display**: Current palette name
- **Startup Logo**: WLED logo display during initialization

### Modes

- **Sleep Mode**: Automatic display sleep after configurable timeout (5-300 seconds)
- **Clock Mode**: Alternative to sleep - shows clock instead of turning off display
- **Wake on Interaction**: Automatic wake on rotary encoder use or button press
- **Unified Timeout**: Single configurable timeout controls both sleep and clock modes
- **Backlight Control**: PWM-based brightness control (0-100%)

### Performance Features

- **State Caching**: Minimal redraws using comprehensive change detection
- **Smart Updates**: Automatic color button updates when colors change from any source (web UI, API, etc.)
- **Non-blocking Updates**: Asynchronous display updates following Four Line Display ALT pattern
- **Memory Optimized**: Efficient memory usage with proper cleanup
- **Debug Support**: Comprehensive debug logging with WLED macros

## Hardware Requirements

- ESP32 development board
- GC9A01 240x240 TFT display (round)
- Optional: Rotary encoder (usermod_v2_rotary_encoder_ui_ALT)

## Wiring

### GC9A01 Display

| GC9A01 Pin | ESP32 Pin | Function | Description |
|------------|-----------|-------------|----------------------|
| VCC | 3.3V | Power | 3.3V power supply |
| GND | GND | Ground | Common ground |
| SCL/SCLK | GPIO18 | SPI Clock | SPI clock signal |
| SDA/MOSI | GPIO23 | SPI MOSI | SPI data out |
| RES/RST | GPIO17 | Reset | Display reset |
| DC | GPIO15 | Data/Command| Data/Command control |
| CS | GPIO5 | Chip Select | SPI chip select |
| BL | GPIO26 | Backlight | Backlight control |

**Note**: Pin assignments can be customized via build flags (see Configuration section).

### Basic Setup

Add to your `platformio_override.ini`:

```ini
[env:esp32_gc9a01]
extends = env:esp32dev
upload_speed = 460800
monitor_speed = 115200
custom_usermods =
usermod_v2_gc9a01_display
usermod_v2_rotary_encoder_ui_ALT
build_flags = ${common.build_flags} ${esp32_idf_V5.build_flags}
-Iinclude
-D WLED_DEBUG
-D WLED_DISABLE_BROWNOUT_DET

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Files:"
git ls-files | rg 'usermods/.*/readme\.md|usermods/.*/.*\.md|usermods/usermod_v2_gc9a01_display/readme.md|CHANGELOG.md|platformio|wled\.h|Brownout|BROWNOUT|DISABLE_BROWNOUT|brownout' || true

echo
echo "Target README context:"
if [ -f usermods/usermod_v2_gc9a01_display/readme.md ]; then
  nl -ba usermods/usermod_v2_gc9a01_display/readme.md | sed -n '1,130p'
fi

echo
echo "Repository usages and docs for brownout flag:"
rg -n "WLED_DISABLE_BROWNOUT_DET|DISABLE_BROWNOUT|brownout|BROWNOUT" . -S || true

Repository: wled/WLED

Length of output: 3322


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Target README around setup block:"
awk 'NR>=1 && NR<=130 { printf "%5d\t%s\n", NR, $0 }' usermods/usermod_v2_gc9a01_display/readme.md

echo
echo "Definition/usages of brownout flag:"
rg -n "WLED_DISABLE_BROWNOUT_DET|DEFAULT_BROWNOUT|DISABLE_BROWN" -S . || true

echo
echo "Relevant wled.h snippets:"
rg -n -C 3 "WLED_DISABLE_BROWNOUT_DET|DEFAULT_BROWNOUT|brownout|BROWNOUT" wled00/wled.h platformio*.ini platformio_override.sample.ini usermods/platformio_override.usermods.ini CHANGELOG.md -S || true

Repository: wled/WLED

Length of output: 11970


Do not include WLED_DISABLE_BROWNOUT_DET in the generic setup.

This flag disables the ESP32 brownout detector and is off by default. Add it only for environments with known power-supply issues, and include a board-specific warning.

Proposed fix
-  -D WLED_DISABLE_BROWNOUT_DET
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
-D WLED_DISABLE_BROWNOUT_DET
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@usermods/usermod_v2_gc9a01_display/readme.md` at line 73, Remove
WLED_DISABLE_BROWNOUT_DET from the generic setup instructions in the readme.
Document it only in the board- or environment-specific setup section for known
power-supply issues, including a warning that it disables the ESP32 brownout
detector.

Sources: Path instructions, MCP tools

-D WLED_RELEASE_NAME="\"esp32_dev_board_16mb_gc9a01\""
-D SERVERNAME='"dev-board-gc9a01"'
-D WLED_BRAND="\"SerKo\""
-D WLED_PRODUCT_NAME="\"WLED dev board\""
-D WLED_REPO="\"srg74/WLED-wemos-shield\""
-D USERMOD_GC9A01_DISPLAY
-DUSER_SETUP_LOADED=1
-DGC9A01_DRIVER=1
-DTFT_WIDTH=240
-DTFT_HEIGHT=240
-DTFT_MOSI=23
-DTFT_SCLK=18
-DTFT_CS=5
-DTFT_DC=15
-DTFT_RST=17
-DTFT_BL=26
-DTOUCH_CS=-1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT6=1
-DLOAD_FONT7=1
-DLOAD_FONT8=1
-DLOAD_GFXFF=1
-DSMOOTH_FONT=1
-DSPI_FREQUENCY=27000000
-D ENCODER_DT_PIN=25
-D ENCODER_CLK_PIN=32
-D ENCODER_SW_PIN=27
```

### Debug Information

Enable debug output with `-D WLED_DEBUG` to see detailed logging:

- Display initialization status and TFT_eSPI configuration
- Update timing information and redraw triggers
- State change detection (brightness, effect, colors, etc.)
- Sleep/wake events and timeout tracking
- Error conditions and recovery attempts

Debug output appears in Serial Monitor at 115200 baud.

## Change log

- **v1** (2025-10-06):
- First public release
Loading
Loading