From 48229fabb39f9fce4d1ece3ac84fbeea5868f425 Mon Sep 17 00:00:00 2001 From: Forrest Oliphant Date: Sun, 26 Oct 2014 12:46:00 +0000 Subject: [PATCH] multiple mirobot runs ok --- index.html | 3 ++- turtle-mirobot.js | 7 ++++++- turtle.appcache | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 00ab2b2..e3d2b06 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,6 @@ - + + LASER TURTLE -- Turtle Graphics to SVG diff --git a/turtle-mirobot.js b/turtle-mirobot.js index b693903..44eacd9 100644 --- a/turtle-mirobot.js +++ b/turtle-mirobot.js @@ -25,7 +25,11 @@ } if (commands[index]) { console.log('sending '+index, commands[index]); - mb.send(commands[index], next); + var cmd = { + cmd: commands[index].cmd, + arg: commands[index].arg + }; + mb.send(cmd, next); index++; } }; @@ -41,6 +45,7 @@ } else { mb = new Mirobot(options.address, nextInABit); } + console.log(mb); }; diff --git a/turtle.appcache b/turtle.appcache index ccf0e68..74075fe 100644 --- a/turtle.appcache +++ b/turtle.appcache @@ -1,4 +1,5 @@ CACHE MANIFEST +# 2014-10-26 12:43 index.html turtle-svg-worker.js