Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HIDScope QEI biquadFilter mbed
Fork of NR_method_1 by
Diff: NR_method_1.cpp
- Revision:
- 16:5270b5921d03
- Parent:
- 15:771f3c73fe24
diff -r 771f3c73fe24 -r 5270b5921d03 NR_method_1.cpp
--- 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;
