Repository navigation
Allow external PWM motor channels without native GPIO - #81
Open
dhairyajangir wants to merge 1 commit into
Open
dhairyajangir wants to merge 1 commit into
dhairyajangir wants to merge 1 commit into
Conversation
Author
|
Build CI passes on AI assisted with the review and this update. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use the existing PWM typing fallback when Blinka reports that a board's optional PWM backend is missing. Let the stepper import when only the optional GPIO type is unavailable. Native type hints still resolve when the backends are available, and unrelated runtime errors still propagate.
Thanks to CameronBrooks11 for the forced-board reproduction and fallback diagnosis in #80.
Verification
Tested forced Raspberry Pi 4 and Pi 5 with Blinka 9.2.0 and 10.1.0. The patched driver passed DC motor, servo, and both stepper pin-mode checks against mock pins on all four configurations. Also verified native annotation resolution and the unsupported-PWM and unexpected-error paths.
With adafruit/Adafruit_CircuitPython_BusDevice#105 applied, the same four configurations also drove the DC motor and servo through the actual PCA9685 Python driver on a simulated I²C bus.
Fixes #80.
AI assistance was used for the patch and verification.