Conversation
New rm32::system::SystemTick provides tick_input() and tick_main() that both harness.rs and firmware main.rs call. Eliminates the harness-vs-firmware divergence that caused repeated regressions. SystemTick owns InputState (previously duplicated). The ISR tick still runs separately (inline in harness, actual ISR on hardware).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughIntroduces a unified Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a unified system tick mechanism by adding a new SystemTick struct in rm32/src/system.rs. This change centralizes the input processing and main-loop execution logic, ensuring that both the firmware and the test harness use the same control pipeline. The InputState is now owned by SystemTick, and the harness and firmware have been updated to call tick_input and tick_main respectively. These changes effectively eliminate logic divergence between the simulation and the actual hardware execution. I have no feedback to provide.
New rm32::system::SystemTick provides tick_input() and tick_main() that both harness.rs and firmware main.rs call. Eliminates the harness-vs-firmware divergence that caused repeated regressions.
SystemTick owns InputState (previously duplicated). The ISR tick still runs separately (inline in harness, actual ISR on hardware).
Summary by Sourcery
Unify the main-loop system tick between the firmware and harness by introducing a shared SystemTick entry point used in both binaries.
New Features:
Enhancements:
Summary by CodeRabbit