Skip to content

Revert "Fix connectErrorString return type for ESP-32 BSP 2.0.8" #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Adafruit_MQTT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 1 addition & 9 deletions Adafruit_MQTT.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,19 +166,11 @@ class Adafruit_MQTT {
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();
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Adafruit MQTT Library
version=2.5.3
version=2.5.2
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=MQTT library that supports the FONA, ESP8266, ESP32, Yun, and generic Arduino Client hardware.
Expand Down