Update 6.0.0

This commit is contained in:
Cyril 2024-05-01 16:10:07 +02:00
parent bb0b7539a0
commit c8db437b79
63 changed files with 3667 additions and 737 deletions

View file

@ -0,0 +1,176 @@
########################################
# M600 Support
########################################
[respond]
[idle_timeout]
gcode:
RESPOND TYPE=command MSG="Stopping hotend heating..."
M104 S0
timeout: 99999999
[filament_switch_sensor filament_sensor]
pause_on_runout: false
switch_pin: !PC15
runout_gcode:
M600
[gcode_macro _UNLOAD_FILAMENT]
gcode:
RESTORE_E_CURRENT
M109 S{printer['gcode_macro PRINTER_PARAM'].hotend_temp|int}
RESPOND TYPE=command MSG="Unloading filament..."
M83
G1 E10 F300
G1 E-15 F3000
G1 E-22.4700 F2400
G1 E-6.4200 F1200
G1 E-3.2100 F720
G1 E5.0000 F356
G1 E-5.0000 F384
G1 E5.0000 F412
G1 E-5.0000 F440
G1 E5.0000 F467
G1 E-5.0000 F495
G1 E5.0000 F523
G1 E-5.0000 F3000
G1 E-15 F3000
SET_E_MIN_CURRENT
[gcode_macro _LOAD_FILAMENT]
gcode:
RESTORE_E_CURRENT
M109 S{printer['gcode_macro PRINTER_PARAM'].hotend_temp|int}
RESPOND TYPE=command MSG="Loading filament..."
G91
G1 E100 F180
G90
M400
SET_E_MIN_CURRENT
[gcode_macro _PURGE_MORE]
gcode:
RESTORE_E_CURRENT
M109 S{printer['gcode_macro PRINTER_PARAM'].hotend_temp|int}
RESPOND TYPE=command MSG="Purging filament..."
G91
G1 E10 F180
G90
M400
SET_E_MIN_CURRENT
[gcode_macro M600]
description: Filament Change
variable_m600_state: 0
variable_fan0_speed: 0
gcode:
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
{% set y_park = printer.toolhead.axis_minimum.y|float + 5.0 %}
{% set x_park = printer.toolhead.axis_maximum.x|float - 10.0 %}
{% set max_z = printer["gcode_macro PRINTER_PARAM"].max_z_position|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% set z_safe = 0.0 %}
{% if act_z < 48.0 %}
{% set z_safe = 50.0 - act_z %}
{% elif act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% elif act_z < max_z %}
{% set z_safe = max_z - act_z %}
{% endif %}
{action_respond_info("z_safe = %s"% (z_safe))}
SET_GCODE_VARIABLE MACRO=M600 VARIABLE=m600_state VALUE=1
SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=hotend_temp VALUE={printer.extruder.target}
SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=z_safe_pause VALUE={z_safe|float}
RESPOND TYPE=command MSG="Print paused for filament change!"
PAUSE_BASE
G91
{% if "xyz" in printer.toolhead.homed_axes %}
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-1.0 F180
G1 E-{E} F4000
{% else %}
RESPOND TYPE=command MSG="Extruder not hot enough!"
{% endif %}
G1 Z{z_safe} F600
M400
G90
G1 X{x_park} Y{y_park} F12000
{% endif %}
_UNLOAD_FILAMENT
SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=fan2_speed VALUE={printer['output_pin fan2'].value}
SET_GCODE_VARIABLE MACRO=M600 VARIABLE=fan0_speed VALUE={printer['output_pin fan0'].value}
M106 P0 S0
M106 P2 S0
SET_IDLE_TIMEOUT TIMEOUT=900
SET_E_MIN_CURRENT
RESPOND TYPE=command MSG="action:prompt_begin Filament change detected!"
RESPOND TYPE=command MSG="action:prompt_text A necessary filament change has been detected. Please replace filament, LOAD it and click RESUME button."
RESPOND TYPE=command MSG="action:prompt_button UNLOAD FILAMENT|_UNLOAD_FILAMENT|secondary"
RESPOND TYPE=command MSG="action:prompt_button LOAD FILAMENT|_LOAD_FILAMENT|secondary"
RESPOND TYPE=command MSG="action:prompt_button PURGE MORE FILAMENT|_PURGE_MORE|secondary"
RESPOND TYPE=command MSG="action:prompt_footer_button CANCEL PRINT|CANCEL_PRINT|error"
RESPOND TYPE=command MSG="action:prompt_footer_button IGNORE|RESPOND TYPE=command MSG=action:prompt_end|warning"
RESPOND TYPE=command MSG="action:prompt_footer_button RESUME|RESUME|primary"
RESPOND TYPE=command MSG="action:prompt_show"
[gcode_macro RESUME]
description: Resume the current print
rename_existing: RESUME_BASE
gcode:
RESTORE_E_CURRENT
{% if printer['gcode_macro PRINTER_PARAM'].hotend_temp|int != 0 %}
{% if printer['gcode_macro PRINTER_PARAM'].hotend_temp|int > printer.extruder.temperature %}
RESPOND TYPE=command MSG="Starting hotend heating..."
M109 S{printer['gcode_macro PRINTER_PARAM'].hotend_temp|int}
{% else %}
RESPOND TYPE=command MSG="Starting hotend heating..."
M104 S{printer['gcode_macro PRINTER_PARAM'].hotend_temp|int}
{% endif %}
SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=hotend_temp VALUE=0
{% endif %}
{% if printer['gcode_macro PRINTER_PARAM'].fan2_speed > 0 %}
{% set s_value = (printer['gcode_macro PRINTER_PARAM'].fan2_speed * 255 - printer['gcode_macro PRINTER_PARAM'].fan2_min) * 255 / (255 - printer['gcode_macro PRINTER_PARAM'].fan2_min)|float %}
M106 P2 S{s_value} G1
{% endif %}
{% if printer['gcode_macro M600'].m600_state != 1 %}
{% set z_resume_move = printer['gcode_macro PRINTER_PARAM'].z_safe_pause|int %}
{% if z_resume_move > 2 %}
{% set z_resume_move = z_resume_move - 2 %}
G91
G1 Z-{z_resume_move} F600
M400
{% endif %}
{% endif %}
{% set E = printer["gcode_macro PAUSE"].extrude|float + 1.0 %}
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
{% if printer["gcode_macro M600"].m600_state == 1 %}
{% if printer['gcode_macro M600'].fan0_speed > 0 %}
{% set s_value = (printer['gcode_macro M600'].fan0_speed * 255 - printer['gcode_macro PRINTER_PARAM'].fan0_min) * 255 / (255 - printer['gcode_macro PRINTER_PARAM'].fan0_min)|float %}
M106 P0 S{s_value} G1
{% endif %}
SET_GCODE_VARIABLE MACRO=M600 VARIABLE=m600_state VALUE=0
SET_IDLE_TIMEOUT TIMEOUT=99999999
{% else %}
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
G90
M400
{% else %}
RESPOND TYPE=command MSG="Extruder not hot enough!"
{% endif %}
{% endif %}
RESPOND TYPE=command MSG="action:prompt_end"
RESPOND TYPE=command MSG="Restarting print..."
RESUME_BASE {get_params}

