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:
29:dead10cce6e9
Parent:
22:1cbdbc856660
Child:
30:96d133f3008e
diff -r fcea53fcc712 -r dead10cce6e9 ADIS16488.h
--- a/ADIS16488.h	Wed Nov 13 22:12:04 2013 +0000
+++ b/ADIS16488.h	Thu Jan 09 14:09:05 2014 +0000
@@ -22,16 +22,13 @@
 union WD { long dataWord; unsigned short pt[2];} wd;
 
 //IMU records are buffered in the IMUDataReady ISR
-const unsigned char IMUrecArraySize = 30;
+const unsigned char IMUrecArraySize = 10;
 
 #pragma pack(1)
 struct IMUREC
 {
-    unsigned long synch;
-    unsigned short msgID;
     unsigned long GPSTime;
     long dataWord[6];
-    //  4 + 2 + 4 + 24 = 34
 };
 
 IMUREC imuPing[IMUrecArraySize];
@@ -39,7 +36,6 @@
 IMUREC tempRec;
 volatile bool fillingPingWritingPong = true;
 
-
 unsigned long maxDelIMUmsecs = 0;
 unsigned long delIMUmsecs = 0;      
 unsigned long lastIMUmsecs = 0; 
@@ -66,7 +62,8 @@
         if ( fillingPingWritingPong) tempRec.dataWord[i] = wd.dataWord; //data word is a signed long
         else                         tempRec.dataWord[i] = wd.dataWord; //data word is a signed long
     }           
-            
+    
+    //fill the correct buffer ping or pong
     if (fillingPingWritingPong)  imuPing[IMUClockCounter] = tempRec;
     else                         imuPong[IMUClockCounter] = tempRec;
     
@@ -110,13 +107,7 @@
     
     //change the page to 0 to get the data
     spi.write((int)0x8000);  //change to page 0
-    
-    //toPC.printf(" setting the default values\n");
-    
-    //set the IMU synch and message ID
-    tempRec.synch = 0x1C1244AA;  //same as the GPS synch words
-    tempRec.msgID = 111;  //IMU record ID
-    
-    //toPC.printf(" finished setting the default values\n");
 
 }
+
+