Bump arduino pico and update wifi methods (#4144)

This commit is contained in:
Jesse Hills 2022-12-05 08:55:38 +13:00 committed by GitHub
parent b63ade298f
commit f28f712827
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 9 deletions

View file

@ -56,7 +56,7 @@ def _format_framework_arduino_version(ver: cv.Version) -> str:
# The default/recommended arduino framework version
# - https://github.com/earlephilhower/arduino-pico/releases
# - 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
# - https://github.com/platformio/platform-raspberrypi/releases
@ -67,8 +67,8 @@ ARDUINO_PLATFORM_VERSION = cv.Version(1, 7, 0)
def _arduino_check_versions(value):
value = value.copy()
lookups = {
"dev": (cv.Version(2, 6, 2), "https://github.com/earlephilhower/arduino-pico"),
"latest": (cv.Version(2, 6, 2), None),
"dev": (cv.Version(2, 6, 4), "https://github.com/earlephilhower/arduino-pico"),
"latest": (cv.Version(2, 6, 4), None),
"recommended": (RECOMMENDED_ARDUINO_FRAMEWORK_VERSION, None),
}

View file

@ -156,7 +156,7 @@ bool WiFiComponent::wifi_disconnect_() {
int err = cyw43_wifi_leave(&cyw43_state, CYW43_ITF_STA);
return err == 0;
}
// NOTE: The driver does not provide an interface to get this
bssid_t WiFiComponent::wifi_bssid() {
bssid_t bssid{};
uint8_t raw_bssid[6];
@ -165,12 +165,10 @@ bssid_t WiFiComponent::wifi_bssid() {
bssid[i] = raw_bssid[i];
return bssid;
}
// NOTE: The driver does not provide an interface to get this
std::string WiFiComponent::wifi_ssid() { return WiFi.SSID(); }
// NOTE: The driver does not provide an interface to get this
std::string WiFiComponent::wifi_ssid() { return WiFi.SSID().c_str(); }
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 0; }
int32_t WiFiComponent::wifi_channel_() { return WiFi.channel(); }
network::IPAddress WiFiComponent::wifi_sta_ip() { return {WiFi.localIP()}; }
network::IPAddress WiFiComponent::wifi_subnet_mask_() { return {WiFi.subnetMask()}; }
network::IPAddress WiFiComponent::wifi_gateway_ip_() { return {WiFi.gatewayIP()}; }