Skip to content

Conversation

@SentiQ
Copy link

@SentiQ SentiQ commented Nov 11, 2025

  1. Added a new option to the UI to activate the first and last segment as a sentinel segment - if activated both segments will stay active with the configured opacity

  2. Fixed the swipe off direction so that the swipe always goes off to the direction of the last triggered sensor.

Summary by CodeRabbit

  • New Features

    • Per-stair sentinel support: enable/disable sentinel segments and set dim opacity for first/last steps.
  • Improvements

    • Sentinel segments stay fully visible during swipe interactions and are forced to full brightness when sentinel support is disabled.
    • More reliable swipe on/off detection and sensor handling for smoother transitions.
    • Sentinel settings are persisted and applied immediately.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

Adds per-stair sentinel support to Animated_Staircase: two new config fields (enabledSentinel, sentinelDimOpacity), sentinel-aware opacity rules and swipe handling, adjusted sensor logic, enable/disable behavior changes, and persistence/readback for the new settings.

Changes

Cohort / File(s) Change Summary
Animated Staircase core
usermods/Animated_Staircase/Animated_Staircase.cpp
Introduces enabledSentinel (bool) and sentinelDimOpacity (unsigned int) plus PROGMEM config key strings (_enabledSentinel, _sentinelDimOpacity); computes firstSegId/lastSegId; enforces full opacity on sentinel segments during swipes and optionally dims them to sentinelDimOpacity when idle; adjusts swipe logic (lastSensor derived from bottomSensorRead, inverted for OFF swipes); on disable forces first/last segments to 255 then triggers full refresh/state propagation; persists and reads new settings via addToConfig/readFromConfig/readFromJsonState; minor guards for inactive first/last segments and hygiene tweaks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review updateSegments sentinel detection and in-swipe vs idle opacity branching.
  • Verify lastSensor derivation from bottomSensorRead and inversion for OFF swipes.
  • Check enable/disable flow that forces sentinel opacity and triggers refresh/state propagation.
  • Validate config/JSON keys (_enabledSentinel, _sentinelDimOpacity) handling and that updateSegments is invoked on config changes.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% 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 summarizes the two main changes: adding a sentinel option and fixing the off swipe direction.
✨ 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 e1ea61e and 23e53ad.

