From e9a6c12184e491dec741aa4798f07ba1882fb86c Mon Sep 17 00:00:00 2001 From: Brent Rubell Date: Thu, 4 May 2023 14:26:19 -0400 Subject: [PATCH] Revert "Fix connectErrorString return type for ESP-32 BSP 2.0.8" --- Adafruit_MQTT.cpp | 4 ---- Adafruit_MQTT.h | 10 +--------- library.properties | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Adafruit_MQTT.cpp b/Adafruit_MQTT.cpp index c31d0c1..da50bce 100644 --- a/Adafruit_MQTT.cpp +++ b/Adafruit_MQTT.cpp @@ -327,11 +327,7 @@ uint16_t Adafruit_MQTT::readFullPacket(uint8_t *buffer, uint16_t maxsize, return ((pbuff - buffer) + rlen); } -#ifdef ARDUINO_ARCH_ESP32 -const char *Adafruit_MQTT::connectErrorString(int8_t code) { -#else const __FlashStringHelper *Adafruit_MQTT::connectErrorString(int8_t code) { -#endif switch (code) { case 1: return F( diff --git a/Adafruit_MQTT.h b/Adafruit_MQTT.h index f0257f1..01b373b 100644 --- a/Adafruit_MQTT.h +++ b/Adafruit_MQTT.h @@ -166,19 +166,11 @@ public: int8_t connect(); int8_t connect(const char *user, const char *pass); -#ifdef ARDUINO_ARCH_ESP32 - // Returns a printable string version of the error code returned by - // connect(). Preprocessor due to breaking change within - // Arduino ESP32 BSP v2.0.8 - // see: https://github.com/espressif/arduino-esp32/pull/7941 - const char *connectErrorString(int8_t code); -#else - // Returns a printable string version of the error code returned by + // Return a printable string version of the error code returned by // connect(). This returns a __FlashStringHelper*, which points to a // string stored in flash, but can be directly passed to e.g. // Serial.println without any further processing. const __FlashStringHelper *connectErrorString(int8_t code); -#endif; // Sends MQTT disconnect packet and calls disconnectServer() bool disconnect(); diff --git a/library.properties b/library.properties index 2bd2907..a2dbe7a 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit MQTT Library -version=2.5.3 +version=2.5.2 author=Adafruit maintainer=Adafruit sentence=MQTT library that supports the FONA, ESP8266, ESP32, Yun, and generic Arduino Client hardware.