2018 revision to classic DataBus AVC code.

Dependencies:   LSM303DLM Servo SerialGraphicLCD L3G4200D IncrementalEncoder SimpleShell

Revision:
32:eb673f6f5734
Parent:
25:b8176ebb96c6
--- a/Updater.h	Thu Dec 27 00:42:35 2018 +0000
+++ b/Updater.h	Thu Dec 27 15:46:57 2018 +0000
@@ -2,7 +2,6 @@
 #define __UPDATER_H
 
 #include "mbed.h"
-#include "L3G4200D.h"
 
 /** Periodically reads sensor data
  * This class reads and updates sensor data. Intended to be called at a fixed
@@ -28,12 +27,36 @@
     /// Update all sensors
     void update(); 
     
+    /** Get imu values
+     * @param g x, y, z gyro values to return
+     * @param a x, y, z accelerometer values to return
+     * @param m x, y, z magnetometer values to return
+     * @param dt time since data last updated
+     * @return g, a, m and dt
+     */
+    void imu(int g[3], int a[3], int m[3], float& dt);
+    
     /** Get gyro values
-     * @return g array of x, y, and z gyro values
-     * @return dt time since data last updated
+     * @param g x, y, z gyro values to return
+     * @param dt time since data last updated
+     * @return g and dt
      */
     void gyro(int g[3], float& dt);
+
+    /** Get accel values
+     * @param a x, y, z accelerometer values to return
+     * @param dt time since data last updated
+     * @return a and dt
+     */
+    void accel(int g[3], float& dt);
     
+    /** Get magnetometer values
+     * @param m x, y, z magnetometer values to return
+     * @param dt time since data last updated
+     * @return m and dt
+     */
+    void mag(int g[3], float& dt);
+
     /** Get encoder count
      * @return encoder count since last call
      */
@@ -46,6 +69,8 @@
     Callback<void()> _callback; // notification callback    
     Timer *t; // timer used to measure dt
     int _gyro[3]; // gyro raw
+    int _accel[3]; // accelerometer raw
+    int _mag[3]; // magnetometer raw
     int _ecount; // encoder count
     float _dt;
     int _interval;