Skip to content

Commit 14c7f6c

Browse files
authored
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.
1 parent d93839d commit 14c7f6c

File tree

1 file changed

+1
-1
lines changed
  • micropython/examples/interstate75/75W

1 file changed

+1
-1
lines changed

micropython/examples/interstate75/75W/clock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def sync_time():
129129

130130
redraw_display_if_reqd()
131131

132-
if max_wait > 0:
132+
if wlan.status() == 3:
133133
print("Connected")
134134

135135
try:

0 commit comments

Comments
 (0)