kopia lustrzana https://github.com/tayfunulu/WiFiManager
rename check_connection -> get_connection
rodzic
3ae68033e6
commit
b68f6560b9
2
main.py
2
main.py
|
@ -1,7 +1,7 @@
|
||||||
import networkconfig
|
import networkconfig
|
||||||
|
|
||||||
|
|
||||||
wlan = networkconfig.check_connection()
|
wlan = networkconfig.get_connection()
|
||||||
if wlan is None:
|
if wlan is None:
|
||||||
print("Could not initialize the network connection.")
|
print("Could not initialize the network connection.")
|
||||||
while True:
|
while True:
|
||||||
|
|
|
@ -16,7 +16,8 @@ wlan_sta = network.WLAN(network.STA_IF)
|
||||||
server_socket = None
|
server_socket = None
|
||||||
|
|
||||||
|
|
||||||
def check_connection():
|
def get_connection():
|
||||||
|
"""return a working WLAN(STA_IF) instance or None"""
|
||||||
global wlan_sta
|
global wlan_sta
|
||||||
|
|
||||||
# First check if there already is any connection:
|
# First check if there already is any connection:
|
||||||
|
|
Ładowanie…
Reference in New Issue