Revised Embedded Artists' MTK3339 library to save all raw GPS messages and enable optional decoding of RMC message.

Fork of MTK3339 by EmbeddedArtists AB

Files at this revision

API Documentation at this revision

Comitter:
tbronez
Date:
Sun Aug 23 21:48:48 2015 +0000
Parent:
2:2391d165df47
Child:
4:c9861b0d3219
Commit message:
Removed LED2 flashing used for debugging. See DEBUG comments.

Changed in this revision

MTK3339.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MTK3339.cpp	Sat Aug 01 02:56:26 2015 +0000
+++ b/MTK3339.cpp	Sun Aug 23 21:48:48 2015 +0000
@@ -1,11 +1,13 @@
 // Class to represent serial interface to MTK3339 GPS chip
 // Original author: Embedded Artists
-// Revised by T. Bronez, 2015-07-31
+// Revised by T. Bronez, 2015-08-23
 
 #include "mbed.h"
 #include "MTK3339.h"
 #define min(a,b) a>b?a:b 
 
+/*
+// For DEBUG, can flash LED2 on arrival of RMC message
 DigitalOut led2(LED2);
 Timeout timeout2;
 void led2Off() {
@@ -15,6 +17,7 @@
     led2 = 0;
     timeout2.attach(&led2Off, 0.1);
 }
+*/
 
 MTK3339::MTK3339(PinName tx, PinName rx) : _serial(tx, rx) {
     _serial.baud(9600);    
@@ -263,7 +266,7 @@
 
         // Save appropriate sentence for later decoding   
         if (strncmp("$GPRMC", data, 6) == 0 && (_sentenceMask & NMEA_RMC) != 0) {
-            flashLED2();
+            //flashLED2();    // for DEBUG
             saveRMC(data, len);
             _availDataType = NMEA_RMC;
             _dataCallback.call();