EMG and motor script together, Not fully working yet,.

Dependencies:   Encoder MODSERIAL QEI biquadFilter mbed

Fork of Code_MotorEMG by Joost Herijgers

Revision:
20:bde79d7a4091
Parent:
19:6567ed67d6ee
Child:
21:3fdd135a3dfd
diff -r 6567ed67d6ee -r bde79d7a4091 main.cpp
--- a/main.cpp	Wed Nov 01 13:59:04 2017 +0000
+++ b/main.cpp	Wed Nov 01 14:36:20 2017 +0000
@@ -359,7 +359,7 @@
 
 void MotorController1()
 {
-    int         reference_o = (int) (counto-hcounto);
+    int         reference_o = -11987; //(int) (counto-hcounto);
     int         position_o = Encoder1.getPulses();
     
     int error_o = reference_o - position_o;
@@ -390,7 +390,7 @@
 void MotorController2()
 {
     
-    int reference_b = (int) (countb-hcountb);
+    int reference_b = 7648;//(int) (countb-hcountb);
     int position_b = Encoder2.getPulses();
 
     int error_b = reference_b - position_b;
@@ -419,7 +419,7 @@
 
 void MotorController3()
 {
-    int reference_r = (int) (countr-hcountr);
+    int reference_r = 6886;//(int) (countr-hcountr);
     int position_r = Encoder3.getPulses();
         
     int error_r = reference_r - position_r;
@@ -550,9 +550,9 @@
 }
 
 void tiller(){
-    int reference_o = hcounto-12487;
-    int reference_b = hcountb-8148;
-    int reference_r = hcountr-7386;
+    //int reference_o = hcounto-12487;
+    //int reference_b = hcountb-8148;
+    //int reference_r = hcountr-7386;
     pc.printf("Tiller");
 /*    Vex = 20;
     Vey = 20;*/