-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for new sms notification & AT+CMGR command
- Loading branch information
1 parent
1dd2dab
commit c3ee176
Showing
7 changed files
with
182 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "Events.hpp" | ||
#include <string.h> | ||
#include <cstdio> | ||
|
||
Sim800IncomingSMSEvent::Sim800IncomingSMSEvent(const char *memory, uint8_t index): index(index) | ||
{ | ||
strlcpy(this->memory, memory, sizeof(this->memory)); | ||
} | ||
|
||
bool Sim800IncomingSMSEvent::parseCMTI(Sim800IncomingSMSEvent *dest, const String &CMTI) | ||
{ | ||
int memPos = CMTI.indexOf("+CMTI:"); | ||
if (memPos < 0) { | ||
return false; | ||
} | ||
return sscanf(CMTI.c_str() + memPos, "+CMTI: \"%[^\"]\",%hhu", dest->memory, &dest->index) == 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters