mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 09:17:56 +01:00
NOTE: this commit is temporary and should be reverted!
Add confirmation dialog when stop print button is pressed. Add modal alert when print is started to prevent repeated clicking of button (which in turn corrupts gcode buffering). Change preheat M109 to M104 to speed up printing cycle.
This commit is contained in:
parent
a23de73f8d
commit
07fa1f62e8
@ -189,6 +189,7 @@ function initButtonBehavior() {
|
|||||||
}
|
}
|
||||||
function stopPrint() {
|
function stopPrint() {
|
||||||
console.log("f:stopPrint() >> sendPrintCommands = " + sendPrintCommands);
|
console.log("f:stopPrint() >> sendPrintCommands = " + sendPrintCommands);
|
||||||
|
if (!confirm("Weet je zeker dat je de huidige print wilt stoppen?")) return;
|
||||||
if (sendPrintCommands) printer.stop();
|
if (sendPrintCommands) printer.stop();
|
||||||
setState(Printer.STOPPING_STATE,printer.hasControl);
|
setState(Printer.STOPPING_STATE,printer.hasControl);
|
||||||
}
|
}
|
||||||
@ -229,6 +230,7 @@ function print(e) {
|
|||||||
console.log("f:print >> not enough points!");
|
console.log("f:print >> not enough points!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alert("Je tekening zal nu geprint worden.");
|
||||||
|
|
||||||
// $.post("/doodle3d.of", { data:output }, function(data) {
|
// $.post("/doodle3d.of", { data:output }, function(data) {
|
||||||
// btnPrint.disabled = false;
|
// btnPrint.disabled = false;
|
||||||
|
@ -125,7 +125,8 @@ function generate_gcode(callback) {
|
|||||||
// return;
|
// return;
|
||||||
|
|
||||||
console.log("printer temperature: ",temperature);
|
console.log("printer temperature: ",temperature);
|
||||||
gcode.push("M109 S" + temperature); // set target temperature and wait for the extruder to reach it
|
gcode.push("M104 S" + temperature); // set target temperature and do not wait for the extruder to reach it
|
||||||
|
//gcode.push("M109 S" + temperature); // set target temperature and wait for the extruder to reach it
|
||||||
// add gcode begin commands
|
// add gcode begin commands
|
||||||
gcode = gcode.concat(startGcode);
|
gcode = gcode.concat(startGcode);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user