Skip to content

Commit

Permalink
Merge pull request #165 from brentru/fix-esp-bsp-2-0-8
Browse files Browse the repository at this point in the history
Fix connectErrorString return type for ESP-32 BSP 2.0.8
  • Loading branch information
brentru authored Apr 24, 2023
2 parents a21c9a3 + 88e8569 commit e3c27cd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Adafruit IO Arduino
version=4.2.3
version=4.2.4
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=Arduino library to access Adafruit IO.
Expand Down
13 changes: 13 additions & 0 deletions src/AdafruitIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,18 @@ AdafruitIO_Dashboard *AdafruitIO::dashboard(const char *name) {
return new AdafruitIO_Dashboard(this, name);
}

// due to breaking change within Arduino ESP32 BSP v2.0.8
// see: https://github.com/espressif/arduino-esp32/pull/7941
#ifdef ARDUINO_ARCH_ESP32
/**************************************************************************/
/*!
@brief Provide status explanation strings.
@return A pointer to the status string literal, _status. _status is
the AIO status value
*/
/**************************************************************************/
const char *AdafruitIO::statusText() {
#else
/**************************************************************************/
/*!
@brief Provide status explanation strings.
Expand All @@ -251,6 +263,7 @@ AdafruitIO_Dashboard *AdafruitIO::dashboard(const char *name) {
*/
/**************************************************************************/
const __FlashStringHelper *AdafruitIO::statusText() {
#endif
switch (_status) {

// CONNECTING
Expand Down
6 changes: 6 additions & 0 deletions src/AdafruitIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ class AdafruitIO {
AdafruitIO_Dashboard *dashboard(const char *name);
AdafruitIO_Time *time(aio_time_format_t format);

// due to breaking change within Arduino ESP32 BSP v2.0.8
// see: https://github.com/espressif/arduino-esp32/pull/7941
#ifdef ARDUINO_ARCH_ESP32
const char *statusText();
#else
const __FlashStringHelper *statusText();
#endif

aio_status_t status();
/********************************************************************/
Expand Down

0 comments on commit e3c27cd

Please sign in to comment.