Skip to content

Commit 48229fa

Browse files
committed
multiple mirobot runs ok
1 parent d85d77e commit 48229fa

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!DOCTYPE html>
2-
<html lang="en" manifest="turtle.appcache">
2+
<!-- <html lang="en" manifest="turtle.appcache"> -->
3+
<html lang="en">
34
<head>
45
<meta charset="utf-8" />
56
<title>LASER TURTLE -- Turtle Graphics to SVG</title>

turtle-mirobot.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
2525
}
2626
if (commands[index]) {
2727
console.log('sending '+index, commands[index]);
28-
mb.send(commands[index], next);
28+
var cmd = {
29+
cmd: commands[index].cmd,
30+
arg: commands[index].arg
31+
};
32+
mb.send(cmd, next);
2933
index++;
3034
}
3135
};
@@ -41,6 +45,7 @@
4145
} else {
4246
mb = new Mirobot(options.address, nextInABit);
4347
}
48+
console.log(mb);
4449

4550
};
4651

turtle.appcache

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
CACHE MANIFEST
2+
# 2014-10-26 12:43
23

34
index.html
45
turtle-svg-worker.js

0 commit comments

Comments
 (0)