Skip to content

Commit fd80015

Browse files
FrancMunozsandeepmistry
authored andcommitted
Changed GSM to GSM_OFF
1 parent 14d313e commit fd80015

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/GSM.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ bool GSM::shutdown()
9696

9797
if (MODEM.waitForResponse(40000) == 1) {
9898
MODEM.end();
99-
99+
_state = GSM_OFF;
100100
return true;
101101
}
102102

@@ -106,7 +106,7 @@ bool GSM::shutdown()
106106
bool GSM::secureShutdown()
107107
{
108108
MODEM.end();
109-
109+
_state = GSM_OFF;
110110
return true;
111111
}
112112

@@ -182,7 +182,7 @@ int GSM::ready()
182182
MODEM.send("AT+CMGF=1");
183183
_readyState = READY_STATE_WAIT_SET_PREFERRED_MESSAGE_FORMAT_RESPONSE;
184184
ready = 0;
185-
break;
185+
break;
186186
}
187187

188188
case READY_STATE_WAIT_SET_PREFERRED_MESSAGE_FORMAT_RESPONSE: {
@@ -201,7 +201,7 @@ int GSM::ready()
201201
MODEM.send("AT+UDCONF=1,1");
202202
_readyState = READY_STATE_WAIT_SET_HEX_MODE;
203203
ready = 0;
204-
break;
204+
break;
205205
}
206206

207207
case READY_STATE_WAIT_SET_HEX_MODE: {
@@ -220,9 +220,9 @@ int GSM::ready()
220220
MODEM.send("AT+CTZU=1");
221221
_readyState = READY_STATE_WAIT_SET_AUTOMATIC_TIME_ZONE_RESPONSE;
222222
ready = 0;
223-
break;
223+
break;
224224
}
225-
225+
226226
case READY_STATE_WAIT_SET_AUTOMATIC_TIME_ZONE_RESPONSE: {
227227
if (ready > 1) {
228228
_state = ERROR;
@@ -239,7 +239,7 @@ int GSM::ready()
239239
MODEM.send("AT+UDTMFD=1,2");
240240
_readyState = READY_STATE_WAIT_ENABLE_DTMF_DETECTION_RESPONSE;
241241
ready = 0;
242-
break;
242+
break;
243243
}
244244

245245
case READY_STATE_WAIT_ENABLE_DTMF_DETECTION_RESPONSE: {
@@ -259,7 +259,7 @@ int GSM::ready()
259259
MODEM.send("AT+CREG?");
260260
_readyState = READY_STATE_WAIT_CHECK_REGISTRATION_RESPONSE;
261261
ready = 0;
262-
break;
262+
break;
263263
}
264264

265265
case READY_STATE_WAIT_CHECK_REGISTRATION_RESPONSE: {
@@ -283,7 +283,7 @@ int GSM::ready()
283283
} else if (status == 3) {
284284
_state = ERROR;
285285
ready = 2;
286-
}
286+
}
287287
}
288288

289289
break;

src/GSM.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#include <Arduino.h>
2424

25-
enum GSM3_NetworkStatus_t { ERROR, IDLE, CONNECTING, GSM_READY, GPRS_READY, TRANSPARENT_CONNECTED, OFF};
25+
enum GSM3_NetworkStatus_t { ERROR, IDLE, CONNECTING, GSM_READY, GPRS_READY, TRANSPARENT_CONNECTED, GSM_OFF};
2626

2727
class GSM {
2828

@@ -33,13 +33,13 @@ class GSM {
3333
GSM(bool debug = false);
3434

3535
/** Start the GSM/GPRS modem, attaching to the GSM network
36-
@param pin SIM PIN number (4 digits in a string, example: "1234"). If
36+
@param pin SIM PIN number (4 digits in a string, example: "1234"). If
3737
NULL the SIM has no configured PIN.
3838
@param restart Restart the modem. Default is TRUE. The modem receives
3939
a signal through the Ctrl/D7 pin. If it is shut down, it will
40-
start-up. If it is running, it will restart. Takes up to 10
40+
start-up. If it is running, it will restart. Takes up to 10
4141
seconds
42-
@param synchronous If TRUE the call only returns after the Start is complete
42+
@param synchronous If TRUE the call only returns after the Start is complete
4343
or fails. If FALSE the call will return inmediately. You have
4444
to call repeatedly ready() until you get a result. Default is TRUE.
4545
@return If synchronous, GSM3_NetworkStatus_t. If asynchronous, returns 0.

0 commit comments

Comments
 (0)