-
Notifications
You must be signed in to change notification settings - Fork 7.6k
WiFi.begin "aligned with Arduino.cc". blocking (breaking change) #9063
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
Conversation
beginTimeout property used in begin with waitForConnectResult with beginTimeout 0 begin is async. default beginTimeot is a minute
👋 Hello JAndrassy, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
I do not agree with this. Not to mention how many projects will be unnecessarily broken by such change. Why cater to the 0.01% of people who might be still using the old and outdated WiFi shields? |
I agree, but there was something about desire to be aligned with Arduino.cc: #8930 (comment) |
Only if it makes sense and will not otherwise cause issues. Changing the behavior in such drastic way on something that has been used for a decade at this point, especially something as critical as |
protected: | ||
static bool _useStaticIp; | ||
static bool _autoReconnect; | ||
static wifi_auth_mode_t _minSecurity; | ||
static wifi_scan_method_t _scanMethod; | ||
static wifi_sort_method_t _sortMethod; | ||
unsigned long beginTimeout = 60000; |
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.
1 minute timeout is absolutely unusable.
10% of it might be something to consider, but a default timeout of 60 seconds is hardly every usable in the world of microcontrollers.
As was already mentioned, a default of 0 would be at least non-breaking, but then you explicitly need to set the timeout and if you would change your code to do so, then you probably already have a similar loop right after the call to WiFi.begin()
Imho not every bad incomplete Arduino code should be implemented. Arduino code is not the holey gral and everything else than perfect. |
change
WiFi.begin
to blocking to be "aligned with Arduino.cc".PR adds
beginTimeout
property used inbegin
withwaitForConnectResult
with
beginTimeout
0begin
is async.default
beginTimeout
is a minute as inwaitForConnectResult