@@ -243,6 +243,71 @@ 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+ const char *statusMsg;
258+ switch (_status) {
259+
260+ // CONNECTING
261+ case AIO_IDLE:
262+ statusMsg = " Idle. Waiting for connect to be called..." ;
263+ break ;
264+ case AIO_NET_DISCONNECTED:
265+ statusMsg = " Network disconnected." ;
266+ break ;
267+ case AIO_DISCONNECTED:
268+ statusMsg = " Disconnected from Adafruit IO." ;
269+ break ;
270+
271+ // FAILURE
272+ case AIO_NET_CONNECT_FAILED:
273+ statusMsg = " Network connection failed." ;
274+ break ;
275+ case AIO_CONNECT_FAILED:
276+ statusMsg = " Adafruit IO connection failed." ;
277+ break ;
278+ case AIO_FINGERPRINT_INVALID:
279+ statusMsg = " Adafruit IO SSL fingerprint verification failed." ;
280+ break ;
281+ case AIO_AUTH_FAILED:
282+ statusMsg = " Adafruit IO authentication failed." ;
283+ break ;
284+
285+ // SUCCESS
286+ case AIO_NET_CONNECTED:
287+ statusMsg = " Network connected." ;
288+ break ;
289+ case AIO_CONNECTED:
290+ statusMsg = " Adafruit IO connected." ;
291+ break ;
292+ case AIO_CONNECTED_INSECURE:
293+ statusMsg =
294+ " Adafruit IO connected. **THIS CONNECTION IS INSECURE** SSL/TLS "
295+ " not supported for this platform." ;
296+ break ;
297+ case AIO_FINGERPRINT_UNSUPPORTED:
298+ statusMsg = " Adafruit IO connected over SSL/TLS. Fingerprint verification "
299+ " unsupported." ;
300+ break ;
301+ case AIO_FINGERPRINT_VALID:
302+ statusMsg = " Adafruit IO connected over SSL/TLS. Fingerprint valid." ;
303+ break ;
304+ default :
305+ statusMsg = " Unknown status code" ;
306+ break ;
307+ }
308+ return statusMsg;
309+ }
310+ #else
246311/* *************************************************************************/
247312/* !
248313 @brief Provide status explanation strings.
@@ -289,6 +354,7 @@ const __FlashStringHelper *AdafruitIO::statusText() {
289354 return F (" Unknown status code" );
290355 }
291356}
357+ #endif
292358
293359/* *************************************************************************/
294360/* !
0 commit comments