No more reconnect in main

This commit is contained in:
2026-04-21 20:04:11 +02:00
parent afe70da24d
commit 5a98a3c63b

View File

@@ -30,8 +30,12 @@ from machine import UART
# Activate WiFi driver before any heavy heap allocation so it can claim its
# contiguous DRAM block before the Python heap fragments the address space.
# Only activate if not already running (e.g. boot.py may have started it).
gc.collect()
network.WLAN(network.STA_IF).active(True)
_early_wlan = network.WLAN(network.STA_IF)
if not _early_wlan.active():
_early_wlan.active(True)
del _early_wlan
gc.collect()
# ---------------------------------------------------------------------------