Skip to content

Commit e3cb66e

Browse files
author
brentru
committed
add disconnect method to fona
1 parent a5f380e commit e3cb66e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/AdafruitIO_FONA.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ class AdafruitIO_FONA : public AdafruitIO {
123123

124124
_status = AIO_NET_DISCONNECTED;
125125
}
126+
127+
/**************************************************************************/
128+
/*!
129+
@brief Disconnects from Adafruit IO and the cellular network.
130+
*/
131+
/**************************************************************************/
132+
void _disconnect() {
133+
if (!_fona->enableGPRS(false)) {
134+
AIO_DEBUG_PRINTLN("Failed to turn off GPRS.");
135+
}
136+
_status = AIO_NET_DISCONNECTED;
137+
}
126138
};
127139

128140
#endif // ADAFRUITIO_FONA_H

0 commit comments

Comments
 (0)