Guillermo Stedile / GPS

Dependents:   RA8875

Fork of GPS by SNOCC

Revision:
2:5b9cb7910a4b
Parent:
1:1de2fc75bf38
Child:
3:f9327dc1cc11
diff -r 1de2fc75bf38 -r 5b9cb7910a4b GPS.cpp
--- a/GPS.cpp	Sun Dec 04 20:14:00 2016 +0000
+++ b/GPS.cpp	Sun Mar 19 20:59:38 2017 +0000
@@ -22,13 +22,14 @@
  
 #include "GPS.h"
 
-GPS::GPS(PinName tx, PinName rx) : _gps(tx, rx) {
+GPS::GPS(PinName tx, PinName rx) : _gps(tx, rx) {   // En PinNames.h (https://developer.mbed.org/users/screamer/code/mbed/file/667d61c9177b/PinNames.h) se define: typedef enum PinName PinName;
     _gps.baud(9600);                                // Cambio baudrate a 9600
     longitude = 0.0;
     latitude = 0.0; 
        
 }
 
+
 int GPS::sample() {
     float time;
     char ns, ew, signal;  // Agrego signal para parsear el campo NMEA que indica es estado de señal.
@@ -142,4 +143,16 @@
         }
     }
     error("Overflowed message limit");
-}
+} 
+
+/*void GPS::getline() {
+    if(_gps.getc() != '$') return;    // exit if there isn't start of a line
+    for(int i=0; i<256; i++) {
+        msg[i] = _gps.getc();
+        if(msg[i] == '\r') {
+            msg[i] = 0;
+            return;
+        }
+    }
+    error("Overflowed message limit");
+}*/
\ No newline at end of file