Skip to content

Commit e3c27cd

Browse files
authored
Merge pull request #165 from brentru/fix-esp-bsp-2-0-8
Fix connectErrorString return type for ESP-32 BSP 2.0.8
2 parents a21c9a3 + 88e8569 commit e3c27cd

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Adafruit IO Arduino
2-
version=4.2.3
2+
version=4.2.4
33
author=Adafruit
44
maintainer=Adafruit <[email protected]>
55
sentence=Arduino library to access Adafruit IO.

src/AdafruitIO.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,18 @@ AdafruitIO_Dashboard *AdafruitIO::dashboard(const char *name) {
243243
return new AdafruitIO_Dashboard(this, name);
244244
}
245245

246+
// due to breaking change within Arduino ESP32 BSP v2.0.8
247+
// see: https://github.com/espressif/arduino-esp32/pull/7941
248+
#ifdef ARDUINO_ARCH_ESP32
249+
/**************************************************************************/
250+
/*!
251+
@brief Provide status explanation strings.
252+
@return A pointer to the status string literal, _status. _status is
253+
the AIO status value
254+
*/
255+
/**************************************************************************/
256+
const char *AdafruitIO::statusText() {
257+
#else
246258
/**************************************************************************/
247259
/*!
248260
@brief Provide status explanation strings.
@@ -251,6 +263,7 @@ AdafruitIO_Dashboard *AdafruitIO::dashboard(const char *name) {
251263
*/
252264
/**************************************************************************/
253265
const __FlashStringHelper *AdafruitIO::statusText() {
266+
#endif
254267
switch (_status) {
255268

256269
// CONNECTING

src/AdafruitIO.h

+6
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,13 @@ class AdafruitIO {
8787
AdafruitIO_Dashboard *dashboard(const char *name);
8888
AdafruitIO_Time *time(aio_time_format_t format);
8989

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

9298
aio_status_t status();
9399
/********************************************************************/

0 commit comments

Comments
 (0)