Now by hand...
This commit is contained in:
12
gauge.py
12
gauge.py
@@ -543,11 +543,11 @@ def _reset_wifi_interface():
|
|||||||
if not _wifi_sta.active():
|
if not _wifi_sta.active():
|
||||||
_wifi_sta.active(True)
|
_wifi_sta.active(True)
|
||||||
utime.sleep_ms(500)
|
utime.sleep_ms(500)
|
||||||
try:
|
else:
|
||||||
_wifi_sta.disconnect()
|
_wifi_sta.active(False)
|
||||||
except Exception:
|
utime.sleep_ms(200)
|
||||||
pass
|
_wifi_sta.active(True)
|
||||||
utime.sleep_ms(1000)
|
utime.sleep_ms(200)
|
||||||
|
|
||||||
|
|
||||||
def connect_wifi(ssid, password, timeout_s=15, force_reconnect=False):
|
def connect_wifi(ssid, password, timeout_s=15, force_reconnect=False):
|
||||||
@@ -1321,7 +1321,7 @@ def main():
|
|||||||
info("=" * 48)
|
info("=" * 48)
|
||||||
|
|
||||||
gc.collect()
|
gc.collect()
|
||||||
connect_wifi(WIFI_SSID, WIFI_PASSWORD, force_reconnect=False)
|
connect_wifi(WIFI_SSID, WIFI_PASSWORD, force_reconnect=True)
|
||||||
|
|
||||||
mqtt_attempts = 0
|
mqtt_attempts = 0
|
||||||
while True:
|
while True:
|
||||||
|
|||||||
Reference in New Issue
Block a user