Implemented first Hangar-Service

Dependencies:   CalibrateMagneto QuaternionMath

Fork of SML2 by TobyRich GmbH

Revision:
6:c12cea26842d
Parent:
5:b9f2f62a8f90
Child:
8:cba37530d480
--- a/Gyroscope.h	Thu Feb 12 17:17:35 2015 +0000
+++ b/Gyroscope.h	Thu Feb 12 19:00:28 2015 +0000
@@ -2,27 +2,23 @@
 #define _H_GYROSCOPE_H
 
 #include "I2CPeripheral.h"
-
-extern uint32_t ticks;
+#include "Sensor.h"
 
-typedef struct {
-    int16_t x;
-    int16_t y;
-    int16_t z;
-} frame_t;
-
-extern frame_t frame;
-
-class Gyroscope : public I2CPeripheral {
+class Gyroscope : public I2CPeripheral, public Sensor {    
 public:
     Gyroscope(I2C &i2c);
+    
     void handleInterrupt(void);
-    void deepSuspend();
-    void powerOn();
-    void startDataCapture();
+    
+    virtual void powerOff();
+    virtual bool powerOn();
+    virtual void start();
+    virtual void stop();
+    virtual Sensor::Data read();
     
 protected:
     InterruptIn int1;
+    Timer timer;
 };
 
 #endif//_H_GYROSCOPE_H
\ No newline at end of file