Repository navigation
feat(hydropack): add adaptive LED audio preview - #3712
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughHydroPack now renders a coordinate-mapped addressable-LED prototype with separate center and triangle audio envelopes, calibrated SPL and musical-presence gating, and delayed triangle activation. Supporting geometry configuration, task tracking, and implementation lessons were added. ChangesHydroPack LED prototype
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant AudioProcessor
participant onVibeLevels
participant renderPreview
participant FastLED
AudioProcessor->>onVibeLevels: deliver bass levels
onVibeLevels->>renderPreview: update center and delayed triangle envelopes
renderPreview->>FastLED: write mapped LED colors
FastLED->>FastLED: show LED array
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@examples/hydropack/hydropack.ino`:
- Line 43: Update examples/hydropack/hydropack.ino lines 43-43 by setting
kTriangleLaunchDelayMs to 35, and update lines 88-88 so the associated comment
documents the 35 ms delay instead of 5 ms.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1285941d-fd06-4789-9538-d6faf57cc06d
📒 Files selected for processing (3)
agents/tasks/lessons.mdexamples/hydropack/data/leds-triangles-bar.jsonexamples/hydropack/hydropack.ino
| constexpr uint8_t kCenterStart = 6; | ||
| constexpr uint8_t kRightTriangleStart = 12; | ||
| constexpr uint8_t kPreviewLedCount = 18; | ||
| constexpr uint32_t kTriangleLaunchDelayMs = 5; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Align launch delay with the PR objective.
The PR objective states that loud hits should launch both triangles after 35 ms, but the delay is currently implemented and documented as 5 ms. At the loop's 10 ms rendering pacing (EVERY_N_MILLIS(10)), a 5 ms delay will often just elapse by the very next frame, effectively acting as a 1-frame delay and failing to create a perceptible outward visual launch.
examples/hydropack/hydropack.ino#L43-L43: updatekTriangleLaunchDelayMsto35.examples/hydropack/hydropack.ino#L88-L88: update the comment to reflect the 35 ms delay instead of 5 ms.
📍 Affects 1 file
examples/hydropack/hydropack.ino#L43-L43(this comment)examples/hydropack/hydropack.ino#L88-L88
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@examples/hydropack/hydropack.ino` at line 43, Update
examples/hydropack/hydropack.ino lines 43-43 by setting kTriangleLaunchDelayMs
to 35, and update lines 88-88 so the associated comment documents the 35 ms
delay instead of 5 ms.
Summary\n- replace HydroPack's EL preview primitives with an 18-pixel ordinary-LED < | >\ screenmap\n- use two independent thresholds over the same adaptive Vibe bass input: the sensitive center bar fires first, then a loud hit reaches both triangles after 5 ms\n- quiet input is fully dark; FastLED noise-floor tracking suppresses microphone hiss\n\n## Validation\n- \�ash compile wasm --examples hydropack\n- JSON screenmap contract: 18 mapped LEDs\n- ASCII source check and \git diff --check\n\nThe local WASM preview is running at http://127.0.0.1:59610/.
Summary by CodeRabbit