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
Revision 22:1cbdbc856660, committed 2013-05-19
- Comitter:
- jekain314
- Date:
- Sun May 19 16:26:28 2013 +0000
- Parent:
- 21:37551baf69c6
- Child:
- 23:aff4bc6bf658
- Commit message:
- added WMsg to all messages to PC to improve startup. Blink LEDs on 1PPS to indicate main loop activity
Changed in this revision
--- a/ADIS16488.h Tue May 14 23:32:15 2013 +0000 +++ b/ADIS16488.h Sun May 19 16:26:28 2013 +0000 @@ -22,7 +22,7 @@ union WD { long dataWord; unsigned short pt[2];} wd; //IMU records are buffered in the IMUDataReady ISR -const unsigned char IMUrecArraySize = 15; +const unsigned char IMUrecArraySize = 30; #pragma pack(1) struct IMUREC
--- a/PCMessaging.h Tue May 14 23:32:15 2013 +0000 +++ b/PCMessaging.h Sun May 19 16:26:28 2013 +0000 @@ -162,12 +162,12 @@ case FIRE_TRIGGER_MSG: fireTrigger = true; - toPC.printf("MBED received trigger command \n"); + toPC.printf("WMsg MBED received trigger command \n"); break; case GETFILE_MSG: get_file_msg = true; // signal to main that we can unload the file that was written - toPC.printf(" request to get SD card file \n"); + toPC.printf("WMsg request to get SD card file \n"); break; } //end Switch statement
--- a/SDShell.lib Tue May 14 23:32:15 2013 +0000 +++ b/SDShell.lib Sun May 19 16:26:28 2013 +0000 @@ -1,1 +1,1 @@ -https://mbed.org/users/sam_grove/code/SDShell/#4d357eedd670 +https://mbed.org/users/sam_grove/code/SDShell/#8dbe4f4c1216
--- 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();