0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 19:13:49 +01:00

Bed temperatures

This commit is contained in:
peteruithoven 2013-10-22 16:00:37 +02:00
parent 8ab87312b3
commit 78a71ca625
2 changed files with 25 additions and 3 deletions

View File

@ -98,7 +98,14 @@ M.printer_baudrate = {
M.printer_temperature = { M.printer_temperature = {
default = 230, default = 230,
type = 'int', type = 'int',
description = '3D printer temperature', description = 'printing temperature',
min = 0
}
M.printer_bed_temperature = {
default = 70,
type = 'int',
description = 'printing bed temperature',
min = 0 min = 0
} }
@ -161,6 +168,12 @@ M.printer_heatup_temperature = {
description = '' description = ''
} }
M.printer_heatup_bed_temperature = {
default = 70,
type = 'int',
description = ''
}
M.printer_retraction_enabled = { M.printer_retraction_enabled = {
default = true, default = true,
type = 'bool', type = 'bool',
@ -195,13 +208,13 @@ M.printer_enableTraveling = {
} }
M.printer_startgcode = { M.printer_startgcode = {
default = ';Generated with Doodle3D\nM109 S{printingTemp} ;set target temperature \nG21 ;metric values\nG91 ;relative positioning\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E10 ;extrude 10mm of feed stock\nG92 E0 ;zero the extruded length again\nG92 E0 ;zero the extruded length again\nG1 F9000\nG90 ;absolute positioning\nM117 Printing Doodle... ;display message (20 characters to clear whole screen)', default = ';Generated with Doodle3D\nM109 S{printingTemp} ;set target temperature \n;M190 S{printingBedTemp} ;set target bed temperature\nG21 ;metric values\nG91 ;relative positioning\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E10 ;extrude 10mm of feed stock\nG92 E0 ;zero the extruded length again\nG92 E0 ;zero the extruded length again\nG1 F9000\nG90 ;absolute positioning\nM117 Printing Doodle... ;display message (20 characters to clear whole screen)',
type = 'string', type = 'string',
description = '' description = ''
} }
M.printer_endgcode = { M.printer_endgcode = {
default = 'M107 ;fan off\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;disable axes / steppers\nG90 ;absolute positioning\nM104 {preheatTemp}\nM117 Done ;display message (20 characters to clear whole screen)', default = 'M107 ;fan off\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;disable axes / steppers\nG90 ;absolute positioning\nM104 S{preheatTemp}\n;M140 S{preheatBedTemp}\nM117 Done ;display message (20 characters to clear whole screen)',
type = 'string', type = 'string',
description = '' description = ''
} }

View File

@ -119,10 +119,19 @@ function M.stop_POST(request, response)
-- replacing {printingTemp} and {preheatTemp} in endgcode -- replacing {printingTemp} and {preheatTemp} in endgcode
local printingTemperature = settings.get('printer.temperature') local printingTemperature = settings.get('printer.temperature')
local printingBedTemperature = settings.get('printer.bed.temperature')
local preheatTemperature = settings.get('printer.heatup.temperature') local preheatTemperature = settings.get('printer.heatup.temperature')
local preheatBedTemperature = settings.get('printer.heatup.bed.temperature')
local endGcode = settings.get('printer.endgcode') local endGcode = settings.get('printer.endgcode')
--log:info(" printingBedTemperature: "..utils.dump(printingBedTemperature))
--log:info(" preheatBedTemperature: "..utils.dump(preheatBedTemperature))
--log:info(" endGcode : "..utils.dump(endGcode))
endGcode = string.gsub(endGcode,"{printingTemp}",printingTemperature) endGcode = string.gsub(endGcode,"{printingTemp}",printingTemperature)
endGcode = string.gsub(endGcode,"{printingBedTemp}",printingBedTemperature)
endGcode = string.gsub(endGcode,"{preheatTemp}",preheatTemperature) endGcode = string.gsub(endGcode,"{preheatTemp}",preheatTemperature)
endGcode = string.gsub(endGcode,"{preheatBedTemp}",preheatBedTemperature)
--log:info(" >endGcode : "..utils.dump(endGcode))
local rv,msg = printer:stopPrint(endGcode) local rv,msg = printer:stopPrint(endGcode)