| 437 | } |
| 438 | |
| 439 | static void dispatchAutoConnect(std::shared_ptr<Wifi> wifi) { |
| 440 | LOGGER.info("dispatchAutoConnect()"); |
| 441 | |
| 442 | settings::WifiApSettings settings; |
| 443 | if (find_auto_connect_ap(wifi, settings)) { |
| 444 | LOGGER.info("Auto-connecting to {}", settings.ssid); |
| 445 | connect(settings, false); |
| 446 | // TODO: We currently have to manually reset it because connect() sets it. |
| 447 | // connect() assumes it's only being called by the user and not internally, so it disables auto-connect |
| 448 | wifi->pause_auto_connect = false; |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | static void eventHandler(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) { |
| 453 | auto wifi = wifi_singleton; |
no test coverage detected