Skip to content

Fix start_scan timeout default value #2287

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

Merged
merged 1 commit into from
Nov 14, 2019
Merged

Conversation

dhalbert
Copy link
Collaborator

This goes with adafruit/Adafruit_CircuitPython_BLE#32.

-- Minor doc fixes
-- Allow None as default value for BLE start_scan timeout.

@dhalbert dhalbert requested a review from tannewt November 14, 2019 02:35
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why didn't this work? It should be mp_const_none so that None can be provided from Python to indicate that there should be no timeout.

@dhalbert
Copy link
Collaborator Author

I changed it from MP_OBJ_NULL to mp_const_none. Originally, if the argument wasn't supplied, it got the default, but if None was supplied as the argument it tried to convert None to a float.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! I was reading the diff backwards. All good! Thanks!

@tannewt tannewt merged commit 4c55431 into adafruit:master Nov 14, 2019
@dhalbert dhalbert deleted the testing-fixes branch November 19, 2019 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants