Take advantage of the refactored ANIMartRIX to call the new _base met…#345
Take advantage of the refactored ANIMartRIX to call the new _base met…#345netmindz wants to merge 1 commit intoMoonModules:mdevfrom
Conversation
…hods with varying parameters at runtime
📝 WalkthroughWalkthroughThe PR bumps the animartrix library commit in platformio.ini and consolidates multiple Animartrix usermod animation modes into parameterized variants, adding a local mapping helper and updating effect registrations in the usermod header. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
@netmindz I need to think about how to get the new sliders aligned with extra sliders i've added in #344 🤔
Most of the visual and audio sliders from #344 could also go into segment settings. Otherwise we'd need more sliders for effects
|
|
@coderabbitai please re-review this PR. |
|
🧠 Learnings used✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
usermods/usermod_v2_animartrix/usermod_v2_animartrix.h (1)
208-216: Consider:dir_idxderivation couples direction selection withdist_offset.The current logic derives both
dist_offsetanddir_idxfromcustom1, meaning users cannot independently control the distance offset and direction. If this coupling is intentional for visual consistency between the merged effects, this is fine. Otherwise, consider using a separate checkbox (check1) fordir_idxsimilar to other combined effects.// Current: dir_idx derived from custom1 threshold int dir_idx = (SEGMENT.custom1 < 128) ? 3 : 0; // Alternative: Use check1 for independent control // bool use_dir3 = SEGMENT.check1; // int dir_idx = use_dir3 ? 3 : 0;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@usermods/usermod_v2_animartrix/usermod_v2_animartrix.h` around lines 208 - 216, The dir_idx in mode_Module_Experiment23 is currently derived from SEGMENT.custom1, coupling direction with dist_offset; change it to use an independent control (e.g., SEGMENT.check1) so users can set direction separately: read SEGMENT.check1 into a boolean (or similar) and set dir_idx based on that instead of the custom1 threshold, then call anim.Module_Experiment23_base(speed, dist_offset, dist_scale, dir_idx) as before; update any UI/comment to reflect that dir_idx now comes from check1 rather than custom1.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@usermods/usermod_v2_animartrix/usermod_v2_animartrix.h`:
- Around line 208-216: The dir_idx in mode_Module_Experiment23 is currently
derived from SEGMENT.custom1, coupling direction with dist_offset; change it to
use an independent control (e.g., SEGMENT.check1) so users can set direction
separately: read SEGMENT.check1 into a boolean (or similar) and set dir_idx
based on that instead of the custom1 threshold, then call
anim.Module_Experiment23_base(speed, dist_offset, dist_scale, dir_idx) as
before; update any UI/comment to reflect that dir_idx now comes from check1
rather than custom1.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f867c3e4-96cb-4d7c-ac07-e0db699318fc
📒 Files selected for processing (2)
platformio.iniusermods/usermod_v2_animartrix/usermod_v2_animartrix.h

…hods with varying parameters at runtime
Summary by CodeRabbit