📒 Files selected for processing (1)
  • usermods/Animated_Staircase/Animated_Staircase.cpp (11 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-09-12T17:29:43.826Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4923
File: wled00/FX.cpp:4883-4901
Timestamp: 2025-09-12T17:29:43.826Z
Learning: In WLED’s web UI, only one slider value (e.g., SEGMENT.intensity or SEGMENT.custom1) changes at a time; code relying on this may use simplified change guards, though presets/JSON can still update multiple fields atomically.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-06-07T15:58:42.579Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4712
File: wled00/FX_fcn.cpp:992-993
Timestamp: 2025-06-07T15:58:42.579Z
Learning: In WLED segments, the backing pixel buffer is always allocated to the full physical segment size, but effect rendering only uses a subset when mirror or grouping are enabled. For 2D segments, this subset is vWidth() * vHeight(), and for 1D segments it's vLength(). Color processing operations like fade_out should iterate over this rendering subset, not the full allocated buffer.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-04-24T09:31:06.879Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4658
File: wled00/led.cpp:90-91
Timestamp: 2025-04-24T09:31:06.879Z
Learning: In the WLED codebase, the `getSegment()` function guards against out-of-bounds segment IDs, and `getFirstSelectedSegId()` falls back to `getMainSegmentId()` if no segments are selected, ensuring no crashes when used through the `setValuesFromFirstSelectedSeg()` macro.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-04-24T09:31:06.879Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4658
File: wled00/led.cpp:90-91
Timestamp: 2025-04-24T09:31:06.879Z
Learning: In the WLED codebase, the `getSegment()` function guards against out-of-bounds segment IDs by falling back to the main segment ID, and `getFirstSelectedSegId()` falls back to `getMainSegmentId()` if no segments are selected, ensuring no crashes when used through the `setValuesFromFirstSelectedSeg()` macro.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-10-20T09:41:50.374Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4995
File: wled00/FX.cpp:5209-5212
Timestamp: 2025-10-20T09:41:50.374Z
Learning: In WLED 2D effects, SEGMENT.length() returns the physical pixel count (upper bound), while SEG_W * SEG_H can be smaller depending on mapping (mirroring/grouping). For per-cell state buffers (e.g., mode_2Dgameoflife in wled00/FX.cpp), allocate using SEGMENT.length() to ensure sufficient capacity and avoid reallocations, while bounding indexing by cols*rows.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-09-02T19:42:57.475Z
Learnt from: freakintoddles2
Repo: wled/WLED PR: 4904
File: wled00/FX.cpp:3915-3930
Timestamp: 2025-09-02T19:42:57.475Z
Learning: WLED wled00/FX.cpp::mode_percent — For time-based options (% of Minute/Hour/Day), behavior is clock-like: at rollover (elapsed==0) intentionally show SEGLEN lit for one tick to represent completion, then move to 1 LED at the next second. This is by design (not a progress bar) and should not be “fixed”.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
🔇 Additional comments (5)
usermods/Animated_Staircase/Animated_Staircase.cpp (5)

28-29: LGTM: Sentinel configuration fields.

The new enabledSentinel and sentinelDimOpacity fields are well-defined with sensible defaults.

Also applies to: 96-97


208-211: LGTM: Clear lastSensor tracking logic.

The direct mapping of lastSensor = bottomSensorRead with the explanatory comment makes the sensor direction logic easy to follow.


324-336: LGTM: Proper sentinel cleanup on disable.

The disable logic correctly resets first and last segment opacity to 255, cleaning up any sentinel dimming while preserving the opacity of middle segments that weren't modified by the usermod.


478-479: LGTM: Complete config persistence for sentinel feature.

The configuration handling for sentinel fields follows the established patterns correctly:

  • Proper read/write to JSON
  • Validation of opacity range
  • Change detection and conditional updates
  • Version detection via field presence check

Also applies to: 495-497, 529-532, 555-555, 558-558


599-600: LGTM: Standard PROGMEM config key definitions.

The sentinel config key definitions follow the established pattern and use appropriate kebab-case naming for JSON keys.


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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd933ff and a56985a.

📒 Files selected for processing (1)
  • usermods/Animated_Staircase/Animated_Staircase.cpp (11 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: DedeHai
Repo: wled/WLED PR: 4923
File: wled00/FX.cpp:4883-4901
Timestamp: 2025-09-12T17:29:43.826Z
Learning: In WLED’s web UI, only one slider value (e.g., SEGMENT.intensity or SEGMENT.custom1) changes at a time; code relying on this may use simplified change guards, though presets/JSON can still update multiple fields atomically.
📚 Learning: 2025-06-07T15:58:42.579Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4712
File: wled00/FX_fcn.cpp:992-993
Timestamp: 2025-06-07T15:58:42.579Z
Learning: In WLED segments, the backing pixel buffer is always allocated to the full physical segment size, but effect rendering only uses a subset when mirror or grouping are enabled. For 2D segments, this subset is vWidth() * vHeight(), and for 1D segments it's vLength(). Color processing operations like fade_out should iterate over this rendering subset, not the full allocated buffer.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-04-24T09:31:06.879Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4658
File: wled00/led.cpp:90-91
Timestamp: 2025-04-24T09:31:06.879Z
Learning: In the WLED codebase, the `getSegment()` function guards against out-of-bounds segment IDs, and `getFirstSelectedSegId()` falls back to `getMainSegmentId()` if no segments are selected, ensuring no crashes when used through the `setValuesFromFirstSelectedSeg()` macro.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-04-24T09:31:06.879Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4658
File: wled00/led.cpp:90-91
Timestamp: 2025-04-24T09:31:06.879Z
Learning: In the WLED codebase, the `getSegment()` function guards against out-of-bounds segment IDs by falling back to the main segment ID, and `getFirstSelectedSegId()` falls back to `getMainSegmentId()` if no segments are selected, ensuring no crashes when used through the `setValuesFromFirstSelectedSeg()` macro.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-10-20T09:41:50.374Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4995
File: wled00/FX.cpp:5209-5212
Timestamp: 2025-10-20T09:41:50.374Z
Learning: In WLED 2D effects, SEGMENT.length() returns the physical pixel count (upper bound), while SEG_W * SEG_H can be smaller depending on mapping (mirroring/grouping). For per-cell state buffers (e.g., mode_2Dgameoflife in wled00/FX.cpp), allocate using SEGMENT.length() to ensure sufficient capacity and avoid reallocations, while bounding indexing by cols*rows.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-09-12T17:29:43.826Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4923
File: wled00/FX.cpp:4883-4901
Timestamp: 2025-09-12T17:29:43.826Z
Learning: In WLED’s web UI, only one slider value (e.g., SEGMENT.intensity or SEGMENT.custom1) changes at a time; code relying on this may use simplified change guards, though presets/JSON can still update multiple fields atomically.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-09-02T19:42:57.475Z
Learnt from: freakintoddles2
Repo: wled/WLED PR: 4904
File: wled00/FX.cpp:3915-3930
Timestamp: 2025-09-02T19:42:57.475Z
Learning: WLED wled00/FX.cpp::mode_percent — For time-based options (% of Minute/Hour/Day), behavior is clock-like: at rollover (elapsed==0) intentionally show SEGLEN lit for one tick to represent completion, then move to 1 LED at the next second. This is by design (not a progress bar) and should not be “fixed”.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp

@SentiQ SentiQ closed this Nov 11, 2025
@SentiQ SentiQ reopened this Nov 11, 2025
@SentiQ SentiQ closed this Nov 11, 2025
@SentiQ SentiQ reopened this Nov 12, 2025
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: 0

♻️ Duplicate comments (1)
usermods/Animated_Staircase/Animated_Staircase.cpp (1)

242-244: OFF swipe direction is still inverted.

The negation in swipe = !lastSensor inverts the swipe direction relative to the last triggered sensor. Based on the comment at lines 208-211:

  • lastSensor == true means bottom sensor triggered (should swipe UP on OFF)
  • lastSensor == false means top sensor triggered (should swipe DOWN on OFF)

But the negation produces the opposite behavior.

Apply this diff to fix the inversion:

-    // Swipe OFF in the direction of the last sensor detection
-    swipe = !lastSensor;
+    // Swipe OFF in the direction of the last sensor detection
+    swipe = lastSensor;

Or for explicit clarity:

-    // Swipe OFF in the direction of the last sensor detection
-    swipe = !lastSensor;
+    // Swipe OFF in the direction of the last sensor detection
+    swipe = lastSensor ? SWIPE_UP : SWIPE_DOWN;
🧹 Nitpick comments (1)
usermods/Animated_Staircase/Animated_Staircase.cpp (1)

28-29: Sentinel configuration fields look good.

The new fields are properly initialized with sensible defaults. Consider adding validation in readFromConfig to clamp sentinelDimOpacity to the valid range [0, 255] for clarity, though the current behavior (allowing 0 to disable dimmed sentinels) may be intentional.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a56985a and 4324cb2.

📒 Files selected for processing (1)
  • usermods/Animated_Staircase/Animated_Staircase.cpp (11 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-06-07T15:58:42.579Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4712
File: wled00/FX_fcn.cpp:992-993
Timestamp: 2025-06-07T15:58:42.579Z
Learning: In WLED segments, the backing pixel buffer is always allocated to the full physical segment size, but effect rendering only uses a subset when mirror or grouping are enabled. For 2D segments, this subset is vWidth() * vHeight(), and for 1D segments it's vLength(). Color processing operations like fade_out should iterate over this rendering subset, not the full allocated buffer.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-04-24T09:31:06.879Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4658
File: wled00/led.cpp:90-91
Timestamp: 2025-04-24T09:31:06.879Z
Learning: In the WLED codebase, the `getSegment()` function guards against out-of-bounds segment IDs, and `getFirstSelectedSegId()` falls back to `getMainSegmentId()` if no segments are selected, ensuring no crashes when used through the `setValuesFromFirstSelectedSeg()` macro.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-04-24T09:31:06.879Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4658
File: wled00/led.cpp:90-91
Timestamp: 2025-04-24T09:31:06.879Z
Learning: In the WLED codebase, the `getSegment()` function guards against out-of-bounds segment IDs by falling back to the main segment ID, and `getFirstSelectedSegId()` falls back to `getMainSegmentId()` if no segments are selected, ensuring no crashes when used through the `setValuesFromFirstSelectedSeg()` macro.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-10-20T09:41:50.374Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4995
File: wled00/FX.cpp:5209-5212
Timestamp: 2025-10-20T09:41:50.374Z
Learning: In WLED 2D effects, SEGMENT.length() returns the physical pixel count (upper bound), while SEG_W * SEG_H can be smaller depending on mapping (mirroring/grouping). For per-cell state buffers (e.g., mode_2Dgameoflife in wled00/FX.cpp), allocate using SEGMENT.length() to ensure sufficient capacity and avoid reallocations, while bounding indexing by cols*rows.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-09-12T17:29:43.826Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4923
File: wled00/FX.cpp:4883-4901
Timestamp: 2025-09-12T17:29:43.826Z
Learning: In WLED’s web UI, only one slider value (e.g., SEGMENT.intensity or SEGMENT.custom1) changes at a time; code relying on this may use simplified change guards, though presets/JSON can still update multiple fields atomically.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-09-02T19:42:57.475Z
Learnt from: freakintoddles2
Repo: wled/WLED PR: 4904
File: wled00/FX.cpp:3915-3930
Timestamp: 2025-09-02T19:42:57.475Z
Learning: WLED wled00/FX.cpp::mode_percent — For time-based options (% of Minute/Hour/Day), behavior is clock-like: at rollover (elapsed==0) intentionally show SEGLEN lit for one tick to represent completion, then move to 1 LED at the next second. This is by design (not a progress bar) and should not be “fixed”.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
🔇 Additional comments (5)
usermods/Animated_Staircase/Animated_Staircase.cpp (5)

110-136: Sentinel segment logic is well-implemented.

The sentinel feature correctly identifies first and last segments, keeps them active when sentinel mode is enabled, and properly manages opacity transitions:

  • Sentinel segments are fully lit (255) when part of the active swipe
  • Sentinel segments are dimmed (sentinelDimOpacity) when outside the swipe range
  • Non-sentinel segments behave as before

208-212: Sensor tracking update is correct.

Recording lastSensor unconditionally (regardless of on state) ensures the OFF swipe can follow the last triggered sensor direction. The comment clearly documents the mapping.


324-336: Sentinel restoration logic on disable is correct.

When disabling the usermod, the code properly restores first and last segment opacity to full brightness (255), ensuring a clean state. The segment ID calculation is consistent with updateSegments(), and defensive checks for active segments prevent errors.


478-479: Configuration persistence is properly implemented.

The sentinel settings are correctly persisted to/from config with appropriate change detection. Calling updateSegments() when sentinel configuration changes (line 555) efficiently applies the new settings without requiring a full setup() cycle.

Also applies to: 529-531, 554-558


599-600: PROGMEM string declarations are appropriate.

The new config keys follow the established pattern of storing strings in PROGMEM to conserve RAM, consistent with the rest of the codebase.

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

♻️ Duplicate comments (1)
usermods/Animated_Staircase/Animated_Staircase.cpp (1)

242-244: OFF swipe direction is inverted.

The past review comment correctly identified this issue: swipe = !lastSensor inverts the swipe direction. When the bottom sensor was the last triggered (lastSensor == true), the code sets swipe = false (SWIPE_DOWN), but it should swipe UP to match the direction of the last sensor.

Apply this fix:

-    // Swipe OFF in the direction of the last sensor detection
-    swipe = !lastSensor;
+    // Swipe OFF in the direction of the last sensor detection
+    swipe = lastSensor;
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4324cb2 and e1ea61e.

📒 Files selected for processing (1)
  • usermods/Animated_Staircase/Animated_Staircase.cpp (11 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-09-12T17:29:43.826Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4923
File: wled00/FX.cpp:4883-4901
Timestamp: 2025-09-12T17:29:43.826Z
Learning: In WLED’s web UI, only one slider value (e.g., SEGMENT.intensity or SEGMENT.custom1) changes at a time; code relying on this may use simplified change guards, though presets/JSON can still update multiple fields atomically.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-06-07T15:58:42.579Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4712
File: wled00/FX_fcn.cpp:992-993
Timestamp: 2025-06-07T15:58:42.579Z
Learning: In WLED segments, the backing pixel buffer is always allocated to the full physical segment size, but effect rendering only uses a subset when mirror or grouping are enabled. For 2D segments, this subset is vWidth() * vHeight(), and for 1D segments it's vLength(). Color processing operations like fade_out should iterate over this rendering subset, not the full allocated buffer.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-04-24T09:31:06.879Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4658
File: wled00/led.cpp:90-91
Timestamp: 2025-04-24T09:31:06.879Z
Learning: In the WLED codebase, the `getSegment()` function guards against out-of-bounds segment IDs, and `getFirstSelectedSegId()` falls back to `getMainSegmentId()` if no segments are selected, ensuring no crashes when used through the `setValuesFromFirstSelectedSeg()` macro.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-04-24T09:31:06.879Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4658
File: wled00/led.cpp:90-91
Timestamp: 2025-04-24T09:31:06.879Z
Learning: In the WLED codebase, the `getSegment()` function guards against out-of-bounds segment IDs by falling back to the main segment ID, and `getFirstSelectedSegId()` falls back to `getMainSegmentId()` if no segments are selected, ensuring no crashes when used through the `setValuesFromFirstSelectedSeg()` macro.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-10-20T09:41:50.374Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4995
File: wled00/FX.cpp:5209-5212
Timestamp: 2025-10-20T09:41:50.374Z
Learning: In WLED 2D effects, SEGMENT.length() returns the physical pixel count (upper bound), while SEG_W * SEG_H can be smaller depending on mapping (mirroring/grouping). For per-cell state buffers (e.g., mode_2Dgameoflife in wled00/FX.cpp), allocate using SEGMENT.length() to ensure sufficient capacity and avoid reallocations, while bounding indexing by cols*rows.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
📚 Learning: 2025-09-02T19:42:57.475Z
Learnt from: freakintoddles2
Repo: wled/WLED PR: 4904
File: wled00/FX.cpp:3915-3930
Timestamp: 2025-09-02T19:42:57.475Z
Learning: WLED wled00/FX.cpp::mode_percent — For time-based options (% of Minute/Hour/Day), behavior is clock-like: at rollover (elapsed==0) intentionally show SEGLEN lit for one tick to represent completion, then move to 1 LED at the next second. This is by design (not a progress bar) and should not be “fixed”.

Applied to files:

  • usermods/Animated_Staircase/Animated_Staircase.cpp
🔇 Additional comments (5)
usermods/Animated_Staircase/Animated_Staircase.cpp (5)

28-29: LGTM!

The new configuration variables for the sentinel feature are well-defined with sensible defaults.


208-211: LGTM!

The mapping of lastSensor from bottomSensorRead is clearly documented and logically sound for tracking which sensor triggered last.


324-336: LGTM!

The disable path correctly restores sentinel segments to full opacity with proper active-segment guards.


478-479: LGTM!

Configuration persistence follows WLED conventions correctly, with proper change detection and segment updates only after initialization.

Also applies to: 529-532, 554-554, 557-557


96-97: LGTM!

The new configuration string declarations follow the established PROGMEM pattern for flash memory optimization.

Also applies to: 598-599

@DedeHai DedeHai requested a review from blazoncek November 16, 2025 19:21
@DedeHai
Copy link
Collaborator

DedeHai commented Nov 16, 2025

@realrolfje any comments on this?

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.

2 participants