Conversation
WalkthroughThe Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
wled00/FX.cpp (1)
555-570: Renamestripe_lentostripeLen.This is the only new snake_case local in the block; keeping it camelCase would match the surrounding C++ additions.
As per coding guidelines, "Use camelCase for C++ function and variable names".♻️ Suggested rename
- int stripe_len = width * pitch - skip; + int stripeLen = width * pitch - skip; @@ - if (pos < stripe_len) { + if (pos < stripeLen) { col = (pos % pitch == 0) ? color1 : 0; // foreground stripe - } else if (pos < stripe_len + skip) { + } else if (pos < stripeLen + skip) { col = 0; // black gap after foreground - } else if (pos < 2 * stripe_len + skip) { - col = (((pos - stripe_len - skip) % pitch) == 0) ? color2 : 0; // background stripe + } else if (pos < 2 * stripeLen + skip) { + col = (((pos - stripeLen - skip) % pitch) == 0) ? color2 : 0; // background stripe } else {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@wled00/FX.cpp` around lines 555 - 570, The local variable stripe_len should be renamed to stripeLen to match camelCase C++ naming; update its declaration and all uses in this block (the calculation using width * pitch - skip and all subsequent comparisons like pos < stripe_len and 2 * stripe_len + skip) to stripeLen, ensuring consistency with surrounding identifiers such as period, theatre, SEGENV.aux0, color1/color2, pos, SEGLEN and the usePalette branch (SEGMENT.color_from_palette) so the logic and references remain unchanged except for the identifier rename.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@wled00/FX.cpp`:
- Around line 555-570: The local variable stripe_len should be renamed to
stripeLen to match camelCase C++ naming; update its declaration and all uses in
this block (the calculation using width * pitch - skip and all subsequent
comparisons like pos < stripe_len and 2 * stripe_len + skip) to stripeLen,
ensuring consistency with surrounding identifiers such as period, theatre,
SEGENV.aux0, color1/color2, pos, SEGLEN and the usePalette branch
(SEGMENT.color_from_palette) so the logic and references remain unchanged except
for the identifier rename.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 059d7063-3e50-4601-86d4-d8037ddf2059
📒 Files selected for processing (1)
wled00/FX.cpp
I have added a new slider to Chase 2 that generates values between 0 and 15. When this slider is at its default value of 0, it behaves exactly like the current version of Chase 2. When the slider is greater than 0, it is treated as a skip value. At any instance in time, the result looks the same as when a skip is specified in the segment definition. However, when the stripe moves by one LED, it moves to the next physical LED, rather than the next lit LED. This results is the skips rotatings as well.
Summary by CodeRabbit
New Features
Improvements