First stab at ESP32-C6 support for TLora-C6

This commit is contained in:
Thomas Göttgens
2024-09-12 22:42:10 +02:00
parent 85d722232e
commit 6ffdc9875b
19 changed files with 150 additions and 40 deletions

View File

@@ -325,6 +325,7 @@ void MQTT::reconnect()
mqttPassword = moduleConfig.mqtt.password;
}
#if HAS_WIFI && !defined(ARCH_PORTDUINO)
#ifndef CONFIG_IDF_TARGET_ESP32C6
if (moduleConfig.mqtt.tls_enabled) {
// change default for encrypted to 8883
try {
@@ -340,6 +341,9 @@ void MQTT::reconnect()
LOG_INFO("Using non-TLS-encrypted session\n");
pubSub.setClient(mqttClient);
}
#else
pubSub.setClient(mqttClient);
#endif
#elif HAS_NETWORKING
pubSub.setClient(mqttClient);
#endif

View File

@@ -9,9 +9,11 @@
#if HAS_WIFI
#include <WiFiClient.h>
#if !defined(ARCH_PORTDUINO)
#if defined(ESP_ARDUINO_VERSION_MAJOR) && ESP_ARDUINO_VERSION_MAJOR < 3
#include <WiFiClientSecure.h>
#endif
#endif
#endif
#if HAS_ETHERNET
#include <EthernetClient.h>
#endif
@@ -33,9 +35,11 @@ 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
WiFiClientSecure wifiSecureClient;
#endif
#endif
#endif
#if HAS_ETHERNET
EthernetClient mqttClient;
#endif