View file

@ -18,6 +18,53 @@ runout_gcode:
M600
[gcode_macro _UNLOAD_FILAMENT]
gcode:
RESTORE_E_CURRENT
M109 S{printer['gcode_macro PRINTER_PARAM'].hotend_temp|int}
RESPOND TYPE=command MSG="Unloading filament..."
M83
G1 E10 F300
G1 E-15 F3000
G1 E-22.4700 F2400
G1 E-6.4200 F1200
G1 E-3.2100 F720
G1 E5.0000 F356
G1 E-5.0000 F384
G1 E5.0000 F412
G1 E-5.0000 F440
G1 E5.0000 F467
G1 E-5.0000 F495
G1 E5.0000 F523
G1 E-5.0000 F3000
G1 E-15 F3000
SET_E_MIN_CURRENT
[gcode_macro _LOAD_FILAMENT]
gcode:
RESTORE_E_CURRENT
M109 S{printer['gcode_macro PRINTER_PARAM'].hotend_temp|int}
RESPOND TYPE=command MSG="Loading filament..."
G91
G1 E100 F180
G90
M400
SET_E_MIN_CURRENT
[gcode_macro _PURGE_MORE]
gcode:
RESTORE_E_CURRENT
M109 S{printer['gcode_macro PRINTER_PARAM'].hotend_temp|int}
RESPOND TYPE=command MSG="Purging filament..."
G91
G1 E10 F180
G90
M400
SET_E_MIN_CURRENT
[gcode_macro M600]
description: Filament Change
variable_m600_state: 0
@ -55,22 +102,22 @@ gcode:
G90
G1 X{x_park} Y{y_park} F30000
{% endif %}
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
RESPOND TYPE=command MSG="Extracting filament..."
G1 E20 F180
G1 E-30 F180
G1 E-50 F2000
{% else %}
RESPOND TYPE=command MSG="Extruder not hot enough!"
{% endif %}
_UNLOAD_FILAMENT
SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=fan2_speed VALUE={printer['output_pin fan2'].value}
SET_GCODE_VARIABLE MACRO=M600 VARIABLE=fan0_speed VALUE={printer['output_pin fan0'].value}
M106 P0 S0
M106 P2 S0
SET_IDLE_TIMEOUT TIMEOUT=900
SET_E_MIN_CURRENT
RESPOND TYPE=command MSG="Replace filament at the extruder inlet and click on Resume button!"
RESPOND TYPE=command MSG="action:prompt_begin Filament change detected!"
RESPOND TYPE=command MSG="action:prompt_text A necessary filament change has been detected. Please replace filament, LOAD it and click RESUME button."
RESPOND TYPE=command MSG="action:prompt_button UNLOAD FILAMENT|_UNLOAD_FILAMENT|secondary"
RESPOND TYPE=command MSG="action:prompt_button LOAD FILAMENT|_LOAD_FILAMENT|secondary"
RESPOND TYPE=command MSG="action:prompt_button PURGE MORE FILAMENT|_PURGE_MORE|secondary"
RESPOND TYPE=command MSG="action:prompt_footer_button CANCEL PRINT|CANCEL_PRINT|error"
RESPOND TYPE=command MSG="action:prompt_footer_button IGNORE|RESPOND TYPE=command MSG=action:prompt_end|warning"
RESPOND TYPE=command MSG="action:prompt_footer_button RESUME|RESUME|primary"
RESPOND TYPE=command MSG="action:prompt_show"
[gcode_macro RESUME]
@ -108,15 +155,6 @@ gcode:
{% set get_params = "" %}
{% endif %}
{% if printer["gcode_macro M600"].m600_state == 1 %}
{% if printer.extruder.can_extrude|lower == 'true' %}
RESPOND TYPE=command MSG="Loading and purging filament..."
G91
G1 E100 F180
G90
M400
{% else %}
RESPOND TYPE=command MSG="Extruder not hot enough!"
{% endif %}
{% if printer['gcode_macro M600'].fan0_speed > 0 %}
{% set s_value = (printer['gcode_macro M600'].fan0_speed * 255 - printer['gcode_macro PRINTER_PARAM'].fan0_min) * 255 / (255 - printer['gcode_macro PRINTER_PARAM'].fan0_min)|float %}
M106 P0 S{s_value}
@ -133,5 +171,6 @@ gcode:
RESPOND TYPE=command MSG="Extruder not hot enough!"
{% endif %}
{% endif %}
RESPOND TYPE=command MSG="action:prompt_end"
RESPOND TYPE=command MSG="Restarting print..."
RESUME_BASE {get_params}

