Retool of macros to remove default_parameters
Due to Klipper deprecating this function
This commit is contained in:
parent
2633ef5647
commit
58e2360fb1
|
|
@ -18,8 +18,6 @@ gcode:
|
|||
{% endif %}
|
||||
|
||||
[gcode_macro _SET_ACC]
|
||||
default_parameter_VAL: RUN
|
||||
default_parameter_HOMING_ACCEL: 500
|
||||
variable_accel: 0
|
||||
variable_accel_to_decel: 0
|
||||
variable_last_val: 'RUN'
|
||||
|
|
@ -28,7 +26,7 @@ gcode:
|
|||
# store old values and apply home value
|
||||
SET_GCODE_VARIABLE MACRO=_SET_ACC VARIABLE=accel VALUE={printer.toolhead.max_accel}
|
||||
SET_GCODE_VARIABLE MACRO=_SET_ACC VARIABLE=accel_to_decel VALUE={printer.toolhead.max_accel_to_decel}
|
||||
{% set accel = HOMING_ACCEL %}
|
||||
{% set accel = HOMING_ACCEL|default(500) %}
|
||||
{% set accel_to_decel = HOMING_ACCEL %}
|
||||
{% elif VAL == 'CONFIG' %}
|
||||
# set all to config values
|
||||
|
|
|
|||
|
|
@ -23,35 +23,19 @@ gcode:
|
|||
|
||||
|
||||
[gcode_macro _SET_Z_CURRENT]
|
||||
default_parameter_VAL: RUN
|
||||
variable_last_val: 'RUN'
|
||||
gcode:
|
||||
{% if VAL == 'HOME' %}
|
||||
{% set z_run = 0.3 %}
|
||||
{% set z1_run = 0.3 %}
|
||||
{% set z2_run = 0.3 %}
|
||||
{% set z3_run = 0.3 %}
|
||||
{% set z_hold = 0.3 %}
|
||||
{% set z1_hold = 0.3 %}
|
||||
{% set z2_hold = 0.3 %}
|
||||
{% set z3_hold = 0.3 %}
|
||||
{% else %}
|
||||
{% set z_run = printer.configfile.settings["tmc2209 stepper_z"]["run_current"] %}
|
||||
{% set z1_run = printer.configfile.settings["tmc2209 stepper_z1"]["run_current"] %}
|
||||
{% set z2_run = printer.configfile.settings["tmc2209 stepper_z2"]["run_current"] %}
|
||||
{% set z3_run = printer.configfile.settings["tmc2209 stepper_z3"]["run_current"] %}
|
||||
{% set z_hold = printer.configfile.settings["tmc2209 stepper_z"]["hold_current"] %}
|
||||
{% set z1_hold = printer.configfile.settings["tmc2209 stepper_z1"]["hold_current"] %}
|
||||
{% set z2_hold = printer.configfile.settings["tmc2209 stepper_z2"]["hold_current"] %}
|
||||
{% set z3_hold = printer.configfile.settings["tmc2209 stepper_z3"]["hold_current"] %}
|
||||
{% endif %}
|
||||
{% if VAL != printer["gcode_macro _SET_Z_CURRENT"].last_val|string %}
|
||||
SET_GCODE_VARIABLE MACRO=_SET_Z_CURRENT VARIABLE=last_val VALUE='"{VAL}"'
|
||||
{action_respond_info("Home&Probe: RunCur %.2f HoldCur %.2f" % (z_run|float, z_hold|float))}
|
||||
SET_TMC_CURRENT STEPPER=stepper_z CURRENT={z_run} HOLDCURRENT={z_hold}
|
||||
SET_TMC_CURRENT STEPPER=stepper_z1 CURRENT={z1_run} HOLDCURRENT={z1_hold}
|
||||
SET_TMC_CURRENT STEPPER=stepper_z2 CURRENT={z2_run} HOLDCURRENT={z2_hold}
|
||||
SET_TMC_CURRENT STEPPER=stepper_z3 CURRENT={z3_run} HOLDCURRENT={z3_hold}
|
||||
M400
|
||||
{% endif %}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,20 +55,8 @@ gcode:
|
|||
|
||||
## Filament Change
|
||||
[gcode_macro M600]
|
||||
default_parameter_X: 50
|
||||
default_parameter_Y: 0
|
||||
default_parameter_Z: 10
|
||||
gcode:
|
||||
M117 Filament Change
|
||||
SAVE_GCODE_STATE NAME=filament_change
|
||||
PAUSE
|
||||
G91 # relative
|
||||
G1 E-1 F300 # retract 1
|
||||
M125 # park
|
||||
M702 # unload
|
||||
M0 Click when filament inserted
|
||||
M701 # load
|
||||
RESTORE_GCODE_STATE NAME=filament_change
|
||||
|
||||
|
||||
## TMC Debugging
|
||||
|
|
@ -104,10 +92,9 @@ gcode:
|
|||
|
||||
## Wait for Chamber Temperature
|
||||
[gcode_macro M191]
|
||||
default_parameter_R: 30
|
||||
default_parameter_S: 30
|
||||
gcode:
|
||||
TEMPERATURE_WAIT SENSOR="temperature_sensor chamber" MINIMUM={S}
|
||||
{% set MIN = params.S|default(30) %}
|
||||
TEMPERATURE_WAIT SENSOR="temperature_sensor chamber" MINIMUM={MIN}
|
||||
|
||||
# M201 - Set Print Max Acceleration
|
||||
[gcode_macro M201]
|
||||
|
|
|
|||
|
|
@ -90,33 +90,28 @@ gcode:
|
|||
#####################################################################
|
||||
[gcode_macro PAUSE]
|
||||
rename_existing: BASE_PAUSE
|
||||
default_parameter_X: 60 #edit to your park position
|
||||
default_parameter_Y: 0 #edit to your park position
|
||||
default_parameter_Z: 5 #edit to your park position
|
||||
default_parameter_E: 0.2 #edit to your retract length
|
||||
gcode:
|
||||
SAVE_GCODE_STATE NAME=PAUSE_state
|
||||
BASE_PAUSE
|
||||
|
||||
# Anti-Stringing
|
||||
G91 ; relative positioning
|
||||
G1 E-{E} F2100 ; retract filament
|
||||
G1 E-{E|default(0.2)} F2100 ; retract filament
|
||||
G1 X1 F20000 ; move 1mm to the side at 333mm/sec
|
||||
G90 ; absolute positioning (avoid G2 in rel mode erroring out)
|
||||
G2 E0 I-1 ; do a no extrusion circle move with a 0.5mm radius centered on orig
|
||||
G91 ; relative positioning (avoid G2 in rel mode erroring out)
|
||||
G1 Z{Z} F3000 ; move up by 5mm @ 50mm/sec to clear the print
|
||||
G1 Z{Z|default(5)} F3000 ; move up by 5mm @ 50mm/sec to clear the print
|
||||
G90 ; absolute positioning
|
||||
|
||||
G1 X{X} Y{Y} F6000 ; Move toolhead to park location
|
||||
G1 X{X|default(60)} Y{Y|default(0)} F6000 ; Move toolhead to park location
|
||||
|
||||
|
||||
[gcode_macro RESUME]
|
||||
rename_existing: BASE_RESUME
|
||||
default_parameter_E: 0.2 #edit to your retract length
|
||||
gcode:
|
||||
G91
|
||||
G1 E{E} F2100
|
||||
G1 E{E|default(0.2)} F2100
|
||||
G90
|
||||
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
|
||||
BASE_RESUME
|
||||
|
|
@ -124,9 +119,6 @@ gcode:
|
|||
|
||||
[gcode_macro CANCEL_PRINT]
|
||||
rename_existing: BASE_CANCEL_PRINT
|
||||
default_parameter_X: 0 #edit to your park position
|
||||
default_parameter_Y: 0 #edit to your park position
|
||||
default_parameter_Z: 117 #edit to your park position
|
||||
gcode:
|
||||
M104 S0
|
||||
M140 S0
|
||||
|
|
|
|||
Loading…
Reference in New Issue