We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8933f6 commit 8596ac1Copy full SHA for 8596ac1
Sim800L.cpp
@@ -481,11 +481,13 @@ bool Sim800L::sendSms(char* number,char* text)
481
this->SoftwareSerial::print((char)26);
482
_buffer=_readSerial(60000);
483
//expect CMGS:xxx , where xxx is a number,for the sending sms.
484
- if ( (_buffer.indexOf("ER")) == -1)
485
- {
+ if ((_buffer.indexOf("ER")) != -1) {
+ return true;
486
+ } else if ((_buffer.indexOf("CMGS")) != -1) {
487
return false;
- }
488
- else return true;
+ } else {
489
490
+ }
491
// Error found, return 1
492
// Error NOT found, return 0
493
}
0 commit comments