/* * wifi_manager — STA bring-up with automatic reconnect. * * Never blocks the control loop. wifi_manager_init() returns as soon as the * driver is started; association happens in the background and reconnection * is driven entirely by events. A house with no WiFi still heats — it just * runs on the fallback ladder in control.c. * * Retries back off from 1s to 30s so an outage does not hammer the radio, and * they never stop: the thermostat must recover unattended. */ #pragma once #include #include "esp_err.h" esp_err_t wifi_manager_init(void); bool wifi_manager_is_connected(void); /* * Block until associated or until timeout. Optional — nothing in the control * path calls this. main() uses it only to give the MQTT client a head start * before the display comes up. */ bool wifi_manager_wait_connected(int timeout_ms);