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.
Diff: classes.h
- Revision:
- 30:27838f6fdfd6
- Parent:
- 27:3bbc354adea6
- Child:
- 32:5bd3f0d073ac
--- a/classes.h Mon May 21 19:47:50 2018 +0000
+++ b/classes.h Fri May 25 17:28:28 2018 +0000
@@ -5,7 +5,7 @@
Serial ihm(tx, rx); //tx e rx (D1 e D0)
-int saved = 2;
+int saved = 0;
const int maxPoints = 100;
float points[3][maxPoints]; // [0] X; [1] Y; [2] Z;
float path[3][maxPoints]; // [0] mode [1] speed; [2] glue;
@@ -211,7 +211,7 @@
char buffer_char[8];
int n;
- for(int i = 0; i <= saved; i++){
+ for(int i = 0; i < saved; i++){
buffer.append("G");
n = sprintf(buffer_char, "%d ", (int)path[0][i]);
buffer.append(buffer_char);
@@ -236,7 +236,7 @@
n = sprintf(buffer_char, "%d ", (int)path[2][i]);
buffer.append(buffer_char);
- if(i == (saved)){
+ if(i == (saved-1)){
buffer.append(";");
} else {
buffer.append("\r\n");
@@ -255,7 +255,7 @@
for(int i = 0; i < msg.length(); i++){
ihm.putc(msg[i]);
- wait_ms(15);
+ wait_ms(10);
}
printf("Sent\n\r");
}