Doodle3D / doodle3d-client

The Doodle3D web interface that people can access on computers or tablets to draw doodles and control the Doodle3D WiFi box.
www.doodle3d.com
GNU General Public License v2.0
3 stars 8 forks source link

API repeats code #231

Open an-awful-person opened 10 years ago

an-awful-person commented 10 years ago

The API repeats the first line of code when ("start", "true") is send multiple times.

Processing example:

This makes the printer home 3 times with the Gcode 'G28 X0.0 Y0.0 Z0.0' and ignores the Gcodes 'G92 E0' and 'M106' that are send after.

 import httprocessing.*;

String BoxIP = "10.0.0.188"; //Your WiFi-Box IP

PostRequest post = new PostRequest("http://"+BoxIP+"/d3dapi/printer/print");

void setup() {
  startup();
}

void startup() {
  post.addData("gcode", "G28 X0.0 Y0.0 Z0.0");
  post.addData("start", "true");
  post.send();
  post.addData("gcode", "G92 E0");
  post.addData("start", "true");
  post.send();
  post.addData("gcode", "M106");
  post.addData("start", "true");
  post.send();

  //post.addData("gcode", "G28 X0.0 Y0.0 Z0.0 \n G92 E0 \n M106"); //This works.
  //Everything works as well with only 1 time ("start", "true") 
}
woutgg commented 10 years ago

At least the makerbot driver does not show this issue (anymore, after many changes to it).

peteruithoven commented 10 years ago

Using a fresh build with the following branches I can still replicate the issue.