Resolve an unset data_bitrate to no operation in slcan. by dcasnowdon · Pull Request #1978 · hardbyte/python-can
Summary of Changes
- Fix the default setting for data_bitrate when it is not set.
Related Issues / Pull Requests
Type of Change
- Bug fix
- New feature
- Documentation update
- Refactoring
- Other (please describe):
Checklist
- I have followed the contribution guide.
- I have added or updated tests as appropriate.
- I have added or updated documentation as appropriate.
- I have added a news fragment for towncrier.
- All checks and tests pass (
tox).
Additional Notes
Tested on canable 2.0 hardware locally (in addition to the unit tests).
Hi, thank you for the fix. But I'd prefer the function signature as it is, so instead you could change the _DATA_BITRATES value to None: ""
Hi, thank you for the fix. But I'd prefer the function signature as it is, so instead you could change the
_DATA_BITRATESvalue toNone: ""
I wasn't sure whether 0 might be passed in as a no-op. Is it OK to change the interface in this way? Instead, I've changed it to add an explicit check for None in the body of the method. I can change the value in the _DATA_BITRATES table if you'd prefer.
dcasnowdon
changed the title
Change the default to 0, which is a no-op for data_bitrate.
Resolve an unset data_bitrate to no operation in slcan.
Yes, looks good now. Could you add a little bit more information to the news fragment? I'll create a patch release afterwards
Yes, looks good now. Could you add a little bit more information to the news fragment? I'll create a patch release afterwards
I have added a little more detail (is this what you'd like?), and I've changed it to be a fix, rather than added.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 👍
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