Carlmaykel Orman / Mbed 2 deprecated NR_method_1

Dependencies:   HIDScope QEI biquadFilter mbed

Fork of NR_method by Thijs Rakels

Revision:
13:5270b5921d03
Parent:
12:771f3c73fe24
--- a/NR_method_1.cpp	Thu Nov 01 21:40:06 2018 +0000
+++ b/NR_method_1.cpp	Fri Nov 02 08:13:22 2018 +0000
@@ -205,21 +205,21 @@
         Cxx =x1;
 
         if (dir == true) {
-            if(x1 > -46.3) {
+            if(x1 > -46.9) {
                 x1 = x1-4.2;
                 printboardpos();
 
-            } else if ( x1 <= -46.3) {
+            } else if ( x1 < -46.9) {
                 x1 =-17;
                 printboardpos();
             } else {
             }
         } else {
-            if(x1 < -17) {
+            if(x1 < -16.5) {
                 x1 = x1+4.2;
                 printboardpos();
-            } else if ( x1 >= -17) {
-                x1 = -46.3;
+            } else if ( x1 > -16.5) {
+                x1 = -46.4;
                 printboardpos();
             } else {
             }
@@ -237,22 +237,22 @@
         Cyy=y1;
         //pc.printf("Moving in the y direction\r\n");
         if(dir == true) {
-            if(y1 < 32.4) {
+            if(y1 < 32.9) {
                 y1 = y1+4.2;
                 //return y1;
                 printboardpos();
-            } else if ( y1 >= 32.4) {
+            } else if ( y1 > 32.9) {
                 y1 = 3;
                 printboardpos();
                 //return y1;
             } else {
             }
         } else {
-            if(y1 > 3) {
+            if(y1 > 2.5) {
                 y1 = y1-4.2;
                 printboardpos();
                 //return y1;
-            } else if ( y1 <= 3) {
+            } else if ( y1 < 2.5) {
                 y1 = 32.4;
                 printboardpos();
                 //return y1;