Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: GPS MODSERIAL mbed-rtos mbed
Revision 5:3a42b208ac4e, committed 2012-10-08
- Comitter:
- SamClarke
- Date:
- Mon Oct 08 06:32:46 2012 +0000
- Parent:
- 4:0e55a4620f5e
- Child:
- 6:32c25fb48fd2
- Commit message:
- Added an incoming call as another trigger for the SMS notification.; You call, it hangs up and sends you its coordinates :)
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Oct 08 01:16:13 2012 +0000
+++ b/main.cpp Mon Oct 08 06:32:46 2012 +0000
@@ -99,13 +99,14 @@
}
if (strncmp(GPRSbuffer, "$$RING",6) == 0) {
//dump = "fixed";
- GPRS.printf("ATH=0\r\n");
+ GPRS.printf("ATH0\r\n");
wait(1);
+ // Flush any incoming rings in the MODSERIAL buffer
GPRS.rxBufferFlush();
pc.printf("\nCall recieved");
// Do the send SMS routine...
sendSms();
- // Wait for the cascade of \r\nOK\r\n\r\nOK\r\n's from the SMS's to finish
+ // Wait for the cascade of [\r\nOK\r\n][\r\nOK\r\n]'s from the SMS's to finish
wait(4);
// Flush out any left in the serial buffer
GPRS.rxBufferFlush();
@@ -128,6 +129,7 @@
pc.baud(115200);
GPRS.baud(19200);
Thread thread(led_thread);
+ memset(GPRSbuffer, '0', 512);
pc.printf("I'm Alive...\n");
// Setup the GPS
gps.Init();