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: C027_Support mbed
Fork of c027_prototyping by
Revision 15:41e3e4613e34, committed 2014-09-30
- Comitter:
- aroulin
- Date:
- Tue Sep 30 18:43:42 2014 +0000
- Parent:
- 14:d1f114749b3c
- Parent:
- 13:3c1f0b8c1d21
- Child:
- 16:2b2f2a3bde5a
- Commit message:
- Solve conflicts
Changed in this revision
--- a/gps_locate.cpp Tue Sep 30 18:40:54 2014 +0000
+++ b/gps_locate.cpp Tue Sep 30 18:43:42 2014 +0000
@@ -20,7 +20,7 @@
int ret = 0;
char buf[512] = {0};
- while(!coord_ok || !altitude_ok || !speed_ok) {
+ while(!coord_ok || !altitude_ok || !speed_ok) {;
while ((ret = gps.getMessage(buf, sizeof(buf))) > 0) {
int len = LENGTH(ret);
if ((PROTOCOL(ret) == GPSParser::NMEA) && (len > 6)) {
--- a/main.cpp Tue Sep 30 18:40:54 2014 +0000
+++ b/main.cpp Tue Sep 30 18:43:42 2014 +0000
@@ -11,6 +11,7 @@
MDMSerial mdm;
init_sms_features(&mdm);
+
struct sms_data_t sms;
sms.phone_num = "+41774084185";
sms.msg_buf = "Je suis une carte u-blox. Tu veux etre mon ami ?";
@@ -21,6 +22,7 @@
char buf2[256];
sms.phone_num = buf1;
sms.msg_buf = buf2;
+
while(!read_sms(&sms));
printf("Received sms from %s:\n%s\n", sms.phone_num, sms.msg_buf);
printf("End");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp.orig Tue Sep 30 18:43:42 2014 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "gps_locate.h"
+#include "sms_lib.h"
+#include "MDM.h"
+
+int main() {
+ printf("Hello here is the position: ");
+ struct gps_data_t gps_data;
+ gps_locate(&gps_data);
+ printf("https://maps.google.com/?q=%.5f,%.5f\n", gps_data.la, gps_data.lo);
+
+ MDMSerial mdm;
+ init_sms_features(&mdm);
+ struct sms_data_t sms;
+ sms.phone_num = "+41774084185";
+ sms.msg_buf = "Je suis une carte u-blox. Tu veux etre mon ami ?";
+ printf("Now I will send a SMS\n");
+ send_sms(&sms);
+
+ char buf1[32];
+ char buf2[256];
+ sms.phone_num = buf1;
+ sms.msg_buf = buf2;
+ while(!read_sms(&sms));
+ printf("Received sms from %s:\n%s\n", sms.phone_num, sms.msg_buf);
+ printf("End");
+ return 0;
+}
\ No newline at end of file
