Corrected header file include guards.

Fork of IMUdriver by HEL's Angels

Revision:
6:d9198ff2dcf9
Parent:
5:db1da6bc9dce
Child:
7:5e299dbf98ff
--- a/MPU6000.h	Wed Jun 03 17:32:43 2015 +0000
+++ b/MPU6000.h	Wed Jun 03 19:00:43 2015 +0000
@@ -39,20 +39,21 @@
 #define MPU6000_h
 #include "mbed.h"
 
-/** class
-*/ 
+/** mpu6000_spi class.
+* Used as the driver for the MPU 6000 IMU. Documentation is provided for code written in HEL.
+*/
 class mpu6000_spi
 {
     SPI& spi;
     DigitalOut cs;
 
 public:
+    // The following were created as a part of the driver and are not documented
     mpu6000_spi(SPI& _spi, PinName _cs);
     bool init(int sample_rate_div,int low_pass_filter);
     float read_acc(int axis);
     float read_rot(int axis);
     float getAccTilt();
-//    float getTorsoTilt();
     unsigned int set_gyro_scale(int scale);
     unsigned int set_acc_scale(int scale);
     int calib_acc(int axis);
@@ -60,35 +61,47 @@
     void select();
     void deselect();
     unsigned int whoami();
-
-    /** Create whoami_check() instance.
-    * whoami_check() masks current whoami() value against expected value.
+    float acc_divider;
+    float gyro_divider;
+    
+    /** Masks current whoami() value against expected value.
     * @returns
     *    0 is safe
     *    1 is unsafe
     */
-    int whoami_check();
+    int whoamiCheck();
 
-    float acc_divider;
-    float gyro_divider;
-    //added
+    /** Combines gyro and accelerometer data to find acceleration
+    * @returns Acceleration in y.
+    */
     float angle_y();
-    //added
-    float read_angle_y();
+
+    /** Finds y acceleration without sampling IMU
+    * @returns Acceleration in y.
+    */
+    float rereadAngle_y();
 
 private:
+
+    // The following were created as a part of the driver and are not documented
     PinName _CS_pin;
     PinName _SO_pin;
     PinName _SCK_pin;
-    //added
-    float _error;
-    //added
+    
+    /** Accelerometer acceleration using a complementary filter.
+    */
     float accFilterCurrent;
-    //added
+
+    /** Acceleration from accelerometer-only sample.
+    */
     float accFilterPre;
-    //added
+
+    /** Gyro acceleration using a complementary filter.
+    */
     float gyroFilterCurrent;
-    //added
+
+    /** Acceleration from accelerometer-only sample.
+    */
     float gyroFliterPre;
 };