1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 16:25:50 +00:00

[wifi] Conditionally compile manual_ip to save 24-72 bytes RAM (#11833)

This commit is contained in:
J. Nick Koston
2025-11-11 17:27:08 -06:00
committed by GitHub
parent 572fae5c7d
commit 79a4444928
9 changed files with 93 additions and 1 deletions

View File

@@ -282,9 +282,15 @@ bool WiFiComponent::wifi_sta_connect_(const WiFiAP &ap) {
return false;
}
#ifdef USE_WIFI_MANUAL_IP
if (!this->wifi_sta_ip_config_(ap.get_manual_ip())) {
return false;
}
#else
if (!this->wifi_sta_ip_config_({})) {
return false;
}
#endif
// setup enterprise authentication if required
#ifdef USE_WIFI_WPA2_EAP
@@ -832,10 +838,17 @@ bool WiFiComponent::wifi_start_ap_(const WiFiAP &ap) {
return false;
}
#ifdef USE_WIFI_MANUAL_IP
if (!this->wifi_ap_ip_config_(ap.get_manual_ip())) {
ESP_LOGV(TAG, "wifi_ap_ip_config_ failed");
return false;
}
#else
if (!this->wifi_ap_ip_config_({})) {
ESP_LOGV(TAG, "wifi_ap_ip_config_ failed");
return false;
}
#endif
return true;
}