Sfoglia il codice sorgente

fix: sta模式下,通过代码本地IP没有成功

Wendal Chen 2 anni fa
parent
commit
8c02e1bdf9
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      luatos/components/luat/port/luat_wlan_idf5.c

+ 2 - 2
luatos/components/luat/port/luat_wlan_idf5.c

@@ -529,10 +529,10 @@ int luat_wlan_get_ap_rssi(void) {
 int luat_wlan_get_ap_gateway(char* buff) {
     esp_netif_ip_info_t ipInfo = {0};
     buff[0] = 0x00;
-    if (wifiAP == NULL) {
+    if (wifiSTA == NULL) {
         return 0;
     }
-    int ret = esp_netif_get_ip_info(wifiAP, &ipInfo);
+    int ret = esp_netif_get_ip_info(wifiSTA, &ipInfo);
     if (ret == 0) {
         sprintf(buff, IPSTR, IP2STR(&ipInfo.gw));
     }