Prototyping the Adaptable Emergency System on an C027 board.

Dependencies:   C027_Support mbed

Fork of c027_prototyping by Philémon Favrod

Revision:
17:726bbc1b73ee
Parent:
16:2b2f2a3bde5a
--- a/gps_locate.cpp	Wed Oct 01 08:47:54 2014 +0000
+++ b/gps_locate.cpp	Sun Oct 05 12:38:04 2014 +0000
@@ -1,17 +1,7 @@
 #include "gps_locate.h"
 #include "GPS.h"
 
-int gps_on(void)
-{
-    return 0;
-}
-
-int gps_off(void)
-{
-    return 0;
-}
-
-int gps_locate(struct gps_data_t* gps_data)
+int gps_locate(struct gps_data_t* gps_data, int timeout)
 {
     printf("GPS Location begins\r\n");
     
@@ -28,7 +18,7 @@
     char buf[512] = {0};
     while(!coord_ok || !altitude_ok || !speed_ok) {
         
-        if(timer.read() > 20) {
+        if(timer.read() > timeout) {
             printf("GPS Location TimeOut, abort...\r\n");
             timer.stop();
             return 0;