wireless

Fork of GPS by Simon Ford

Files at this revision

API Documentation at this revision

Comitter:
avnisha
Date:
Wed May 22 20:39:44 2013 +0000
Parent:
0:15611c7938a3
Commit message:
wireless

Changed in this revision

GPS.cpp Show annotated file Show diff for this revision Revisions of this file
GPS.h Show annotated file Show diff for this revision Revisions of this file
diff -r 15611c7938a3 -r 2d4a71c6b68a GPS.cpp
--- a/GPS.cpp	Tue Jun 08 14:10:27 2010 +0000
+++ b/GPS.cpp	Wed May 22 20:39:44 2013 +0000
@@ -23,7 +23,7 @@
 #include "GPS.h"
 
 GPS::GPS(PinName tx, PinName rx) : _gps(tx, rx) {
-    _gps.baud(4800);    
+    _gps.baud(9600);    
     longitude = 0.0;
     latitude = 0.0;        
 }
@@ -70,12 +70,14 @@
 
 void GPS::getline() {
     while(_gps.getc() != '$');    // wait for the start of a line
-    for(int i=0; i<256; i++) {
+    for(int i=0; i<1024; i++) {
         msg[i] = _gps.getc();
         if(msg[i] == '\r') {
             msg[i] = 0;
             return;
         }
     }
+    //msg[1023] = 0;
+    //return;
     error("Overflowed message limit");
 }
diff -r 15611c7938a3 -r 2d4a71c6b68a GPS.h
--- a/GPS.h	Tue Jun 08 14:10:27 2010 +0000
+++ b/GPS.h	Wed May 22 20:39:44 2013 +0000
@@ -50,7 +50,7 @@
     void getline();
     
     Serial _gps;
-    char msg[256];
+    char msg[1024];
 
 };