Skip to content

Create small default segment if out of heap#5736

Open
DedeHai wants to merge 1 commit into
wled:mainfrom
DedeHai:fix_nosegments
Open

Create small default segment if out of heap#5736
DedeHai wants to merge 1 commit into
wled:mainfrom
DedeHai:fix_nosegments

Conversation

@DedeHai

@DedeHai DedeHai commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Fallback path was missing. If out of heap and no segments are created the UI shows "no segments" error and disables most control elements which is confusing.

Summary by CodeRabbit

  • Bug Fixes
    • Improved segment initialization when automatic segment creation fails.
    • Added a fallback to ensure a default segment is available when no active segments can be created.
    • Improved handling for matrix and one-dimensional LED configurations.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bb0d56a4-e8cf-4835-906a-8690455abf3e

📥 Commits

Reviewing files that changed from the base of the PR and between e391183 and 033957d.

📒 Files selected for processing (1)
  • wled00/FX_fcn.cpp

Walkthrough

Changes

Segment recovery

Layer / File(s) Summary
Active segment fallback handling
wled00/FX_fcn.cpp
resetSegments() now checks active segments before creating its default fallback, and makeAutoSegments() resets segments when automatic creation leaves none active.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • wled/WLED#4811: Both changes modify WS2812FX::makeAutoSegments() in wled00/FX_fcn.cpp.

Suggested reviewers: npabisz, willmmiles

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: creating a small default segment when heap allocation prevents segment creation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DedeHai DedeHai added this to the 16.1 milestone Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant