glenn20 / micropython

MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems
https://micropython.org
Other
38 stars 9 forks source link

docs: readthedocs.io/en/latest/esp32/quickref.html#webrepl-web-browser-interactive-prompt #16

Closed rohano17 closed 1 year ago

rohano17 commented 1 year ago

In function do_connect appears: <... if not wlan.isconnected(): print('connecting to network...') wlan.connect('ssid', 'key') while not wlan.isconnected(): pass ...> in case the wlan.connect fails, this will run forever (while is true and the body of the block does nothing)

glenn20 commented 1 year ago

Thanks for spotting this - I have updated the example code a little in the docs. However, this was a simple code to illustrate the use of wifi and espnow together. It is beyond the scope of this use case to decide what business logic to use if the wifi fails to connect (reboot and try again, wait forever, proceed with other parts of the application, ...). That would depend on the applications and the needs of the developer.

Apologies for the slow response - I accidentally overlooked the notification of this Issue.