|
|
|
@ -70,7 +70,7 @@ const parseMessage = (message) => {
|
|
|
|
|
} else {
|
|
|
|
|
switch (message.toLowerCase()) {
|
|
|
|
|
case 'init':
|
|
|
|
|
toPlotter(translate());
|
|
|
|
|
toPlotter(init());
|
|
|
|
|
break;
|
|
|
|
|
case 'pu':
|
|
|
|
|
toPlotter(`PU;`);
|
|
|
|
@ -79,7 +79,7 @@ const parseMessage = (message) => {
|
|
|
|
|
toPlotter(`PD;`);
|
|
|
|
|
break;
|
|
|
|
|
case 'up':
|
|
|
|
|
toPlotter(translate(distance * -1, 0));
|
|
|
|
|
toPlotter(translate(0, distance * -1));
|
|
|
|
|
break;
|
|
|
|
|
case 'down':
|
|
|
|
|
toPlotter(translate(0, distance));
|
|
|
|
@ -88,10 +88,7 @@ const parseMessage = (message) => {
|
|
|
|
|
toPlotter(translate(distance * -1, 0));
|
|
|
|
|
break;
|
|
|
|
|
case 'right':
|
|
|
|
|
toPlotter(translate(0, distance));
|
|
|
|
|
break;
|
|
|
|
|
case 'right':
|
|
|
|
|
toPlotter(translate(0, distance));
|
|
|
|
|
toPlotter(translate(distance, 0));
|
|
|
|
|
break;
|
|
|
|
|
case 'rectangle':
|
|
|
|
|
toPlotter(rectangle(distance));
|
|
|
|
|