diff --git a/js_src/gcodeGenerating.js b/js_src/gcodeGenerating.js index c4ff2e2..8d19f59 100644 --- a/js_src/gcodeGenerating.js +++ b/js_src/gcodeGenerating.js @@ -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; } diff --git a/www/settings.html b/www/settings.html index 5e29024..ba7ee3a 100644 --- a/www/settings.html +++ b/www/settings.html @@ -156,7 +156,7 @@