mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-24 10:07:57 +01:00
added printer type replacement in start-gcode
This commit is contained in:
parent
41f8232ebb
commit
8b76a17ef7
@ -291,12 +291,19 @@ function subsituteVariables(gcode) {
|
||||
var bedTemperature = settings["printer.bed.temperature"];
|
||||
var preheatTemperature = settings["printer.heatup.temperature"];
|
||||
var preheatBedTemperature = settings["printer.heatup.bed.temperature"];
|
||||
|
||||
var printerType = settings["printer.type"];
|
||||
|
||||
switch (printerType) {
|
||||
case "makerbot_replicator2": printerType = "r2x"; break;
|
||||
case "makerbot_thingomatic": printerType = "t6"; break;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
return gcode;
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@
|
||||
</fieldset>
|
||||
<fieldset id="x3gSettings">
|
||||
<legend>GCODE settings</legend>
|
||||
<small class="intro">GCODE settings for all printers that use Sailfish firmware, like Makerbots.</small>
|
||||
<small class="intro">GCODE settings for Makerbots.</small>
|
||||
<div class="startgcode_left">
|
||||
<label for="startgcodeX3G">Start:</label><br/>
|
||||
<textarea id="startcodeX3G" class="gcode" name="printer.startcode.x3g"></textarea>
|
||||
@ -172,6 +172,7 @@
|
||||
<dt>{printingBedTemp}</dt><dd>Printing bed temperature</dd>
|
||||
<dt>{preheatTemp}</dt><dd>Preheat temperature</dd>
|
||||
<dt>{preheatBedTemp}</dt><dd>Preheat bed temperature</dd>
|
||||
<dt>{printerType}</dt><dd>Printer type</dd>
|
||||
</dl>
|
||||
</small>
|
||||
</fieldset>
|
||||
|
Loading…
Reference in New Issue
Block a user