even versimpelen

Dependencies:   HIDScope MODSERIAL PID QEI biquadFilter mbed

Fork of cpfromralph1 by Remi van Veen

Revision:
42:3aa03b5cefb0
Parent:
41:08d41bb622bb
Child:
43:9115c84145c6
--- a/main.cpp	Fri Nov 03 03:36:49 2017 +0000
+++ b/main.cpp	Fri Nov 03 03:52:30 2017 +0000
@@ -518,7 +518,7 @@
             //MV2 = 0;
             x = x + 0.1;
             if (x > 16) {
-            x = 15;
+            x = 16;
             }
             double alpha = inversekinematics1(x,y); //calculate alpha and beta for current x,y
             double beta = inversekinematics2(x,y);
@@ -536,7 +536,7 @@
             //MV2 = 0;
             x = x - 0.1;
             if (x < 10.77){
-            x = 10.77;
+            x = 10.87;
             }
             double alpha = inversekinematics1(x,y);
             double beta = inversekinematics2(x,y);
@@ -570,7 +570,7 @@
             //MV2 = -0.5;
             y = y - 0.1;
             if (y < 15.73) {
-            y = 15.73;
+            y = 15.83;
             }
             double alpha = inversekinematics1(x,y);
             double beta = inversekinematics2(x,y);
@@ -688,8 +688,8 @@
     //filter();
     while (angle1<setpoint1 || angle1>setpoint1 || angle2<setpoint2 || angle2>setpoint2) {
         encoders();
-        double count1;
-        double count2;
+        float count1;
+        float count2;
         angle1 += (0.0981 * count1);
         angle2 += (0.0981 * count2);
         if (angle1<setpoint1 && angle2<setpoint2) {