diff --git a/src/targets/esp32/main/app/ESP32Connectivity.cpp b/src/targets/esp32/main/app/ESP32Connectivity.cpp index 2cdba29c..8d8eb5d3 100644 --- a/src/targets/esp32/main/app/ESP32Connectivity.cpp +++ b/src/targets/esp32/main/app/ESP32Connectivity.cpp @@ -224,8 +224,8 @@ void ESP32Connectivity::handleEvent(esp_event_base_t event_base, uint16_t apCount = 0; memset(scanInfo, 0, sizeof(scanInfo)); - ESP_ERROR_CHECK(esp_wifi_scan_get_ap_records(&number, scanInfo)); ESP_ERROR_CHECK(esp_wifi_scan_get_ap_num(&apCount)); + ESP_ERROR_CHECK(esp_wifi_scan_get_ap_records(&number, scanInfo)); jsonBody["networks"] = nlohmann::json::array();