mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-25 18:47:57 +01:00
Merge branch 'heatedbedcondition' into develop
This commit is contained in:
commit
fc48b4de85
@ -200,6 +200,7 @@ function subsituteVariables(gcode) {
|
|||||||
var preheatTemperature = settings["printer.heatup.temperature"];
|
var preheatTemperature = settings["printer.heatup.temperature"];
|
||||||
var preheatBedTemperature = settings["printer.heatup.bed.temperature"];
|
var preheatBedTemperature = settings["printer.heatup.bed.temperature"];
|
||||||
var printerType = settings["printer.type"];
|
var printerType = settings["printer.type"];
|
||||||
|
var heatedbed = settings["printer.heatedbed"];
|
||||||
|
|
||||||
switch (printerType) {
|
switch (printerType) {
|
||||||
case "makerbot_replicator2": printerType = "r2"; break;
|
case "makerbot_replicator2": printerType = "r2"; break;
|
||||||
@ -207,12 +208,14 @@ function subsituteVariables(gcode) {
|
|||||||
case "makerbot_thingomatic": printerType = "t6"; break;
|
case "makerbot_thingomatic": printerType = "t6"; break;
|
||||||
case "makerbot_generic": printerType = "r2"; break;
|
case "makerbot_generic": printerType = "r2"; break;
|
||||||
}
|
}
|
||||||
|
var heatedBedReplacement = (heatedbed)? "" : ";";
|
||||||
|
|
||||||
gcode = gcode.replace(/{printingTemp}/gi ,temperature);
|
gcode = gcode.replace(/{printingTemp}/gi ,temperature);
|
||||||
gcode = gcode.replace(/{printingBedTemp}/gi ,bedTemperature);
|
gcode = gcode.replace(/{printingBedTemp}/gi ,bedTemperature);
|
||||||
gcode = gcode.replace(/{preheatTemp}/gi ,preheatTemperature);
|
gcode = gcode.replace(/{preheatTemp}/gi ,preheatTemperature);
|
||||||
gcode = gcode.replace(/{preheatBedTemp}/gi ,preheatBedTemperature);
|
gcode = gcode.replace(/{preheatBedTemp}/gi ,preheatBedTemperature);
|
||||||
gcode = gcode.replace(/{printerType}/gi ,printerType);
|
gcode = gcode.replace(/{printerType}/gi ,printerType);
|
||||||
|
gcode = gcode.replace(/{if heatedBed}/gi ,heatedBedReplacement);
|
||||||
|
|
||||||
return gcode;
|
return gcode;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
y:<input id="printerDimensionsY" type="number" class="small" name="printer.dimensions.y" placeholder="y">mm<br>
|
y:<input id="printerDimensionsY" type="number" class="small" name="printer.dimensions.y" placeholder="y">mm<br>
|
||||||
<label for="printerDimensionsZ"></label>
|
<label for="printerDimensionsZ"></label>
|
||||||
z:<input id="printerDimensionsZ" type="number" class="small" name="printer.dimensions.z" placeholder="z">mm<br>
|
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">
|
<fieldset id="gcodePanel">
|
||||||
<legend>GCODE settings</legend>
|
<legend>GCODE settings</legend>
|
||||||
<div>
|
<div>
|
||||||
@ -79,6 +79,8 @@
|
|||||||
<dt>{preheatTemp}</dt><dd>Preheat temperature</dd>
|
<dt>{preheatTemp}</dt><dd>Preheat temperature</dd>
|
||||||
<dt>{preheatBedTemp}</dt><dd>Preheat bed temperature</dd>
|
<dt>{preheatBedTemp}</dt><dd>Preheat bed temperature</dd>
|
||||||
<dt>{printerType}</dt><dd>Printer type</dd>
|
<dt>{printerType}</dt><dd>Printer type</dd>
|
||||||
|
<dt>{if heatedBed}</dt><dd>Enable line if printer has heated bed</dd>
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user