Skip to content

Commit

Permalink
added bedmesh_renew
Browse files Browse the repository at this point in the history
removed IdeaMaker retraction workaround
  • Loading branch information
matti125 committed Nov 18, 2021
1 parent 35f6f40 commit bad28bf
Showing 1 changed file with 31 additions and 25 deletions.
56 changes: 31 additions & 25 deletions macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,16 @@ gcode:
{% endif %}
#set extruder to abs mode
M82
{% if ( (printer.extruder.target|int > 0) and (printer.extruder1.target|int > 0) ) %}
#Two extruders in use, do nothing
RESPOND MSG="Two heads in use, Ideamaker does not do retracting"
{% else %}
#Ideamaker insists on retracting at the start. Now we just make it think it already has. Ugly kluldge, yes.
RESPOND MSG="One of two heads in use, Ideamaker spoils the print by retracting, so work around it"
G92 E-0.6
{% endif %}
# {% if ( (printer.extruder.target|int > 0) and (printer.extruder1.target|int > 0) ) %}
# #Two extruders in use, do nothing
# RESPOND MSG="Two heads in use, Ideamaker does not do retracting"
# {% else %}
# #Ideamaker insists on retracting at the start. Now we just make it think it already has. Ugly kluldge, yes.
# RESPOND MSG="One of two heads in use, Ideamaker spoils the print by retracting, so work around it"
# G92 E-0.6
# {% endif %}
# RESPOND MSG="Superslicer spoils the print by retracting, so work around it"
# G92 E-0.6

[gcode_macro set_temperatures]
gcode:
Expand Down Expand Up @@ -231,18 +233,14 @@ gcode:
#Always measure with raw left head
G90
SET_GCODE_OFFSET X=0
G0 Z10 F5000
# G0 X110 Y80 F12000
#"prime" the probe
# probe
# G0 Z3
G0 Z10 F6000
BED_MESH_CALIBRATE
G0 Z20 F5000
G0 Y0 Z100
G28 X
RESTORE_GCODE_STATE NAME=bedmesh
{% endif %}



[gcode_macro probeon]
gcode:
SET_GCODE_VARIABLE MACRO=bedmesh VARIABLE=probe_installed VALUE=1
Expand All @@ -261,22 +259,29 @@ gcode:
##### get target get temperature #####
{% set bed_temp = printer.heater_bed.target|int %}
##### join everything to a single mesh name #####
{% set mesh_name = "BED_TEMP-" + bed_temp|string + "C" %}
{% set mesh_name = "MESH-" + bed_temp|string + "C" %}
##### end of definitions #####
{% if printer.configfile.config["bed_mesh " + mesh_name] is defined %}
BED_MESH_CLEAR
BED_MESH_PROFILE LOAD={mesh_name}
RESPOND TYPE=echo MSG="Loaded bed mesh profile of {mesh_name} "
{% else %}
RESPOND TYPE=error MSG="Did not find a mesh profile of {mesh_name} "
RESPOND TYPE=error MSG="Did not find a mesh profile of {mesh_name} "
{% endif %}

#[gcode_macro renew_all_mesh]
#gcode:
# {% for t in [60,65,70] %}
# RESPOND MSG="Heating "{t}
# M190 S{t}
# {% endfor %}
[gcode_macro bedmesh_renew]
gcode:
home_if_not
{% set dwell = 120000 %}
{% for t in [55,60,65,70,75,80,85] %}
{% set mesh_name = "MESH-" + t|string + "C" %}
RESPOND MSG="Heating the bed to {t} C"
M190 S{t}
RESPOND MSG="Settling for {dwell}ms"
G4 P{dwell}
bedmesh
BED_MESH_PROFILE SAVE={mesh_name}
{% endfor %}
SAVE_CONFIG

[gcode_macro END_PRINT]
gcode:
Expand All @@ -290,8 +295,9 @@ gcode:
# G90 ; absolute positioning
# G0 Y220 F6000 ; make the printed object accessible
m104 S0 ; turn hotend heating off
M140 S0 ; tuen hotbed heating off
M140 S0 ; turn hotbed heating off
G90
T0
SET_DUAL_CARRIAGE CARRIAGE=0
G0 X70 Y140 F5000
SET_DUAL_CARRIAGE CARRIAGE=1
Expand Down

0 comments on commit bad28bf

Please sign in to comment.