2018 revision to classic DataBus AVC code.

Dependencies:   LSM303DLM Servo SerialGraphicLCD L3G4200D IncrementalEncoder SimpleShell

Revision:
19:0d1728091519
Parent:
18:3f8a8f6e3cc1
Child:
20:043987d06f8d
--- a/main.cpp	Fri Dec 14 00:36:06 2018 +0000
+++ b/main.cpp	Sat Dec 15 21:38:11 2018 +0000
@@ -26,15 +26,18 @@
 DigitalOut led1(LED1);
 DigitalOut led3(LED3);
 
+void read_gps();
+
 void do_gps() {
     RawSerial s(UART1TX, UART1RX, 38400);
     while (1) {
         int c = s.getc();
-        //int c = 'a';
-        ublox.parse(c);
-        led3 = !led3;
+        if (ublox.parse(c)) {
+            led3 = !led3;
+            read_gps();
+        }
     }
-}    
+}
 
 
 /******** SHELL COMMANDS ********/
@@ -90,6 +93,9 @@
     printf("Bootup...\n");
     fflush(stdout);
     
+    do_gps();
+    while(1);
+    
     printf("Loading config...\n");
     config.add("intercept_distance", Config::DOUBLE);
     config.add("waypoint_threshold", Config::DOUBLE);
@@ -135,6 +141,7 @@
 
     printf("Starting gps...\n");
     Thread gpsThread;
+    gpsThread.set_priority(osPriorityHigh);
     gpsThread.start(&do_gps);
     
 /*