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
Diff: main.cpp
- Revision:
- 22:1cbdbc856660
- Parent:
- 20:3f04a0bde484
- Child:
- 24:353322495742
diff -r 37551baf69c6 -r 1cbdbc856660 main.cpp --- a/main.cpp Tue May 14 23:32:15 2013 +0000 +++ b/main.cpp Sun May 19 16:26:28 2013 +0000 @@ -331,7 +331,7 @@ if ( msgCRC != computedCRC) { - toPC.printf(" bad CRC match for messageID %3d total CRC errors = %4d \n", + toPC.printf("WMsg bad CRC match for messageID %3d total CRC errors = %4d \n", msgHdr.messageLength, TotalBadCRCmatches++); } @@ -401,10 +401,13 @@ cyclesPerSec = 0; //totalBytesWritten = 0; GPSdataWritten = false; - toPC.printf(" bytesWritten = %5d \n", totalBytesWritten); + //toPC.printf(" bytesWritten = %5d \n", totalBytesWritten); IMURecordCounter = 0; detectedGPS1PPS = false; + + rxMsg = !rxMsg; + txMsg = !txMsg; } } @@ -412,10 +415,10 @@ if (fpNav != NULL) { fclose(fpNav); //insurance - toPC.printf(" closing fpNav before transfer \n"); + toPC.printf("WMsg closeFPNav \n"); } - toPC.printf(" totalBytesWritten = %5d \n", totalBytesWritten); + toPC.printf("WMsg totalBytesWritten %5d \n", totalBytesWritten); wait_ms(100); transferFile(); @@ -423,7 +426,7 @@ // to exit this function the HOST (ie: computer or PC app) must send "exit" otherwise the mbed will act // like a terminal and serve SD file data forever - toPC.printf(" normal termination of single mission \n"); + toPC.printf("WMsg normalTermination \n"); wait_ms(100); NVIC_SystemReset();