Terry Koziniec / Mbed OS SatChat-GPS-test

Dependencies:   USBDevice max32630fthr

Files at this revision

API Documentation at this revision

Comitter:
koziniec
Date:
Sat Jul 01 01:35:47 2017 +0000
Parent:
4:e996385ca6d9
Child:
6:af25f19eb4e6
Commit message:
Every element breaking out nicely on screen.; Both lock and non-lock conditions handled.; :-)

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Jul 01 01:25:05 2017 +0000
+++ b/main.cpp	Sat Jul 01 01:35:47 2017 +0000
@@ -39,7 +39,10 @@
             if ((nmea_sentence[nmea_index-1] == ',')&&(nmea_char == ',')) {
                 nmea_sentence[nmea_index++] = ' ';  //Pad consecutive comma with a space
             }
-            nmea_sentence[nmea_index] = nmea_char;
+            if (nmea_char == '*'){
+                nmea_sentence[nmea_index++] = ',';  //inserting a comma before CS makes handling easier
+            }    
+            nmea_sentence[nmea_index] = nmea_char; //build the sentence
             if (nmea_index > 80) {
                 nmea_index=80;          //Don't overflow buffer
             }