Adafruit Ultimate GPS Arduino library adapted for mBed use. Original found at https://github.com/adafruit/Adafruit-GPS-Library.

Files at this revision

API Documentation at this revision

Comitter:
fconboy
Date:
Fri Aug 30 16:40:25 2019 +0000
Parent:
0:a23e3099bb0a
Commit message:
...

Changed in this revision

MBed_Adafruit_GPS.cpp Show annotated file Show diff for this revision Revisions of this file
MBed_Adafruit_GPS.h Show annotated file Show diff for this revision Revisions of this file
diff -r a23e3099bb0a -r ee33cff24740 MBed_Adafruit_GPS.cpp
--- a/MBed_Adafruit_GPS.cpp	Sat Mar 22 05:00:47 2014 +0000
+++ b/MBed_Adafruit_GPS.cpp	Fri Aug 30 16:40:25 2019 +0000
@@ -167,7 +167,7 @@
     if(!gpsSerial->readable()) return c;
     c = gpsSerial->getc();
 
-  //Serial.print(c);
+  //print(c);
 
   if (c == '$') {
     currentline[lineidx] = 0;
@@ -347,4 +347,10 @@
   else {
       return false;  // Returns false if not in standby mode, nothing to wakeup
   }
+}
+
+bool Adafruit_GPS::hasFix(void)
+{
+    return fix;    
+
 }
\ No newline at end of file
diff -r a23e3099bb0a -r ee33cff24740 MBed_Adafruit_GPS.h
--- a/MBed_Adafruit_GPS.h	Sat Mar 22 05:00:47 2014 +0000
+++ b/MBed_Adafruit_GPS.h	Fri Aug 30 16:40:25 2019 +0000
@@ -35,7 +35,7 @@
 #define PMTK_SET_BAUD_9600 "$PMTK251,9600*17"
 
 // turn on only the second sentence (GPRMC)
-#define PMTK_SET_NMEA_OUTPUT_RMCONLY "$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29"
+#define PMTK_SET_NMEA_OUTPUT_RMCONLY "$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n"
 // turn on GPRMC and GGA
 #define PMTK_SET_NMEA_OUTPUT_RMCGGA "$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28"
 // turn on ALL THE DATA
@@ -91,6 +91,7 @@
 
   bool wakeup(void);
   bool standby(void);
+  bool hasFix(void);
 
   uint8_t hour, minute, seconds, year, month, day;
   uint16_t milliseconds;