My modifications/additions to the code

Dependencies:   ADXL345 ADXL345_I2C IMUfilter ITG3200 Servo fishgait mbed-rtos mbed pixy_cam

Fork of robotic_fish_ver_4_8 by jetfishteam

Revision:
17:6970aef8154b
Parent:
15:dc5753a5b83e
Child:
18:9ba4566f2361
--- a/MainController.h	Mon Feb 17 14:04:09 2014 +0000
+++ b/MainController.h	Thu May 22 04:32:19 2014 +0000
@@ -6,6 +6,8 @@
 #include "motor_controller.h"
 #include "guardian.h"
 //#include "IMU.h"
+#include "Servo.h"
+
 
 
 #define MATH_PI 3.14159265359
@@ -33,6 +35,7 @@
     float getVolume();
     float getAmplitude();
     float getRudder();
+    float getPitch();
     
     /** Stop the main controller
      *
@@ -46,16 +49,20 @@
     float calculateFrequency();
     float calculateVolume();
     float calculateRudder();
+    float calculatePitch();
     float signum(float input);
     float saturate(float input);
     
 private:
+    PwmIn ch1;
+    PwmIn ch2;
     PwmIn ch3;
     PwmIn ch4;
     PwmIn ch6;
     PololuMController mcon;
     Guardian ap;
-    
+    Servo leftservo;
+    Servo rightservo;
     
     Timer timer1;
     Ticker ticker1;
@@ -67,8 +74,12 @@
     float frqMax;
     float amplitude;
     float rud;
-    float goofftime;
-    bool switched;
+    float pitch;
+    
+    int state;
+    int change;
+    //float goofftime;
+    //bool switched;
 };
  
 #endif