mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 16:38:16 +01:00
Bump arduino pico and update wifi methods (#4144)
This commit is contained in:
parent
b63ade298f
commit
f28f712827
2 changed files with 7 additions and 9 deletions
|
@ -56,7 +56,7 @@ def _format_framework_arduino_version(ver: cv.Version) -> str:
|
||||||
# The default/recommended arduino framework version
|
# The default/recommended arduino framework version
|
||||||
# - https://github.com/earlephilhower/arduino-pico/releases
|
# - https://github.com/earlephilhower/arduino-pico/releases
|
||||||
# - https://api.registry.platformio.org/v3/packages/earlephilhower/tool/framework-arduinopico
|
# - https://api.registry.platformio.org/v3/packages/earlephilhower/tool/framework-arduinopico
|
||||||
RECOMMENDED_ARDUINO_FRAMEWORK_VERSION = cv.Version(2, 6, 2)
|
RECOMMENDED_ARDUINO_FRAMEWORK_VERSION = cv.Version(2, 6, 4)
|
||||||
|
|
||||||
# The platformio/raspberrypi version to use for arduino frameworks
|
# The platformio/raspberrypi version to use for arduino frameworks
|
||||||
# - https://github.com/platformio/platform-raspberrypi/releases
|
# - https://github.com/platformio/platform-raspberrypi/releases
|
||||||
|
@ -67,8 +67,8 @@ ARDUINO_PLATFORM_VERSION = cv.Version(1, 7, 0)
|
||||||
def _arduino_check_versions(value):
|
def _arduino_check_versions(value):
|
||||||
value = value.copy()
|
value = value.copy()
|
||||||
lookups = {
|
lookups = {
|
||||||
"dev": (cv.Version(2, 6, 2), "https://github.com/earlephilhower/arduino-pico"),
|
"dev": (cv.Version(2, 6, 4), "https://github.com/earlephilhower/arduino-pico"),
|
||||||
"latest": (cv.Version(2, 6, 2), None),
|
"latest": (cv.Version(2, 6, 4), None),
|
||||||
"recommended": (RECOMMENDED_ARDUINO_FRAMEWORK_VERSION, None),
|
"recommended": (RECOMMENDED_ARDUINO_FRAMEWORK_VERSION, None),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,7 @@ bool WiFiComponent::wifi_disconnect_() {
|
||||||
int err = cyw43_wifi_leave(&cyw43_state, CYW43_ITF_STA);
|
int err = cyw43_wifi_leave(&cyw43_state, CYW43_ITF_STA);
|
||||||
return err == 0;
|
return err == 0;
|
||||||
}
|
}
|
||||||
// NOTE: The driver does not provide an interface to get this
|
|
||||||
bssid_t WiFiComponent::wifi_bssid() {
|
bssid_t WiFiComponent::wifi_bssid() {
|
||||||
bssid_t bssid{};
|
bssid_t bssid{};
|
||||||
uint8_t raw_bssid[6];
|
uint8_t raw_bssid[6];
|
||||||
|
@ -165,12 +165,10 @@ bssid_t WiFiComponent::wifi_bssid() {
|
||||||
bssid[i] = raw_bssid[i];
|
bssid[i] = raw_bssid[i];
|
||||||
return bssid;
|
return bssid;
|
||||||
}
|
}
|
||||||
// NOTE: The driver does not provide an interface to get this
|
std::string WiFiComponent::wifi_ssid() { return WiFi.SSID().c_str(); }
|
||||||
std::string WiFiComponent::wifi_ssid() { return WiFi.SSID(); }
|
|
||||||
// NOTE: The driver does not provide an interface to get this
|
|
||||||
int8_t WiFiComponent::wifi_rssi() { return WiFi.RSSI(); }
|
int8_t WiFiComponent::wifi_rssi() { return WiFi.RSSI(); }
|
||||||
// NOTE: The driver does not provide an interface to get this
|
int32_t WiFiComponent::wifi_channel_() { return WiFi.channel(); }
|
||||||
int32_t WiFiComponent::wifi_channel_() { return 0; }
|
|
||||||
network::IPAddress WiFiComponent::wifi_sta_ip() { return {WiFi.localIP()}; }
|
network::IPAddress WiFiComponent::wifi_sta_ip() { return {WiFi.localIP()}; }
|
||||||
network::IPAddress WiFiComponent::wifi_subnet_mask_() { return {WiFi.subnetMask()}; }
|
network::IPAddress WiFiComponent::wifi_subnet_mask_() { return {WiFi.subnetMask()}; }
|
||||||
network::IPAddress WiFiComponent::wifi_gateway_ip_() { return {WiFi.gatewayIP()}; }
|
network::IPAddress WiFiComponent::wifi_gateway_ip_() { return {WiFi.gatewayIP()}; }
|
||||||
|
|
Loading…
Reference in a new issue