View file

@ -5,7 +5,7 @@
[respond]
[duplicate_pin_override]
pins: PC0, PC5, PB2, ADC_TEMPERATURE
pins: PC0, PC5, PB2, PC6, ADC_TEMPERATURE
[temperature_fan chamber_fan]
@ -25,7 +25,7 @@ max_speed: 1.0
min_speed: 0.0
[temperature_fan mcu_fan]
[temperature_fan soc_fan]
pin: PB2
cycle_time: 0.0100
hardware_pwm: false
@ -39,9 +39,10 @@ max_delta: 2
target_temp: 50.0
max_speed: 1.0
min_speed: 0.0
tachometer_pin:PC6
[output_pin mcu_fan]
[output_pin soc_fan]
pin: PB2
pwm: True
cycle_time: 0.0100

View file

@ -0,0 +1,232 @@
########################################
# Useful Macros
########################################
[gcode_shell_command Klipper_Backup]
command: sh /usr/data/helper-script/files/scripts/useful_macros.sh -backup_klipper
timeout: 600.0
verbose: true
[gcode_shell_command Klipper_Restore]
command: sh /usr/data/helper-script/files/scripts/useful_macros.sh -restore_klipper
timeout: 600.0
verbose: true
[gcode_shell_command Moonraker_Backup]
command: sh /usr/data/helper-script/files/scripts/useful_macros.sh -backup_moonraker
timeout: 600.0
verbose: true
[gcode_shell_command Moonraker_Restore]
command: sh /usr/data/helper-script/files/scripts/useful_macros.sh -restore_moonraker
timeout: 600.0
verbose: true
[gcode_shell_command Reload_Camera]
command: sh /usr/data/helper-script/files/scripts/useful_macros.sh -reload_camera
timeout: 600.0
verbose: true
[gcode_macro _KLIPPER_BACKUP]
gcode:
RUN_SHELL_COMMAND CMD=Klipper_Backup
RESPOND TYPE=command MSG="action:prompt_end"
[gcode_macro _KLIPPER_RESTORE]
gcode:
RUN_SHELL_COMMAND CMD=Klipper_Restore
RESPOND TYPE=command MSG="action:prompt_end"
[gcode_macro _MOONRAKER_BACKUP]
gcode:
RUN_SHELL_COMMAND CMD=Moonraker_Backup
RESPOND TYPE=command MSG="action:prompt_end"
[gcode_macro _MOONRAKER_RESTORE]
gcode:
RUN_SHELL_COMMAND CMD=Moonraker_Restore
RESPOND TYPE=command MSG="action:prompt_end"
[gcode_macro KLIPPER_BACKUP_CONFIG]
description: Backup Klipper configuration files
gcode:
RESPOND TYPE=command MSG="action:prompt_begin Backup Klipper configuration files"
RESPOND TYPE=command MSG="action:prompt_text Do you want to backup Klipper configuration files?"
RESPOND TYPE=command MSG="action:prompt_footer_button CANCEL|RESPOND TYPE=command MSG="action:prompt_end"|error"
RESPOND TYPE=command MSG="action:prompt_footer_button BACKUP|_KLIPPER_BACKUP|primary"
RESPOND TYPE=command MSG="action:prompt_show"
[gcode_macro KLIPPER_RESTORE_CONFIG]
description: Restore Klipper configuration files
gcode:
RESPOND TYPE=command MSG="action:prompt_begin Restore Klipper configuration files"
RESPOND TYPE=command MSG="action:prompt_text Do you want to restore Klipper configuration files?"
RESPOND TYPE=command MSG="action:prompt_footer_button CANCEL|RESPOND TYPE=command MSG="action:prompt_end"|error"
RESPOND TYPE=command MSG="action:prompt_footer_button RESTORE|_KLIPPER_RESTORE|primary"
RESPOND TYPE=command MSG="action:prompt_show"
[gcode_macro MOONRAKER_BACKUP_DATABASE]
description: Backup Moonraker database
gcode:
RESPOND TYPE=command MSG="action:prompt_begin Backup Moonraker database"
RESPOND TYPE=command MSG="action:prompt_text Do you want to backup Moonraker database?"
RESPOND TYPE=command MSG="action:prompt_footer_button CANCEL|RESPOND TYPE=command MSG="action:prompt_end"|error"
RESPOND TYPE=command MSG="action:prompt_footer_button BACKUP|_MOONRAKER_BACKUP|primary"
RESPOND TYPE=command MSG="action:prompt_show"
[gcode_macro MOONRAKER_RESTORE_DATABASE]
description: Restore Moonraker database
gcode:
RESPOND TYPE=command MSG="action:prompt_begin Restore Moonraker database"
RESPOND TYPE=command MSG="action:prompt_text Do you want to restore Moonraker database?"
RESPOND TYPE=command MSG="action:prompt_footer_button CANCEL|RESPOND TYPE=command MSG="action:prompt_end"|error"
RESPOND TYPE=command MSG="action:prompt_footer_button RESTORE|_MOONRAKER_RESTORE|primary"
RESPOND TYPE=command MSG="action:prompt_show"
[gcode_macro RELOAD_CAMERA]
description: Reload camera service
gcode:
RUN_SHELL_COMMAND CMD=Reload_Camera
[gcode_macro BED_LEVELING]
description: Start Bed Leveling
gcode:
{% if 'PROBE_COUNT' in params|upper %}
{% set get_count = ('PROBE_COUNT=' + params.PROBE_COUNT) %}
{%else %}
{% set get_count = "" %}
{% endif %}
{% set bed_temp = printer.custom_macro.default_bed_temp %}
{% set extruder_temp = printer.custom_macro.g28_ext_temp %}
{% set nozzle_clear_temp = printer.custom_macro.default_extruder_temp %}
{% if 'BED_TEMP' in params|upper %}
{% set bed_temp = params.BED_TEMP %}
{% endif %}
{% if 'EXTRUDER_TEMP' in params|upper %}
{% set nozzle_clear_temp = params.EXTRUDER_TEMP %}
{% endif %}
SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0
SET_TEMPERATURE_FAN_TARGET temperature_fan=soc_fan target=5
M109 S140
{% if printer.toolhead.homed_axes != "xyz" %}
G28
{% endif %}
BED_MESH_CLEAR
NOZZLE_CLEAR HOT_MIN_TEMP={hotend_temp} HOT_MAX_TEMP={nozzle_clear_temp} BED_MAX_TEMP={bed_temp}
M204 S5000
SET_VELOCITY_LIMIT ACCEL_TO_DECEL=5000
BED_MESH_CALIBRATE {get_count}
BED_MESH_OUTPUT
{% set y_park = printer.toolhead.axis_maximum.y/2 %}
{% set x_park = printer.toolhead.axis_maximum.x|float - 10.0 %}
G1 X{x_park} Y{y_park} F3600
TURN_OFF_HEATERS
SET_TEMPERATURE_FAN_TARGET temperature_fan=soc_fan target=45
SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=1
[gcode_macro PID_BED]
description: Start Bed PID
gcode:
G90
{% if printer.toolhead.homed_axes != "xyz" %}
G28
{% endif %}
G1 Z10 F600
M106
PID_CALIBRATE HEATER=heater_bed TARGET={params.BED_TEMP|default(70)}
M107
{% set y_park = printer.toolhead.axis_maximum.y/2 %}
{% set x_park = printer.toolhead.axis_maximum.x|float - 10.0 %}
G1 X{x_park} Y{y_park} F6000
[gcode_macro PID_HOTEND]
description: Start Hotend PID
gcode:
G90
{% if printer.toolhead.homed_axes != "xyz" %}
G28
{% endif %}
G1 Z10 F600
M106
PID_CALIBRATE HEATER=extruder TARGET={params.HOTEND_TEMP|default(250)}
M107
{% set y_park = printer.toolhead.axis_maximum.y/2 %}
{% set x_park = printer.toolhead.axis_maximum.x|float - 10.0 %}
G1 X{x_park} Y{y_park} F6000
WAIT_TEMP_START
[gcode_macro WARMUP]
description: Stress Test
variable_maxd: 14142.14 ; = SQRT(2*maxy)
gcode:
{% set min_loops = 2 %}
{% set max_loops = params.LOOPS|default(3)|int %}
{% if 'LOOPS' in params|upper %}
{% if max_loops < min_loops %}
{% set max_loops = min_loops %}
{% endif %}
{% endif %}
{% set loop_cnt = max_loops %}
{% set maxx = params.X_ACCEL_MAX|default(10000)|int %}
{% set maxy = params.Y_ACCEL_MAX|default(10000)|int %}
{% set max_x = (printer.toolhead.axis_maximum.x|int-5) %}
{% set max_y = (printer.toolhead.axis_maximum.y|int-5) %}
{% set loop_step_y = max_y//(loop_cnt-1) %}
{% set loop_step_x = max_x//(loop_cnt-1) %}
{% set y_park = printer.toolhead.axis_maximum.y/2 %}
{% set x_park = printer.toolhead.axis_maximum.x|float - 10.0 %}
{% if printer.toolhead.homed_axes != "xyz" %}
G28
{% endif %}
SET_VELOCITY_LIMIT ACCEL={maxx} ACCEL_TO_DECEL={maxx/2}
{% for number in range(10,max_y+11,loop_step_y) %}
{% if number >= max_y %}
{% set number = max_y %}
{% endif %}
G1 F{maxy} X10 Y{number}
G1 F{maxx} X{max_x} Y{number}
{% endfor %}
SET_VELOCITY_LIMIT ACCEL={maxy} ACCEL_TO_DECEL={maxy/2}
{% for number in range(10,max_x+11,loop_step_y) %}
{% if number >= max_x %}
{% set number = max_x %}
{% endif %}
G1 F{maxy} X{number} Y{max_y}
G1 F{maxy} X{number} Y10
{% endfor %}
SET_VELOCITY_LIMIT ACCEL={maxd} ACCEL_TO_DECEL={maxd/2}
{% for times in range(loop_cnt) %}
G1 F{maxx} X10 Y10
G1 F{maxd} X{max_x} Y{max_y}
G1 F{maxx} X10 Y{max_y}
G1 F{maxd} X{max_x} Y10
G1 F{maxy} X{max_x} Y{max_y}
G1 F{maxd} X10 Y10
G1 F{maxy} X10 Y{max_y}
G1 F{maxd} X{max_x} Y10
{% endfor %}
SET_VELOCITY_LIMIT ACCEL={maxx} ACCEL_TO_DECEL={maxx/2}
{% for times in range(loop_cnt) %}
G1 F{maxy} X10 Y10
G1 F{maxy} X10 Y{max_y}
G1 F{maxx} X{max_x} Y{max_y}
G1 F{maxy} X{max_x} Y10
G1 F{maxx} X10 Y10
G1 F{maxx} X{max_x} Y10
G1 F{maxy} X{max_x} Y{max_y}
G1 F{maxx} X10 Y{max_y}
{% endfor %}
G1 X{x_park} Y{y_park} F15000

View file

@ -28,26 +28,72 @@ timeout: 600.0
verbose: true
[gcode_macro KLIPPER_BACKUP_CONFIG]
[gcode_macro _KLIPPER_BACKUP]
gcode:
RUN_SHELL_COMMAND CMD=Klipper_Backup
RESPOND TYPE=command MSG="action:prompt_end"
[gcode_macro _KLIPPER_RESTORE]
gcode:
RUN_SHELL_COMMAND CMD=Klipper_Restore
RESPOND TYPE=command MSG="action:prompt_end"
[gcode_macro _MOONRAKER_BACKUP]
gcode:
RUN_SHELL_COMMAND CMD=Moonraker_Backup
RESPOND TYPE=command MSG="action:prompt_end"
[gcode_macro _MOONRAKER_RESTORE]
gcode:
RUN_SHELL_COMMAND CMD=Moonraker_Restore
RESPOND TYPE=command MSG="action:prompt_end"
[gcode_macro KLIPPER_BACKUP_CONFIG]
description: Backup Klipper configuration files
gcode:
RESPOND TYPE=command MSG="action:prompt_begin Backup Klipper configuration files"
RESPOND TYPE=command MSG="action:prompt_text Do you want to backup Klipper configuration files?"
RESPOND TYPE=command MSG="action:prompt_footer_button CANCEL|RESPOND TYPE=command MSG="action:prompt_end"|error"
RESPOND TYPE=command MSG="action:prompt_footer_button BACKUP|_KLIPPER_BACKUP|primary"
RESPOND TYPE=command MSG="action:prompt_show"
[gcode_macro KLIPPER_RESTORE_CONFIG]
description: Restore Klipper configuration files
gcode:
RUN_SHELL_COMMAND CMD=Klipper_Restore
RESPOND TYPE=command MSG="action:prompt_begin Restore Klipper configuration files"
RESPOND TYPE=command MSG="action:prompt_text Do you want to restore Klipper configuration files?"
RESPOND TYPE=command MSG="action:prompt_footer_button CANCEL|RESPOND TYPE=command MSG="action:prompt_end"|error"
RESPOND TYPE=command MSG="action:prompt_footer_button RESTORE|_KLIPPER_RESTORE|primary"
RESPOND TYPE=command MSG="action:prompt_show"
[gcode_macro MOONRAKER_BACKUP_DATABASE]
description: Backup Moonraker database
gcode:
RUN_SHELL_COMMAND CMD=Moonraker_Backup
RESPOND TYPE=command MSG="action:prompt_begin Backup Moonraker database"
RESPOND TYPE=command MSG="action:prompt_text Do you want to backup Moonraker database?"
RESPOND TYPE=command MSG="action:prompt_footer_button CANCEL|RESPOND TYPE=command MSG="action:prompt_end"|error"
RESPOND TYPE=command MSG="action:prompt_footer_button BACKUP|_MOONRAKER_BACKUP|primary"
RESPOND TYPE=command MSG="action:prompt_show"
[gcode_macro MOONRAKER_RESTORE_DATABASE]
description: Restore Moonraker database
gcode:
RUN_SHELL_COMMAND CMD=Moonraker_Restore
RESPOND TYPE=command MSG="action:prompt_begin Restore Moonraker database"
RESPOND TYPE=command MSG="action:prompt_text Do you want to restore Moonraker database?"
RESPOND TYPE=command MSG="action:prompt_footer_button CANCEL|RESPOND TYPE=command MSG="action:prompt_end"|error"
RESPOND TYPE=command MSG="action:prompt_footer_button RESTORE|_MOONRAKER_RESTORE|primary"
RESPOND TYPE=command MSG="action:prompt_show"
[gcode_macro RELOAD_CAMERA]
description: Reload camera service
gcode:
RUN_SHELL_COMMAND CMD=Reload_Camera
@ -56,9 +102,9 @@ gcode:
description: Start Bed Leveling
gcode:
{% if 'PROBE_COUNT' in params|upper %}
{% set get_count = ('PROBE_COUNT=' + params.PROBE_COUNT) %}
{% set get_count = ('PROBE_COUNT=' + params.PROBE_COUNT) %}
{%else %}
{% set get_count = "" %}
{% set get_count = "" %}
{% endif %}
{% set bed_temp = params.BED_TEMP|default(50)|float %}
{% set hotend_temp = params.HOTEND_TEMP|default(140)|float %}
@ -114,38 +160,6 @@ gcode:
WAIT_TEMP_START
[gcode_macro LUBRICATE_RODS]
description: Distribute lubricant on Rods
gcode:
{% set min_speed = 3000 %} # Minimum speed in mm/min
{% set max_speed = 18000 %} # Maximum speed in mm/min
{% if printer.toolhead.homed_axes != "xyz" %}
G28
{% endif %}
G1 Z50 F300
{% set x_max = printer.toolhead.axis_maximum.x|int %}
{% set y_max = printer.toolhead.axis_maximum.y|int %}
{% set edge_offset_x = x_max * 0.05 %}
{% set edge_offset_y = y_max * 0.05 %}
{% set x_range = x_max - edge_offset_x %}
{% set y_range = y_max - edge_offset_y %}
{% set num_steps_x = (x_range / 10)|int %}
{% set num_steps_y = (y_range / 10)|int %}
{% set speed_increment_x = (max_speed - min_speed) / num_steps_x %}
{% set speed_increment_y = (max_speed - min_speed) / num_steps_y %}
{% set current_speed_x = min_speed %}
{% set current_speed_y = min_speed %}
{% for i in range(num_steps_x) %}
G1 X{edge_offset_x + i * 10} Y{edge_offset_y} F{current_speed_x}
G1 X{edge_offset_x + i * 10} Y{y_range} F{current_speed_x}
{% set current_speed_x = current_speed_x + speed_increment_x %}
{% endfor %}
{% for j in range(num_steps_y) %}
G1 Y{edge_offset_y + j * 10} X{edge_offset_x} F{current_speed_y}
G1 Y{edge_offset_y + j * 10} X{x_range} F{current_speed_y}
{% set current_speed_y = current_speed_y + speed_increment_y %}
{% endfor %}
[gcode_macro WARMUP]
description: Stress Test
variable_maxd: 14142.14 ; = SQRT(2*maxy)
@ -158,12 +172,8 @@ gcode:
{% endif %}
{% endif %}
{% set loop_cnt = max_loops %}
{% if 'X_ACCEL_MAX' in params|upper %}
{% set maxx = params.X_ACCEL_MAX|default(10000)|int %}
{% endif %}
{% if 'Y_ACCEL_MAX' in params|upper %}
{% set maxy = params.Y_ACCEL_MAX|default(10000)|int %}
{% endif %}
{% set maxx = params.X_ACCEL_MAX|default(10000)|int %}
{% set maxy = params.Y_ACCEL_MAX|default(10000)|int %}
{% set max_x = (printer.toolhead.axis_maximum.x|int-5) %}
{% set max_y = (printer.toolhead.axis_maximum.y|int-5) %}
{% set loop_step_y = max_y//(loop_cnt-1) %}