-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for issue #1419 #1441
Fix for issue #1419 #1441
Conversation
…s > 16 bit in ledc embedded_hal::pwm max_duty_cycle function. Fixed division by zero in ledc embedded_hal::pwm set_duty_cycle function and converted to set_duty_hw instead of set_duty to eliminate loss of granularity.
FYI #1442 broke LEDC for ESP32 - not related to this PR |
This looks good overall. Just needs Clippy and RustFmt issues addressed. |
Seems like Clippy isn't happy about an unused import: https://github.com/esp-rs/esp-hal/actions/runs/8707574081/job/23882855215?pr=1441 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM and example seems to be working fine. It needs rebasing and fixing clippy warnings to make CI happy, though :)
Removed unused ChannelIFace import for ehal mod in ledc channel.rs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Submission Checklist 📝
CHANGELOG.md
in the proper section.Extra:
Pull Request Details 📖
Description
Fix for issue #1419. Removed ESP32 specific code for resolutions > 16 bit in ledc embedded_hal::pwm max_duty_cycle function. Fixed division by zero in ledc embedded_hal::pwm set_duty_cycle function and converted to set_duty_hw instead of set_duty to eliminate loss of granularity.
Testing
Wokwi (https://wokwi.com/)