From 23834d660c85858e15d8ec654892aa88129f3e73 Mon Sep 17 00:00:00 2001 From: "Adrian A. Baumann" Date: Tue, 21 Apr 2026 23:52:52 +0200 Subject: [PATCH] Reverted a lot of cruft --- gauge.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gauge.py b/gauge.py index c1651b6..6536baa 100644 --- a/gauge.py +++ b/gauge.py @@ -562,7 +562,8 @@ def connect_wifi(ssid, password, timeout_s=15, force_reconnect=False): last_error = None for attempt in range(_WIFI_CONNECT_ATTEMPTS): info(f"WiFi connecting to '{ssid}' (attempt {attempt + 1}/{_WIFI_CONNECT_ATTEMPTS}) ...") - _reset_wifi_interface() + if not _wifi_sta.isconnected(): + _reset_wifi_interface() try: _wifi_sta.connect(ssid, password) deadline = utime.time() + timeout_s