-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add option to disable automatic connecting to open Wifis #10
base: master
Are you sure you want to change the base?
Conversation
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.
good idea, just 2 minor nitpicks.
wifimgr.py
Outdated
@@ -6,6 +6,7 @@ | |||
ap_ssid = "WifiManager" | |||
ap_password = "tayfunulu" | |||
ap_authmode = 3 # WPA2 | |||
connectToOpenWifis = False |
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.
please stay with the style you see (e.g. 1 line above).
so, no javaLikeCamelCase, but rather python_style for variable names.
wifimgr.py
Outdated
@@ -48,7 +49,8 @@ def get_connection(): | |||
else: | |||
print("skipping unknown encrypted network") | |||
else: # open | |||
connected = do_connect(ssid, None) | |||
if connectToOpenWifis: | |||
connected = do_connect(ssid, None) |
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.
the else
and the if
can be merged to elif ...:
.
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.
lgtm.
This allows the user to decide if the ESP should connect to open WiFis or not.