mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 09:17:56 +01:00
Added heatup in startgcode and replace {printingTemp} and {preheatTemp} for settings
This commit is contained in:
parent
10ca22d7e9
commit
5ceabf41ba
@ -31,39 +31,6 @@ var gcode = [];
|
|||||||
function generate_gcode() {
|
function generate_gcode() {
|
||||||
console.log("f:generategcode()");
|
console.log("f:generategcode()");
|
||||||
|
|
||||||
var startGcode = [];
|
|
||||||
var endGcode = [];
|
|
||||||
|
|
||||||
// get gcode start statements
|
|
||||||
/*console.log("settings['printer.startgcode']: ",settings["printer.startgcode"]);
|
|
||||||
console.log("settings['printer.endgcode']: ",settings["printer.endgcode"]);
|
|
||||||
|
|
||||||
if ($("#startgcode").val().trim().length != 0) {
|
|
||||||
console.log(" found contents for start-gcode in settings.html")
|
|
||||||
startGcode = $("#startgcode").val().trim().split("\n");
|
|
||||||
} else {
|
|
||||||
console.log(" no start-gcode in settings.html, using defaults")
|
|
||||||
startGcode = startGcode.concat(gcodeStart);
|
|
||||||
}
|
|
||||||
|
|
||||||
// get gcode end statements
|
|
||||||
if ($("#endgcode").val().trim().length != 0) {
|
|
||||||
console.log(" found contents for end-gcode in settings.html")
|
|
||||||
endGcode = $("#endgcode").val().trim().split("\n");
|
|
||||||
} else {
|
|
||||||
console.log(" no end-gcode in settings.html, using defaults")
|
|
||||||
endGcode = endGcode.concat(gcodeEnd);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log("f:generate_gcode() >> startGcode:");
|
|
||||||
console.log(startGcode);
|
|
||||||
console.log("");
|
|
||||||
console.log("f:generate_gcode() >> endGcode:");
|
|
||||||
console.log(endGcode);*/
|
|
||||||
|
|
||||||
startGcode = settings["printer.startgcode"].split("\n");
|
|
||||||
endGcode = settings["printer.endgcode"].split("\n");
|
|
||||||
|
|
||||||
// TODO 2013-09-18 evaluate if this should stay here
|
// TODO 2013-09-18 evaluate if this should stay here
|
||||||
// this was added when Rick mailed us wrt the Ultimaker delivery of Doodle3D
|
// this was added when Rick mailed us wrt the Ultimaker delivery of Doodle3D
|
||||||
var gCodeOffsetX = 110; // mm
|
var gCodeOffsetX = 110; // mm
|
||||||
@ -88,7 +55,18 @@ function generate_gcode() {
|
|||||||
var retractionspeed = settings["printer.retraction.speed"];
|
var retractionspeed = settings["printer.retraction.speed"];
|
||||||
var retractionminDistance = settings["printer.retraction.minDistance"];
|
var retractionminDistance = settings["printer.retraction.minDistance"];
|
||||||
var retractionamount = settings["printer.retraction.amount"];
|
var retractionamount = settings["printer.retraction.amount"];
|
||||||
|
var preheatTemperature = settings["printer.heatup.temperature"];
|
||||||
|
|
||||||
|
var startGcode = settings["printer.startgcode"];
|
||||||
|
startGcode = startGcode.replace("{printingTemp}",temperature);
|
||||||
|
startGcode = startGcode.replace("{preheatTemp}",preheatTemperature);
|
||||||
|
startGcode = startGcode.split("\n");
|
||||||
|
|
||||||
|
var endGcode = settings["printer.endgcode"];
|
||||||
|
endGcode = endGcode.replace("{printingTemp}",temperature);
|
||||||
|
endGcode = endGcode.replace("{preheatTemp}",preheatTemperature);
|
||||||
|
endGcode = endGcode.split("\n");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
console.log("f:generate_gcode >> EFFE CHECKEN:");
|
console.log("f:generate_gcode >> EFFE CHECKEN:");
|
||||||
console.log(" speed: " + speed);
|
console.log(" speed: " + speed);
|
||||||
@ -130,13 +108,13 @@ function generate_gcode() {
|
|||||||
// console.log("f:generategcode() >> paths: " + paths.toString());
|
// console.log("f:generategcode() >> paths: " + paths.toString());
|
||||||
// console.log("paths.toString(): " + paths.toString());
|
// console.log("paths.toString(): " + paths.toString());
|
||||||
// return;
|
// return;
|
||||||
|
|
||||||
console.log("printer temperature: ",temperature);
|
//gcode.push("M104 S" + temperature); // set target temperature and do not 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
|
||||||
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);
|
||||||
|
|
||||||
//gcode.push("M109 S" + temperature); // set target temperature and wait for the extruder to reach it
|
//gcode.push("M109 S" + temperature); // set target temperature and wait for the extruder to reach it
|
||||||
|
|
||||||
var layers = maxObjectHeight / layerHeight; //maxObjectHeight instead of objectHeight
|
var layers = maxObjectHeight / layerHeight; //maxObjectHeight instead of objectHeight
|
||||||
|
@ -139,23 +139,7 @@
|
|||||||
<textarea id="endgcode" class="gcode" name="printer.endgcode">
|
<textarea id="endgcode" class="gcode" name="printer.endgcode">
|
||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
<!-- 2013-10-09 replaced by DIV solution (but keeping here in comments temporarily as lookup...)
|
<small>The text <em>{printingTemp}</em> will be replaced by the printing temperature and <em>{preheatTemp}</em> will be replaced by the preaheat temperature.</small>
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="startgcode">Start:</label><br>
|
|
||||||
<textarea id="startgcode" class="gcode" name="printer.startgcode">
|
|
||||||
</textarea>
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<label for="endgcode">End:</label><br>
|
|
||||||
<textarea id="endgcode" class="gcode" name="printer.endgcode">
|
|
||||||
</textarea>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
-->
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form><br/>
|
</form><br/>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user