Skip to content
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

allow radio.enabled to be settable #3791

Merged
merged 2 commits into from
Dec 4, 2020
Merged

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Dec 4, 2020

Fixes #3790

Tested by inserting:

import wifi
wifi.radio.enabled = False
wifi.radio.enabled = True

into a program that imported MagTag, before it tried to connect.

@dhalbert
Copy link
Collaborator Author

dhalbert commented Dec 4, 2020

The alarm sleep code already calls this internally to shut down the radio.

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.

Thanks for adding this! You should probably add a comment saying that any open sockets will be closed when disabled.

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.

Thank you!

@tannewt
Copy link
Member

tannewt commented Dec 4, 2020

All failures were transient and I don't believe they would have broken.

@tannewt tannewt merged commit a7ec4a0 into adafruit:main Dec 4, 2020
@dhalbert dhalbert deleted the radio-set-enabled branch December 4, 2020 18:41
@makermelissa
Copy link
Collaborator

Thanks Dan and Scott.

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.

wifi.radio.enabled is not settable
3 participants