this version has all of Jim's fixes for reading the GPS and IMU data synchronously

Dependencies:   MODSERIAL SDFileSystem mbed SDShell CRC CommHandler FP LinkedList LogUtil

Files at this revision

API Documentation at this revision

Comitter:
jekain314
Date:
Fri May 03 23:13:19 2013 +0000
Parent:
2:7039be3daf6e
Child:
4:dda2ab5cc643
Commit message:
added WMsg to front of startup messages cause these are expected by the PC connection procedures.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri May 03 19:27:56 2013 +0000
+++ b/main.cpp	Fri May 03 23:13:19 2013 +0000
@@ -96,7 +96,7 @@
     toPC.printf("\n\n released GPS from RESET and set to high baud rate \n\n");
     
     //just wait to launch the GPS receiver
-    for (int i=0; i<5; i++) { toPC.printf(" to start: %3d \n", 4-i); wait(1); }
+    for (int i=0; i<5; i++) { toPC.printf("WMsg start: %3d \n", 4-i); wait(1); }
 
     sd_detect.mode(PullUp);
     
@@ -140,16 +140,16 @@
     //originally planned to use this to command the IMU data
     //char ch8[] = "FREQUENCYOUT enable 10000 1000000";
     
-    toPC.printf("set serial config \n");
+    toPC.printf("WMsg set serial config \n");
     sendASCII(ch7, sizeof(ch7)); wait_ms(500);
     //sendASCII(ch0, sizeof(ch0));  
-    toPC.printf("unlog all messages \n");
+    toPC.printf("WMsg unlog all messages \n");
     sendASCII(ch1, sizeof(ch1)); wait_ms(500);
-    toPC.printf("log BESTPOSB on COM1 \n");
+    toPC.printf("WMsg log BESTPOSB on COM1 \n");
     sendASCII(ch3, sizeof(ch3)); wait_ms(500);
-    toPC.printf("log BESTVELB on COM1\n");
+    toPC.printf("WMsg log BESTVELB on COM1\n");
     sendASCII(ch4, sizeof(ch4)); wait_ms(500);
-    toPC.printf("log RANGEB on COM1\n");
+    toPC.printf("WMsg log RANGEB on COM1\n");
     sendASCII(ch5, sizeof(ch5)); wait_ms(500);
     
     //toPC.printf("log TIMEB om COM1 \n");
@@ -159,7 +159,7 @@
     //sendASCII(ch8, sizeof(ch8)); wait_ms(500);
        
     //set GPS output COM1 to the final high rate
-    toPC.printf("set the COM ports to high rate\n");
+    toPC.printf("WMsg set the COM ports to high rate\n");
     sendASCII(ch2, sizeof(ch2)); wait_ms(500);
     
     //set the mbed COM port to match the GPS transmit rate
@@ -203,7 +203,7 @@
     timeFromPPS.start();  //start the time for measuring time from 1PPS events
     timeFromStart.start();
     
-    toPC.printf("\n\n top of the main loop \n\n");
+    //toPC.printf("\n\n top of the main loop \n\n");
     
     int totalBytesWritten = 0;
     
@@ -237,7 +237,7 @@
         //this will close the fpNav file on the SD card if the file is open 
         //and the elapsed time from PosVel messages is > 60 secs
         //this prevents loosing the fpNav file if the PC goes down
-        if (fpNav && (timeFromPosVelMessageReceipt.read() < 60) )
+        if (fpNav && (timeFromPosVelMessageReceipt.read() > 60) )
         {
             sendRecData = true;
             recordData  = false;