From 5347ee2ae4fb45e55b53e54a04ca90b82073e828 Mon Sep 17 00:00:00 2001 From: Tomas Dubec Date: Mon, 25 Nov 2024 13:12:19 +0100 Subject: [PATCH] enable MQTT with TLS on RPi picow (#5442) Co-authored-by: Ben Meadors --- src/mqtt/MQTT.cpp | 2 +- src/mqtt/MQTT.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index 967b7ba500..967db04d61 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -345,7 +345,7 @@ void MQTT::reconnect() mqttPassword = moduleConfig.mqtt.password; } #if HAS_WIFI && !defined(ARCH_PORTDUINO) -#if !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(RPI_PICO) +#if !defined(CONFIG_IDF_TARGET_ESP32C6) if (moduleConfig.mqtt.tls_enabled) { // change default for encrypted to 8883 try { diff --git a/src/mqtt/MQTT.h b/src/mqtt/MQTT.h index fcefb94a2c..7e0378238d 100644 --- a/src/mqtt/MQTT.h +++ b/src/mqtt/MQTT.h @@ -35,7 +35,7 @@ class MQTT : private concurrency::OSThread #if HAS_WIFI WiFiClient mqttClient; #if !defined(ARCH_PORTDUINO) -#if defined(ESP_ARDUINO_VERSION_MAJOR) && ESP_ARDUINO_VERSION_MAJOR < 3 +#if (defined(ESP_ARDUINO_VERSION_MAJOR) && ESP_ARDUINO_VERSION_MAJOR < 3) || defined(RPI_PICO) WiFiClientSecure wifiSecureClient; #endif #endif @@ -130,4 +130,4 @@ class MQTT : private concurrency::OSThread void mqttInit(); -extern MQTT *mqtt; \ No newline at end of file +extern MQTT *mqtt;