fix: Only set time if the wlan is connected

Previously, if we dropped out of the wlan loop early because of an error (wlan.status() < 0) it would still print "Connected", and try to set the time.
pull/813/head
Andrew Wilkinson 2023-08-10 15:58:52 +01:00 zatwierdzone przez GitHub
rodzic d93839d56a
commit 14c7f6c9c8
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -129,7 +129,7 @@ def sync_time():
redraw_display_if_reqd()
if max_wait > 0:
if wlan.status() == 3:
print("Connected")
try: