-
Notifications
You must be signed in to change notification settings - Fork 443
Add v16.0.0 documentation updates #323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
213719d
848258d
08f22dd
bd67e96
a395074
7a14a1b
92b5ec5
3577195
bb48b96
16bebd0
2cf888f
f56c1bc
9ab3817
4418961
6269c1b
b6b9d64
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| --- | ||
| title: Boot-loop Detection & Recovery | ||
| --- | ||
|
|
||
| WLED can detect when your controller is stuck in a crash loop and automatically take steps to recover it — without you needing a USB cable or serial terminal. This feature is especially useful after a bad settings change, a corrupted config file, or a failed OTA update. | ||
|
|
||
| --- | ||
|
|
||
| ## What Counts as a Boot-loop? | ||
|
|
||
| WLED counts **crash resets** stored in RTC memory (which survives a soft reboot). A crash reset is any of these reset reasons: | ||
|
|
||
| - Exception / software exception | ||
| - Hardware watchdog timeout | ||
| - Software watchdog timeout | ||
| - Panic / abort | ||
| - Task watchdog timeout | ||
|
|
||
| Normal power-on resets and clean software restarts reset the counter to zero. Brownout resets are logged but **do not** increment the counter. | ||
|
|
||
| If **5 or more crashes** happen within a **2-minute rolling window**, WLED considers the device stuck in a boot-loop and triggers the recovery sequence. | ||
|
|
||
| --- | ||
|
|
||
| ## Recovery Sequence | ||
|
|
||
| Recovery actions are taken **one per boot**, in order. After each action WLED restarts immediately. If the device still crashes after that restart, the next action is taken on the following boot. | ||
|
|
||
| | Step | Action | What it does | | ||
| |---|---|---| | ||
| | **1** | Restore backup config | Copies `/bkp.cfg.json` back over `/cfg.json` — rolls back to the last known-good configuration. | | ||
| | **2** | Reset config | Renames `/cfg.json` to `/rst.cfg.json` and starts WLED with factory defaults. Your old config is preserved in `/rst.cfg.json` for manual recovery. | | ||
| | **3** | Firmware rollback *(ESP32 only)* | Swaps the OTA boot partition to the previous firmware image. Useful after a bad OTA update. On ESP8266 this step is skipped. | | ||
| | **4** | Emergency serial dump | Dumps all filesystem files to the serial port and then **loops indefinitely**. WLED will not start normally again until you power-cycle or hardware-reset the board. Connect a serial terminal at 115200 baud to retrieve the files. | | ||
|
|
||
| !!! warning | ||
| Step 4 is the last resort. WLED stops booting and only outputs to serial. A hardware reset (power cycle or the RST button) is required to exit this state. | ||
|
|
||
| --- | ||
|
|
||
| ## How the State Is Stored | ||
|
|
||
| The crash counter and recovery progress are stored in **RTC memory**, which persists across soft reboots but is cleared by a power cycle or hardware reset. | ||
|
|
||
| - **ESP32:** uses `RTC_NOINIT_ATTR` static variables (three values: last boot timestamp, crash count, recovery step). | ||
| - **ESP8266:** uses `RTC_USER_MEM` slots 32–34 (same three values). | ||
|
|
||
| This means: | ||
|
|
||
| - Pulling the power clears the counter — the device starts fresh on the next boot. | ||
| - A clean software restart from the WLED UI also clears the counter. | ||
|
|
||
| --- | ||
|
|
||
| ## Where This Runs | ||
|
|
||
| Boot-loop detection runs very early in startup (`WLED::setup()`), right after the filesystem is mounted and before any configuration is loaded. This ensures recovery can happen even if config loading itself is what causes the crash. | ||
|
|
||
| --- | ||
|
|
||
| ## Tips | ||
|
|
||
| - If your device lands in **Step 2** (reset config), check the serial log or the filesystem editor for `/rst.cfg.json` — your previous settings are still there. | ||
| - If you're on ESP32 and a firmware update went wrong, **Step 3** (rollback) may recover you automatically without needing to re-flash. | ||
| - To manually clear the crash counter without power-cycling, do a clean restart from the WLED web UI (reboot button in Settings → Security & Updates). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| --- | ||
| title: Custom Fonts | ||
| --- | ||
|
|
||
| WLED supports loading custom bitmap fonts for use with the **Scrolling Text** effect. Custom fonts are stored on the device filesystem as `.wbf` files and can be created with the Font Factory tool, see below. | ||
| The source code of the tool as well as a collection free-to-use fonts are available [on github](https://github.com/DedeHai/WLED-Tools/tree/main/WLED-FontFactory). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct typos/capitalization in user-facing text. Please fix small text issues like Based on learnings: "ensure programming language names and API datatype names use consistent, correct capitalization ... Apply this check across all documentation markdown files under docs/." Also applies to: 60-60 🤖 Prompt for AI Agents |
||
|
|
||
| --- | ||
|
|
||
| ## Built-in fonts | ||
|
|
||
| WLED ships with five built-in fonts. In v0.16, four of them were redrawn for improved legibility while keeping the same pixel heights for backward compatibility. All built-in fonts now use **per-glyph variable width**, so narrow characters like `i` take less space than wide ones like `W`. | ||
|
|
||
| | "Font Size" | Height | | ||
| |------|---------------| | ||
| | 1 | 6 px | | ||
| | 2 | 8 px | | ||
| | 3 | 8 px | | ||
| | 4 | 9 px | | ||
| | 5 | 12 px | | ||
|
|
||
| **Note:** if you want the classic pre 16.0 fonts there is a button available in PixelForge Scrolling Text tab to download "Classic WLED Fonts" as custom fonts. Make sure you do not have any additional custom fonts installed. After downloading, enable the "Custom Font" checkmark. | ||
|
|
||
| --- | ||
|
|
||
| ## Custom font files | ||
|
|
||
| WLED uses a custom font format called **WBF** which stands for WLED Bitmap Font. Up to **5 custom font files** can be loaded from the filesystem. To use custom fonts enable the "Custom Font" checkmark in the scrolling text effect and choose the font using the "Size" slider. If less than 5 fonts are available, the smallest ones use custom fonts and larger sizes default to the built-in fonts. When more than 5 fonts are uploaded, only the first five are used (in alphabetical order). | ||
|
|
||
| ### File format | ||
|
|
||
| `.wbf` files use a tightly bit-packed binary format with a 12-byte header. You don't need to create or edit them by hand — use the Font Factory tool instead that is available in PixelForge. | ||
|
|
||
| ### UTF-8 support | ||
|
|
||
| Custom fonts can include Unicode characters beyond standard ASCII. The `.wbf` format supports 2-, 3-, and 4-byte UTF-8 code points, making it possible to use accented Latin characters, Cyrillic and other scripts. To add international characters please use the Font Factory tool - it has a user friendly drop-down menu to select from and even allows to specify custom UTF8 table offsets to add mathematical symbols for example. | ||
|
|
||
| ### Enabling custom fonts | ||
|
|
||
| 1. Upload your `.wbf` file(s) to the WLED filesystem via the **File Manager** (`/edit`) or create and upload a font using the Font Factory tool. | ||
| 2. Open the **Scrolling Text** effect settings. | ||
| 3. Enable the **Custom Font** checkbox. | ||
| 4. Use the "Size" slider to select the font | ||
|
|
||
| If no `.wbf` files are found on the filesystem, WLED falls back to the built-in fonts automatically. You can see currently available fonts and also delete them using the PixelForge tool. | ||
|
|
||
| --- | ||
|
|
||
| ## Creating fonts with Font Factory | ||
|
|
||
| [WLED Font Factory](https://github.com/DedeHai/WLED-Tools/tree/main/WLED-FontFactory) is a web-based tool for creating `.wbf` font files. It is available in the PixelForge (button below the color picker)under "Other Tools". | ||
|
|
||
| **Note:** a single symbol or letter in a font is also referred to as a "glyph" - a typographical character. | ||
|
|
||
| ### Workflow | ||
|
|
||
| 1. Load a source font — supported formats are **TTF**, **OTF**, **WOFF** as well as pixel based **BDF** and native **WBF** | ||
| 2. Choose whether to use variable or fixed glyph width | ||
| 3. Adjust the three sliders until you get the desired font size - the sliders are not available when loading bitmap fonts | ||
| 2. Choose which UTF-8 extenstion to include (e.g. Latin, Cyrillic, Greek etc.) - use preview example text to test | ||
| 3. Set the pixel height. The tool renders each glyph at that height. | ||
| 4. Edit individual glyphs pixel by pixel in the built-in glyph editor if needed or delete unwanted glyphs to save space | ||
| 5. Click **Upload** to save the `.wbf` file to the controller directly or **Download** to store it on your phone/pc | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### Showcase your font | ||
|
|
||
| The Font Factory source files include the [showcase tool](https://github.com/DedeHai/WLED-Tools/blob/main/WLED-FontFactory/source/wbfShowcaseGenerator.htm) available for download (click "Download raw file", then open the file). | ||
| It renders a `.wbf` file into a PNG image with all glyphs in the font. Use it to show a preview of your font if you want to share it on discord, reddit or any other place. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DedeHai - please review for accuracy