Add method to detect if any button is pressed.#10
Conversation
📝 WalkthroughWalkthroughA new public ChangesInputManager iAnyPressed Method
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 `@libs/hardware/InputManager/include/InputManager.h`:
- Around line 24-29: The header declares bool iAnyPressed() const but the API
and naming convention use is* (e.g., isPressed) and callers expect
isAnyPressed(); rename the method declaration from iAnyPressed() to
isAnyPressed() in InputManager (update the function prototype in
InputManager.h), then update the corresponding implementation (e.g.,
InputManager::iAnyPressed -> InputManager::isAnyPressed) and any call sites or
tests that reference iAnyPressed so they use isAnyPressed instead.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 85f2824e-f992-4e8b-aa1b-d21814c58267
📒 Files selected for processing (2)
libs/hardware/InputManager/include/InputManager.hlibs/hardware/InputManager/src/InputManager.cpp
📜 Review details
🔇 Additional comments (1)
libs/hardware/InputManager/src/InputManager.cpp (1)
123-125: Method naming issue already noted in declaration.This implementation should be renamed in lockstep with the header (
iAnyPressed→isAnyPressed).
Summary
Add additional isAnyPressed() to detect if any button is being pressed (X4)
Modified InputManager
Additional Context
Wanted to add some functionality to input management in CrossPoint, and noticed this can help. And already have wasAnyPressed() and wasAnyReleased().
AI Usage
While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.
Did you use AI tools to help write this code? NO