Stop sending print parts when print is stopped

This commit is contained in:
peteruithoven 2013-10-14 14:55:22 +02:00
parent 399c55f84f
commit f84b1639d5
1 changed files with 5 additions and 2 deletions

View File

@ -151,8 +151,11 @@ function Printer() {
this.gcode = [];
//self.targetTemperature = settings["printer.temperature"]; // slight hack
} else {
console.log("sending next part");
self.sendPrintPart(sendIndex + sendLength, sendLength);
// only if the state hasn't bin changed (by for example pressing stop) we send more gcode
if(self.state == Printer.STATE_PRINTING) {
console.log("sending next part");
self.sendPrintPart(sendIndex + sendLength, sendLength);
}
}
}
}