From 14c7f6c9c80442c82341aa674420075e0662c216 Mon Sep 17 00:00:00 2001 From: Andrew Wilkinson Date: Thu, 10 Aug 2023 15:58:52 +0100 Subject: [PATCH] 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. --- micropython/examples/interstate75/75W/clock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micropython/examples/interstate75/75W/clock.py b/micropython/examples/interstate75/75W/clock.py index c227393a..54032179 100644 --- a/micropython/examples/interstate75/75W/clock.py +++ b/micropython/examples/interstate75/75W/clock.py @@ -129,7 +129,7 @@ def sync_time(): redraw_display_if_reqd() - if max_wait > 0: + if wlan.status() == 3: print("Connected") try: