Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Would it be possible to not let autoConnect block the setup? #912

Closed
markg85 opened this issue Jul 13, 2019 · 2 comments
Closed

Would it be possible to not let autoConnect block the setup? #912

markg85 opened this issue Jul 13, 2019 · 2 comments

Comments

@markg85
Copy link

markg85 commented Jul 13, 2019

Hi,

Currently the autoConnect function blocks the setup till it either makes a wifi connection or sets itself up as AP in case it couldn't make a connection.

That on it's own is awesome!

However, i'm now playing with a usecase where i want to fade a light in as soon as the device turns on. That "fading in" is something that's run in the loop function. And that loop function only starts when the setup is done... which autoconnect is blocking... :)

Another thing i want to do is pulsate the light while a wifi connection is being made. Those are 2 reason why having it blocking it really inconvenient.

I could.... use interrupts and work around it that way, but that feels a bit hacky.

So therefore i'm wondering if it would be possible to make autoconnect non blocking?

An approach that i can think of would be to let WiFiManager know that i want to use auto connect (say with a new function: setAutoconnect(true)). Then have another new function like loop() or handle() that should be placed in the main loop function to handle the wifi connection as it's made.

Just curious...

Cheers,
Mark

@tablatronix
Copy link
Collaborator

#379
#818

Development branch

#500

@markg85
Copy link
Author

markg85 commented Jul 13, 2019

Ha, that's awesome!
I am hesitant to upgrade to the dev branch, but i think i'm going to give it a shot now. As with this it already has 3 features that i requested before...

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants