0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-11-22 01:07:56 +01:00

Include sequence numbers in console.log message when sending print.

This commit is contained in:
Wouter R 2016-02-14 17:29:23 +01:00
parent 578fba4f63
commit c742740078

View File

@ -175,16 +175,6 @@ function Printer() {
} }
/* inform user what's going on */
var lessThanMaxText = sendLength < Printer.MAX_LINES_PER_POST ? " (less than max of " + Printer.MAX_LINES_PER_POST + ")" : "";
console.log("Printer:sendPrintPart: sendIndex=" + sendIndex + "/" + this.gcode.length +
", sendLength=" + sendLength + lessThanMaxText);
var sendPercentage = Math.round(sendIndex / this.gcode.length * 100);
message.set("Sending doodle to printer: " + sendPercentage + "%", Message.NOTICE, false, true);
/* prepare post data */ /* prepare post data */
var gcodePart = this.gcode.slice(sendIndex, sendIndex + sendLength); var gcodePart = this.gcode.slice(sendIndex, sendIndex + sendLength);
@ -198,6 +188,17 @@ function Printer() {
}; };
/* inform user what's going on */
var lessThanMaxText = completed ? " (last one, max=" + Printer.MAX_LINES_PER_POST + ")" : "";
console.log("Printer:sendPrintPart: sendIndex=" + sendIndex + "/" + this.gcode.length +
", sendLength=" + sendLength + lessThanMaxText +
", sequence numbers: " + seqNum + "/" + this.gcodeNumChunks);
var sendPercentage = Math.round(sendIndex / this.gcode.length * 100);
message.set("Sending doodle to printer: " + sendPercentage + "%", Message.NOTICE, false, true);
/* send data */ /* send data */
var self = this; var self = this;