Interface library for the Atmel Inertial One IMU. Contains drivers for the ITG 3200 3 axis gyro, BMA-150 3 axis accelerometer, and AK8975 3 axis compass

Revision:
12:cab3f7305522
Parent:
11:a70c76711630
Child:
13:eca05448904d
--- a/IMU.cpp	Thu Feb 02 08:31:20 2012 +0000
+++ b/IMU.cpp	Thu Feb 02 08:50:58 2012 +0000
@@ -47,7 +47,7 @@
     _i2c.write(GYRO_ADR, &poke, 1, false);
     _i2c.read(GYRO_ADR, peek, 2, false);
     
-    int result = ( peek[0] << 8 | peek[1] );
+    int16_t result = ( peek[0] << 8 | peek[1] );
     return result;
     
  }
@@ -60,7 +60,7 @@
     _i2c.write(GYRO_ADR, &poke, 1, false);
     _i2c.read(GYRO_ADR, peek, 2, false);
     
-    int result = ( peek[0] << 8 | peek[1] );
+    int16_t result = ( peek[0] << 8 | peek[1] );
     return result;
     
  }
@@ -73,7 +73,7 @@
     _i2c.write(GYRO_ADR, &poke, 1, false);
     _i2c.read(GYRO_ADR, peek, 2, false);
     
-    int result = ( peek[0] << 8 | peek[1] );
+    int16_t result = ( peek[0] << 8 | peek[1] );
     return result;
 
  }
@@ -86,7 +86,7 @@
     _i2c.write(GYRO_ADR, &poke, 1, false);
     _i2c.read(GYRO_ADR, peek, 6, false);
     
-    int result[3] = [ 
+    int result[] = { 
         ( peek[0] << 8 | peek[1] ),     // X
         ( peek[2] << 8 | peek[3] ),     // Y
         ( peek[4] << 8 | peek[5] )      // Z
@@ -97,7 +97,7 @@
 
  void IMU::gyroSetLPF(char _BW) {
  
-    char poke[2] = [ GYRO_DLPF_REG, _BW };
+    char poke[2] = { GYRO_DLPF_REG, _BW };
     
     _i2c.write(GYRO_ADR, poke, 2, false);