Skip to content

Conversation

@robsonek
Copy link

@robsonek robsonek commented Nov 24, 2025

Added toggle modes for userVar0 to control light states.

Summary by CodeRabbit

  • New Features
    • Added toggle controls for both directions of the stairway wipe effect so users can switch direction and toggle the effect state more intuitively.
  • Style
    • Minor formatting cleanup at file end for consistency.

✏️ Tip: You can customize this high-level summary in your review settings.

Added toggle modes for userVar0 to control light states based on movement detection.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 24, 2025

Walkthrough

Adds toggle handling for userVar0 values 3 and 4 in loop(): depending on current wipeState it either enables the corresponding direction (setting userVar0 to 1 or 2 and resetting wipeState) or clears the toggle by setting userVar0 to 0. Also minor formatting newline at EOF.

Changes

Cohort / File(s) Summary
Toggle handling (single file)
usermods/stairway_wipe_basic/stairway_wipe_basic.cpp
Added conditional logic in loop() to treat userVar0 == 3 and userVar0 == 4 as toggle controls. If wipeState is 0, 3, or 4 the code resets wipeState to 0 and sets userVar0 to 1 (for 3) or 2 (for 4); otherwise it clears the toggle by setting userVar0 to 0. Minor EOF newline added.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify wipeState conditions (0, 3, 4) correctly represent "off" or "turning off" states in all scenarios.
  • Confirm mapping of userVar0 values (3→1, 4→2) matches intended direction semantics.
  • Check for race/transition edge cases when toggling during active wipes.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 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: implementing toggle modes for userVar0 in the stairway wipe effect, which is clearly demonstrated in the code modifications.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1bc9b46 and 2cd5524.

📒 Files selected for processing (1)
  • usermods/stairway_wipe_basic/stairway_wipe_basic.cpp (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • usermods/stairway_wipe_basic/stairway_wipe_basic.cpp

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
usermods/stairway_wipe_basic/stairway_wipe_basic.cpp (1)

33-34: Documentation could be more detailed about transition states.

The toggle mode documentation is clear, but could benefit from mentioning how toggles behave during wipe transitions (turning on/off).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e081a7 and 1bc9b46.

📒 Files selected for processing (1)
  • usermods/stairway_wipe_basic/stairway_wipe_basic.cpp (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: ksedgwic
Repo: wled/WLED PR: 4919
File: usermods/usermod_v2_departstrip/depart_model.cpp:164-187
Timestamp: 2025-09-09T23:14:06.323Z
Learning: In the DepartStrip usermod, it's intentionally valid to have different colors for different directions (e.g., "72M-N" vs "72M-S"), even though they may map to the same color values in the current implementation.
🔇 Additional comments (1)
usermods/stairway_wipe_basic/stairway_wipe_basic.cpp (1)

145-145: LGTM: Proper EOF formatting.

Adding a newline at the end of the file is good practice and doesn't affect functionality.

@robsonek
Copy link
Author

@coderabbitai generate docstrings

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

✅ Actions performed

Initiated docstring generation; will generate only if new commits exist.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Note

Docstrings generation - SUCCESS
Generated docstrings for this pull request at #5112

coderabbitai bot added a commit that referenced this pull request Nov 25, 2025
Docstrings generation was requested by @robsonek.

* #5110 (comment)

The following files were modified:

* `usermods/stairway_wipe_basic/stairway_wipe_basic.cpp`
@robsonek
Copy link
Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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