2018 revision to classic DataBus AVC code.

Dependencies:   LSM303DLM Servo SerialGraphicLCD L3G4200D IncrementalEncoder SimpleShell

Revision:
12:3cd91e150d9c
Parent:
11:8ec858b7c6d1
Child:
13:5566df1250f1
--- a/Updater.cpp	Wed Dec 12 17:20:16 2018 +0000
+++ b/Updater.cpp	Wed Dec 12 17:32:24 2018 +0000
@@ -1,7 +1,18 @@
 #include "Updater.h"
 
 
-Updater *Updater::instance() {
+void Updater::gyro(int g[3]) 
+{
+    for (int i=0; i < 3; i++) {
+        g[i] = _gyro[i];
+    }
+    
+    return;
+}
+
+
+Updater *Updater::instance() 
+{
     static Updater instance;
 
     return &instance;
@@ -37,9 +48,7 @@
 
     // Read encoders
     // Read gyro
-    int g_a[3];
-    gyro.read(g_a);
-    g = g_a[2];
+    gyro.read(_gyro);
     
     //gyro[_z_] = (g_sign[_z_] * (g[_z_] - g_offset[_z_])) / g_scale[_z_];