mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 09:17:56 +01:00
Added bed temperature settings and replacement patterns
This commit is contained in:
parent
d06008b3dc
commit
4899f7f510
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
|
||||
.project
|
||||
|
||||
node_modules/*
|
||||
|
@ -49,6 +49,7 @@ function generate_gcode() {
|
||||
var layerHeight = settings["printer.layerHeight"];
|
||||
var maxObjectHeight = settings["printer.maxObjectHeight"];
|
||||
var temperature = settings["printer.temperature"];
|
||||
var bedTemperature = settings["printer.bed.temperature"];
|
||||
var useSubLayers = settings["printer.useSubLayers"];
|
||||
var enableTraveling = settings["printer.enableTraveling"];
|
||||
var retractionEnabled = settings["printer.retraction.enabled"];
|
||||
@ -56,15 +57,14 @@ function generate_gcode() {
|
||||
var retractionminDistance = settings["printer.retraction.minDistance"];
|
||||
var retractionamount = settings["printer.retraction.amount"];
|
||||
var preheatTemperature = settings["printer.heatup.temperature"];
|
||||
var preheatBedTemperature = settings["printer.heatup.bed.temperature"];
|
||||
|
||||
var startGcode = settings["printer.startgcode"];
|
||||
startGcode = startGcode.replace("{printingTemp}",temperature);
|
||||
startGcode = startGcode.replace("{preheatTemp}",preheatTemperature);
|
||||
startGcode = subsituteVariables(startGcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature);
|
||||
startGcode = startGcode.split("\n");
|
||||
|
||||
var endGcode = settings["printer.endgcode"];
|
||||
endGcode = endGcode.replace("{printingTemp}",temperature);
|
||||
endGcode = endGcode.replace("{preheatTemp}",preheatTemperature);
|
||||
endGcode = subsituteVariables(endGcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature);
|
||||
endGcode = endGcode.split("\n");
|
||||
|
||||
/*
|
||||
@ -260,6 +260,16 @@ function generate_gcode() {
|
||||
return gcode;
|
||||
}
|
||||
|
||||
function subsituteVariables(gcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature) {
|
||||
|
||||
gcode = gcode.replace(/{printingTemp}/gi ,temperature);
|
||||
gcode = gcode.replace(/{printingBedTemp}/gi ,bedTemperature);
|
||||
gcode = gcode.replace(/{preheatTemp}/gi ,preheatTemperature);
|
||||
gcode = gcode.replace(/{preheatBedTemp}/gi ,preheatBedTemperature);
|
||||
|
||||
return gcode;
|
||||
}
|
||||
|
||||
function scaleFunction(percent) {
|
||||
var r = 1.0;
|
||||
|
||||
|
@ -76,7 +76,7 @@ $(function() {
|
||||
$("#debug_display").css("display", "block");
|
||||
|
||||
// show and hide the progressguage and thermometer
|
||||
showhideInterval = setInterval(showOrHideThermo, 2500);
|
||||
//showhideInterval = setInterval(showOrHideThermo, 2500);
|
||||
|
||||
// $("#debugContainer").css("display", "block");
|
||||
|
||||
|
@ -102,3 +102,8 @@ form .errorMsg {
|
||||
color: #f00;
|
||||
margin: 0 0 0 1em;
|
||||
}
|
||||
form dl dt {
|
||||
float: left;
|
||||
font-style: italic;
|
||||
width: 10em;
|
||||
}
|
@ -2215,6 +2215,7 @@ function generate_gcode() {
|
||||
var layerHeight = settings["printer.layerHeight"];
|
||||
var maxObjectHeight = settings["printer.maxObjectHeight"];
|
||||
var temperature = settings["printer.temperature"];
|
||||
var bedTemperature = settings["printer.bed.temperature"];
|
||||
var useSubLayers = settings["printer.useSubLayers"];
|
||||
var enableTraveling = settings["printer.enableTraveling"];
|
||||
var retractionEnabled = settings["printer.retraction.enabled"];
|
||||
@ -2222,15 +2223,14 @@ function generate_gcode() {
|
||||
var retractionminDistance = settings["printer.retraction.minDistance"];
|
||||
var retractionamount = settings["printer.retraction.amount"];
|
||||
var preheatTemperature = settings["printer.heatup.temperature"];
|
||||
var preheatBedTemperature = settings["printer.heatup.bed.temperature"];
|
||||
|
||||
var startGcode = settings["printer.startgcode"];
|
||||
startGcode = startGcode.replace("{printingTemp}",temperature);
|
||||
startGcode = startGcode.replace("{preheatTemp}",preheatTemperature);
|
||||
startGcode = subsituteVariables(startGcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature);
|
||||
startGcode = startGcode.split("\n");
|
||||
|
||||
var endGcode = settings["printer.endgcode"];
|
||||
endGcode = endGcode.replace("{printingTemp}",temperature);
|
||||
endGcode = endGcode.replace("{preheatTemp}",preheatTemperature);
|
||||
endGcode = subsituteVariables(endGcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature);
|
||||
endGcode = endGcode.split("\n");
|
||||
|
||||
/*
|
||||
@ -2426,6 +2426,16 @@ function generate_gcode() {
|
||||
return gcode;
|
||||
}
|
||||
|
||||
function subsituteVariables(gcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature) {
|
||||
|
||||
gcode = gcode.replace(/{printingTemp}/gi ,temperature);
|
||||
gcode = gcode.replace(/{printingBedTemp}/gi ,bedTemperature);
|
||||
gcode = gcode.replace(/{preheatTemp}/gi ,preheatTemperature);
|
||||
gcode = gcode.replace(/{preheatBedTemp}/gi ,preheatBedTemperature);
|
||||
|
||||
return gcode;
|
||||
}
|
||||
|
||||
function scaleFunction(percent) {
|
||||
var r = 1.0;
|
||||
|
||||
@ -3333,7 +3343,7 @@ $(function() {
|
||||
$("#debug_display").css("display", "block");
|
||||
|
||||
// show and hide the progressguage and thermometer
|
||||
showhideInterval = setInterval(showOrHideThermo, 2500);
|
||||
//showhideInterval = setInterval(showOrHideThermo, 2500);
|
||||
|
||||
// $("#debugContainer").css("display", "block");
|
||||
|
||||
|
2
www/js/doodle3d-client.min.js
vendored
2
www/js/doodle3d-client.min.js
vendored
File diff suppressed because one or more lines are too long
@ -61,6 +61,7 @@
|
||||
<label for="wallThickness">Wall thickness:</label><input id="wallThickness" type="number" step="0.1" class="small" name="printer.wallThickness">mm<br>
|
||||
<label for="filamentThickness">Filament thickness:</label><input id="filamentThickness" step="0.01" type="number" class="small" name="printer.filamentThickness">mm<br>
|
||||
<label for="temperature">Temperature:</label><input id="temperature" type="number" class="small" name="printer.temperature">degrees C<br>
|
||||
<label for="bedTemperature">Bed temperature:</label><input id="bedTemperature" type="number" class="small" name="printer.bed.temperature">degrees C<br>
|
||||
<br>
|
||||
<label for="speed">Speed:</label><input id="speed" type="number" name="printer.speed" class="small">mm/s<br>
|
||||
<label for="travelSpeed">Travel speed:</label><input id="travelSpeed" type="number" name="printer.travelSpeed" class="small">mm/s<br>
|
||||
@ -75,7 +76,8 @@
|
||||
<label for="retractionSpeed">Retraction speed:</label><input id="retractionSpeed" type="number" class="small" name="printer.retraction.speed">mm/s<br>
|
||||
<br>
|
||||
<label for="heatupEnabled">Auto preheat:</label><input id="heatupEnabled" type="checkbox" name="printer.heatup.enabled" value="heatupEnabled"><br>
|
||||
<label for="heatupTemperature">Auto preheat temperature:</label><input id="heatupTemperature" type="number" class="small" name="printer.heatup.temperature"><br>
|
||||
<label for="heatupTemperature">Preheat temperature:</label><input id="heatupTemperature" type="number" class="small" name="printer.heatup.temperature"><br>
|
||||
<label for="heatupBedTemperature">Preheat bed temperature:</label><input id="heatupBedTemperature" type="number" class="small" name="printer.heatup.bed.temperature"><br>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="doodlesettings">
|
||||
@ -142,7 +144,15 @@
|
||||
<label for="endgcode">End:</label><br/>
|
||||
<textarea id="endgcode" class="gcode" name="printer.endgcode"></textarea>
|
||||
</div>
|
||||
<small>The text <em>{printingTemp}</em> will be replaced by the printing temperature and <em>{preheatTemp}</em> will be replaced by the preheat temperature.</small>
|
||||
<small>
|
||||
The following texts are replaced:
|
||||
<dl>
|
||||
<dt>{printingTemp}</dt><dd>Printing temperature</dd>
|
||||
<dt>{printingBedTemp}</dt><dd>Printing bed temperature</dd>
|
||||
<dt>{preheatTemp}</dt><dd>Preheat temperature</dd>
|
||||
<dt>{preheatBedTemp}</dt><dd>Preheat bed temperature</dd>
|
||||
</dl>
|
||||
</small>
|
||||
</fieldset>
|
||||
</form><br/>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user