JEK changes enabling proper recording of IMU/GPS datastrams - 02-APR-2013
Fork of GPS_Incremental by
Diff: ADIS16488.h
- Revision:
- 9:b45feb91ba38
- Parent:
- 6:2a8486283198
--- a/ADIS16488.h Wed Apr 17 13:50:21 2013 +0000 +++ b/ADIS16488.h Fri Apr 19 16:21:27 2013 +0000 @@ -15,6 +15,8 @@ unsigned short LOW_REGISTER[] = {0x4000, 0x4400, 0x4800, 0x4C00, 0x5000, 0x5400}; // X_DELTANG_HIGH, Y_DELTANG_HIGH, X_DETANG_HIGH, X_DELTVEL_HIGH, Y_DELTVEL_HIGH, Z_DELTVEL_HIGH unsigned short HIGH_REGISTER[] = {0x4200, 0x4600, 0x4A00, 0x4E00, 0x5200, 0x5600}; + +unsigned long IMUtimeFrom1PPS = 0; union WD { long dataWord; unsigned short pt[2];} wd; @@ -30,6 +32,8 @@ void IMUDataReadyISR(void) { + //IMUtimeFrom1PPS = timeFromPPS.read_us(); + IMUClockCounter++; IMUDataReady = true; return; } @@ -57,7 +61,8 @@ //change the DECRATE to 98.4 Hz (this is also in page 3) //the 8 sets the high bit to 1 indicating a write to a register // The C abd D designate the registers for the DECRATE of Page 3 - // The 17 sets the rate to: 2460/(23+1) = 102.5Hz + // The 0x17 sets the rate to: 2460/(23+1) = 102.5Hz + // The 0x18 sets the rate to: 2460/(24+1) = 98.4Hz spi.write((int)0x8C17); //write high byte (only page number can be written in a single byte) spi.write((int)0x8D00); //write the low byte of DECRATE