Skip to content

Fix start & end of segment not "flowing" in Flow FX#5392

Merged
DedeHai merged 1 commit intowled:mainfrom
DedeHai:FlowFX_fullwidth
Feb 26, 2026
Merged

Fix start & end of segment not "flowing" in Flow FX#5392
DedeHai merged 1 commit intowled:mainfrom
DedeHai:FlowFX_fullwidth

Conversation

@DedeHai
Copy link
Collaborator

@DedeHai DedeHai commented Feb 22, 2026

start and end of segment were just showing the palette on several pixels, depending on segment size / zone width.
By adding two extra zones it now flows everywhere and the segment.fill() is no longer needed to cover up the integer math truncation.

Summary by CodeRabbit

  • Bug Fixes
    • Improved the flow animation effect with refined zone distribution calculations for better segment coverage handling. This may result in visual adjustments to how the effect displays.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 22, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

Modified the mode_flow function in FX.cpp by converting several unsigned variables to signed integers (zones, zoneLen, offset). Updated loop variables and iteration logic. Adjusted zone calculations to add two extra zones and recompute offset to center zones, with corresponding index and casting adjustments.

Changes

Cohort / File(s) Summary
Mode Flow Function Refactoring
wled00/FX.cpp
Changed variable types from unsigned to signed int for zones, zoneLen, and offset; updated loop variables and iteration logic; modified zone calculation to add two extra zones and recenter offset; adjusted colorIndex and led calculations to align with new signed indices.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • blazoncek
  • netmindz
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix start & end of segment not "flowing" in Flow FX' directly addresses the main change: fixing an issue where segment start and end pixels weren't flowing properly in the Flow FX mode.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@DedeHai DedeHai merged commit 536b40c into wled:main Feb 26, 2026
24 checks passed
@DedeHai DedeHai deleted the FlowFX_fullwidth branch February 26, 2026 10:12
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