Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
brentru committed Apr 21, 2023
1 parent 0e2cdf6 commit 88e8569
Showing 1 changed file with 1 addition and 54 deletions.
55 changes: 1 addition & 54 deletions src/AdafruitIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,59 +254,6 @@ AdafruitIO_Dashboard *AdafruitIO::dashboard(const char *name) {
*/
/**************************************************************************/
const char *AdafruitIO::statusText() {
const char *statusMsg;
switch (_status) {

// CONNECTING
case AIO_IDLE:
statusMsg = "Idle. Waiting for connect to be called...";
break;
case AIO_NET_DISCONNECTED:
statusMsg = "Network disconnected.";
break;
case AIO_DISCONNECTED:
statusMsg = "Disconnected from Adafruit IO.";
break;

// FAILURE
case AIO_NET_CONNECT_FAILED:
statusMsg = "Network connection failed.";
break;
case AIO_CONNECT_FAILED:
statusMsg = "Adafruit IO connection failed.";
break;
case AIO_FINGERPRINT_INVALID:
statusMsg = "Adafruit IO SSL fingerprint verification failed.";
break;
case AIO_AUTH_FAILED:
statusMsg = "Adafruit IO authentication failed.";
break;

// SUCCESS
case AIO_NET_CONNECTED:
statusMsg = "Network connected.";
break;
case AIO_CONNECTED:
statusMsg = "Adafruit IO connected.";
break;
case AIO_CONNECTED_INSECURE:
statusMsg =
"Adafruit IO connected. **THIS CONNECTION IS INSECURE** SSL/TLS "
"not supported for this platform.";
break;
case AIO_FINGERPRINT_UNSUPPORTED:
statusMsg = "Adafruit IO connected over SSL/TLS. Fingerprint verification "
"unsupported.";
break;
case AIO_FINGERPRINT_VALID:
statusMsg = "Adafruit IO connected over SSL/TLS. Fingerprint valid.";
break;
default:
statusMsg = "Unknown status code";
break;
}
return statusMsg;
}
#else
/**************************************************************************/
/*!
Expand All @@ -316,6 +263,7 @@ const char *AdafruitIO::statusText() {
*/
/**************************************************************************/
const __FlashStringHelper *AdafruitIO::statusText() {
#endif
switch (_status) {

// CONNECTING
Expand Down Expand Up @@ -354,7 +302,6 @@ const __FlashStringHelper *AdafruitIO::statusText() {
return F("Unknown status code");
}
}
#endif

/**************************************************************************/
/*!
Expand Down

0 comments on commit 88e8569

Please sign in to comment.