0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-12-22 13:13:48 +01:00

Merge branch 'heatedbedcondition' into develop

This commit is contained in:
peteruithoven 2013-12-18 17:46:56 +01:00
commit fc48b4de85
2 changed files with 8 additions and 3 deletions

View File

@ -200,6 +200,7 @@ function subsituteVariables(gcode) {
var preheatTemperature = settings["printer.heatup.temperature"];
var preheatBedTemperature = settings["printer.heatup.bed.temperature"];
var printerType = settings["printer.type"];
var heatedbed = settings["printer.heatedbed"];
switch (printerType) {
case "makerbot_replicator2": printerType = "r2"; break;
@ -207,13 +208,15 @@ function subsituteVariables(gcode) {
case "makerbot_thingomatic": printerType = "t6"; break;
case "makerbot_generic": printerType = "r2"; break;
}
var heatedBedReplacement = (heatedbed)? "" : ";";
gcode = gcode.replace(/{printingTemp}/gi ,temperature);
gcode = gcode.replace(/{printingBedTemp}/gi ,bedTemperature);
gcode = gcode.replace(/{preheatTemp}/gi ,preheatTemperature);
gcode = gcode.replace(/{preheatBedTemp}/gi ,preheatBedTemperature);
gcode = gcode.replace(/{printerType}/gi ,printerType);
gcode = gcode.replace(/{if heatedBed}/gi ,heatedBedReplacement);
return gcode;
}

View File

@ -52,14 +52,14 @@
<option value="marlin_generic">Generic Marlin Printer</option>
<option value="makerbot_generic">Generic Makerbot Printer</option>
</select> --><br/>
<label for="printerDimensionsX">Dimensions:</label>
x:<input id="printerDimensionsX" type="number" class="small" name="printer.dimensions.x" placeholder="x">mm<br>
<label for="printerDimensionsY"></label>
y:<input id="printerDimensionsY" type="number" class="small" name="printer.dimensions.y" placeholder="y">mm<br>
<label for="printerDimensionsZ"></label>
z:<input id="printerDimensionsZ" type="number" class="small" name="printer.dimensions.z" placeholder="z">mm<br>
<label for="heatedBed">Heated bed:</label><input id="heatedBed" type="checkbox" name="printer.heatedbed" value="heatedbed"><br>
<fieldset id="gcodePanel">
<legend>GCODE settings</legend>
<div>
@ -79,6 +79,8 @@
<dt>{preheatTemp}</dt><dd>Preheat temperature</dd>
<dt>{preheatBedTemp}</dt><dd>Preheat bed temperature</dd>
<dt>{printerType}</dt><dd>Printer type</dd>
<dt>{if heatedBed}</dt><dd>Enable line if printer has heated bed</dd>
</dl>
</small>
</div>