fix: make SimpleRotary double-press backspace reliable#405
fix: make SimpleRotary double-press backspace reliable#405
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
|
Memory usage change @ 2f114dd
Click for full report table
Click for full report CSV |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/input/SimpleRotaryAdapter.h`:
- Around line 18-22: The comment hardcodes "500ms" but the actual minimum is
computed from SIMPLE_ROTARY_BUTTON_DEBOUNCE_DELAY; update the documentation in
SimpleRotaryAdapter.h to avoid the magic number and instead reference the
computed minimum (e.g., "the minimum is computed from
SIMPLE_ROTARY_BUTTON_DEBOUNCE_DELAY") and/or show the expression used to compute
it so the comment remains correct if SIMPLE_ROTARY_BUTTON_DEBOUNCE_DELAY is
changed.
🪄 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: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 72281e3b-874a-44d6-a0c3-9fb1ebc77767
📒 Files selected for processing (4)
examples/ButtonWithRotaryAdapter/ButtonWithRotaryAdapter.inoexamples/InputRotary/InputRotary.inoexamples/SimpleRotary/SimpleRotary.inosrc/input/SimpleRotaryAdapter.h
Summary
SimpleRotaryAdapteruse an effective double-press threshold that is reliable with SimpleRotary's 200ms button sampling.DOUBLE_PRESS_THRESHOLD=0behavior for disabling double-press, while clamping positive values below the minimum to avoid missed BACKSPACE actions.Testing
pio ci -b esp32dev -l . -O platform=espressif32 -O framework=arduino -O $'lib_deps=\nmarcoschwartz/LiquidCrystal_I2C@^1.1.4\narduino-libraries/LiquidCrystal@^1.0.7\nmprograms/SimpleRotary@^1.1.3\nmadleech/Button@^1.0.0' examples/InputRotary/InputRotary.inopio ci -b esp32dev -l . -O platform=espressif32 -O framework=arduino -O $'lib_deps=\nmarcoschwartz/LiquidCrystal_I2C@^1.1.4\narduino-libraries/LiquidCrystal@^1.0.7\nmprograms/SimpleRotary@^1.1.3\nmadleech/Button@^1.0.0' examples/SimpleRotary/SimpleRotary.inopio ci -b esp32dev -l . -O platform=espressif32 -O framework=arduino -O $'lib_deps=\nmarcoschwartz/LiquidCrystal_I2C@^1.1.4\narduino-libraries/LiquidCrystal@^1.0.7\nmprograms/SimpleRotary@^1.1.3\nmadleech/Button@^1.0.0' examples/ButtonWithRotaryAdapter/ButtonWithRotaryAdapter.inoIssue
Summary by CodeRabbit
Documentation
Bug Fixes
DOUBLE_PRESS_THRESHOLDto 0.