diff --git a/macros.d/start_end.cfg b/macros.d/start_end.cfg index ec67a01..fa4d8a3 100644 --- a/macros.d/start_end.cfg +++ b/macros.d/start_end.cfg @@ -9,38 +9,53 @@ variable_parameter_T_BED: 60 variable_parameter_T_EXTRUDER: 190 gcode: - CLEAR_PAUSE + ##### Get Boundaries ##### + {% set max_x = printer.toolhead.axis_maximum.x|float %} + {% set max_y = printer.toolhead.axis_maximum.y|float %} + {% set max_z = printer.toolhead.axis_maximum.z|float %} + {% set mid_x = max_x / 2 %} + {% set mid_y = max_y / 2 %} - # Perform a G28 'home' (if needed), wait for the bed to finish heating and do a QGL - SMARTHOME - SMARTQGL + CLEAR_PAUSE + G90 + + # Hold the hotend temperature (useful for reprints) + M104 S{printer.extruder.temperature} # Start preheating the bed - M117 Heating bed/toolhead + M117 Heating bed _LCD_KNOB COLOR=RED BLINK=1 M140 S{T_BED} - M104 S{params.T_EXTRUDER|float*0.75} - G0 Z30 F1800 - G0 X175 Y175 Z10 F6000 - # Perform a G28 'home' (if needed), wait for the bed to finish heating and do a QGL + # Perform a G28 'home' (if needed) + SMARTHOME + + # Check to see if we need more time preheating the bed, if so + {% if printer.heater_bed.temperature < params.T_BED|float*0.85 %} + M117 Heating bed to 85% + G1 X{mid_x} Y{mid_y} Z10 F6000 + M106 + M190 S{params.T_BED|float*0.85} + {% endif %} + + M117 Heating bed/toolhead + {% if printer.extruder.temperature < params.T_EXTRUDER|float*0.75 %} + M104 S{params.T_EXTRUDER|float*0.75} + {% endif %} M190 S{T_BED} - ;LOAD_MESH_TEMP BED_TEMPERATURE{T_BED} - BED_MESH_PROFILE LOAD=default - - # Hover over purge bucket, wait for the hotend to finish, then purge/wipe and rehome Z - G0 X46 Y350 Z10 F18000 - M109 S{T_EXTRUDER} - clean_nozzle - G28 Z + M107 # Move the nozzle near the bed - G0 X4.1 Y0.1 Z2.0 F6000 + G1 X0.1 Y0.1 Z2.0 F6000 G1 Z0.3 F6000 + M117 Heating toolhead + M109 S{T_EXTRUDER} + # Prime line PRIME_EXTRUDER - M117 + M117 Printing + [gcode_macro END_PRINT] @@ -77,11 +92,12 @@ gcode: G92 E0 G1 E-2 F1800 G91 - G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing + G0 Z{z_safe} F3600 + G0 X{x_safe} Y{y_safe} F20000 ; move nozzle to remove stringing TURN_OFF_HEATERS M107 G90 - G0 X46 Y350 F18000 ; Park over purge bucket + G0 X60 Y{max_y} F18000 BED_MESH_CLEAR M300 ; Play a tone _LCD_KNOB COLOR=GREEN