Lennart Bouma / Mbed 2 deprecated codetotaall

Dependencies:   HIDScope QEI biquadFilter mbed

Fork of NR_method_1 by Carlmaykel Orman

Files at this revision

API Documentation at this revision

Comitter:
fabuled
Date:
Tue Nov 06 23:47:19 2018 +0000
Parent:
13:fb52c8d7f242
Commit message:
Final code

Changed in this revision

NR_method_1.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/NR_method_1.cpp	Fri Nov 02 09:47:03 2018 +0000
+++ b/NR_method_1.cpp	Tue Nov 06 23:47:19 2018 +0000
@@ -149,7 +149,7 @@
         pc.printf("Moving in the x direction\n\r");
         if (dir == true) {
             if(x1 > -45.7) {
-                x1 = x1-4.2;
+                x1 = x1-4.1;
 
 
             } else if ( x1 <= -45.7) {
@@ -159,7 +159,7 @@
             }
         } else {
             if(x1 < -17) {
-                x1 = x1+4.2;
+                x1 = x1+4.1;
 
             } else if ( x1 >= -17) {
                 x1 = -45.7;
@@ -252,8 +252,8 @@
 
 void position_define()
 {
-    if (ex >= Cxx - 0.01 && ex <= Cxx + 0.01) {
-        if (ey >= Cyy - 0.01 && ey <= Cyy + 0.01) {
+    if (ex >= Cxx - 0.003 && ex <= Cxx + 0.003) {
+        if (ey >= Cyy - 0.003 && ey <= Cyy + 0.003) {
         } else {
             if (ey > Cyy) {
                 ey = ey - 0.004;