From 636d00370a7c186a6d0a633aae8836b49defadfe Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Sat, 26 Oct 2013 03:24:30 +0200 Subject: [PATCH] Printer bed size setting --- js_src/gcodeGenerating.js | 9 +++++---- www/settings.html | 4 +++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/js_src/gcodeGenerating.js b/js_src/gcodeGenerating.js index 0ca084a..201cad0 100644 --- a/js_src/gcodeGenerating.js +++ b/js_src/gcodeGenerating.js @@ -31,10 +31,6 @@ var gcode = []; function generate_gcode() { console.log("f:generategcode()"); - // TODO 2013-09-18 evaluate if this should stay here - // this was added when Rick mailed us wrt the Ultimaker delivery of Doodle3D - var gCodeOffsetX = 110; // mm - var gCodeOffsetY = 110; // mm gcode = []; @@ -58,6 +54,11 @@ function generate_gcode() { var retractionamount = settings["printer.retraction.amount"]; var preheatTemperature = settings["printer.heatup.temperature"]; var preheatBedTemperature = settings["printer.heatup.bed.temperature"]; + var printerBedWidth = settings["printer.bed.width"]; + var printerBedHeight = settings["printer.bed.height"]; + + var gCodeOffsetX = printerBedWidth/2; //110; // mm + var gCodeOffsetY = printerBedHeight/2; //110; // mm var startGcode = settings["printer.startgcode"]; startGcode = subsituteVariables(startGcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature); diff --git a/www/settings.html b/www/settings.html index c3b8bd0..8af657e 100644 --- a/www/settings.html +++ b/www/settings.html @@ -48,7 +48,9 @@ - +
+ mm
+ mm