Skip to content

Commit

Permalink
fix: Only set time if the wlan is connected
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
andrewjw authored Aug 10, 2023
1 parent d93839d commit 14c7f6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion micropython/examples/interstate75/75W/clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def sync_time():

redraw_display_if_reqd()

if max_wait > 0:
if wlan.status() == 3:
print("Connected")

try:
Expand Down

0 comments on commit 14c7f6c

Please sign in to comment.