Works

Dependencies:   BMP180 BNO055_fusion Fonts GPSISR HTU21D SDFileSystem UniGraphic mbed uGUI

Fork of Bicycl_Computer_NUCLEO-F411RE by Darren Ulrich

Revision:
9:855884782f67
Parent:
8:8aa9cdab4a07
Child:
10:a3cb458d7b1c
--- a/main.cpp	Fri Feb 10 17:58:22 2017 +0000
+++ b/main.cpp	Thu Feb 16 23:56:02 2017 +0000
@@ -28,7 +28,7 @@
 #include "BMP180.h"
 #include "SDFileSystem.h"
 #include "GPSISR.h"
-#include "nmea.h"
+
 
 #include "Arial12x12.h"
 #include "Arial24x23.h"
@@ -99,9 +99,9 @@
 // SD Card Reader On Adafruit GPS Shield
 SDFileSystem sd(PIN_MOSI_SPI3, PIN_MISO_SPI3, PIN_SCLK_SPI3, PIN_CS_SPI3, "sd"); // the pinout on the mbed Cool Components workshop board
 
-// Adafruit GPS Shield
+// Set up serial interrupe service handler for gps characters.
 GPS MyGPS(PIN_TX_GPS,PIN_RX_GPS, 9600);
-NMEA nmea;
+
 
 int page = 0 ;
 int numPage = 2 ;
@@ -243,11 +243,8 @@
    
 int main()
 {
-    //MyGPS._gps.attach(&MyGPS,&GPS::Rx_interrupt, Serial::RxIrq);
-    //GPS myGPS(PIN_TX_GPS,PIN_RX_GPS);
     Timer refresh_Timer; //sets up a timer for use in loop; how often do we print GPS info?
-    const int refresh_Time = 100; //refresh time in ms
-    
+    const int refresh_Time = 1000; //refresh time in ms
     refresh_Timer.start();  //starts the clock on the timer
     TFT.BusEnable(true) ;
     //backlight = 0 ;
@@ -262,7 +259,16 @@
             //pc.printf("Time: %f\n", myGPS.time);
             //MyGPS.getline();
             //pc.printf("%s", MyGPS.msg[0]);
-            pc.printf("rx_int: %c ", MyGPS.rx_in);
+            pc.printf("rx_int: %c \n", MyGPS.rx_in);
+            
+            if (MyGPS.isdatardy()) {
+                pc.printf("NMEA has valid data");
+                pc.printf("Sats : %d \n", MyGPS.getSats());
+            }
+            else {
+                 pc.printf("NMEA has no valid data");
+            }     
+                
             TFT.set_font((unsigned char*) Arial12x12);
             TFT.foreground(Blue);
             TFT.locate(2, 2);