Skip to content

Commit

Permalink
Merge pull request #135 from brentru/fix-fona-disconnect-err
Browse files Browse the repository at this point in the history
Add _disconnect function to AdafruitIO_FONA.h
  • Loading branch information
brentru authored Sep 23, 2020
2 parents a5f380e + fc40d71 commit 926a4ff
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/AdafruitIO_FONA.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,18 @@ class AdafruitIO_FONA : public AdafruitIO {

_status = AIO_NET_DISCONNECTED;
}

/**************************************************************************/
/*!
@brief Disconnects from Adafruit IO and the cellular network.
*/
/**************************************************************************/
void _disconnect() {
if (!_fona->enableGPRS(false)) {
AIO_DEBUG_PRINTLN("Failed to turn off GPRS.");
}
_status = AIO_NET_DISCONNECTED;
}
};

#endif // ADAFRUITIO_FONA_H

0 comments on commit 926a4ff

Please sign in to comment.