JEK changes enabling proper recording of IMU/GPS datastrams - 02-APR-2013

Dependencies:   mbed

Fork of GPS_Incremental by Dan Matthews

Revision:
6:2a8486283198
Parent:
4:68268737ff89
Child:
9:b45feb91ba38
--- a/ADIS16488.h	Fri Mar 29 20:52:54 2013 +0000
+++ b/ADIS16488.h	Tue Apr 02 15:22:37 2013 +0000
@@ -22,13 +22,12 @@
 struct IMUREC
 {
     unsigned long synch;
-    unsigned char msgID;
-    double GPSTime;
+    unsigned short msgID;
+    unsigned long GPSTime;
     long dataWord[6];
+    //  4 + 2 + 4 + 24 = 34
 } imuRec;
 
-
-
 void IMUDataReadyISR(void)
 {   
     IMUDataReady = true;
@@ -40,7 +39,6 @@
     ADIS_DR.mode(PullDown);
     ADIS_RST = 0;
     
-    printf("\nStart of ADIS test\n");
     //  set the IMU dataReady ISR
     ADIS_DR.rise(&IMUDataReadyISR);
     
@@ -71,7 +69,13 @@
     //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
-    imuRec.synch = 0xAA44121C;  //same as the GPS synch words
+    imuRec.synch = 0x1C1244AA;  //same as the GPS synch words
+
     imuRec.msgID=111;  //IMU record ID
+    
+    toPC.printf(" finished setting the default values\n");
+
 }