-
Notifications
You must be signed in to change notification settings - Fork 1
/
ercf.cfg
60 lines (58 loc) · 1.73 KB
/
ercf.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[gcode_macro CANCEL_PRINT]
description: Cancels the printer
rename_existing: CANCEL_PRINT_BASE
gcode:
SET_FILAMENT_SENSOR SENSOR=encoder_sensor ENABLE=0
END_PRINT
TURN_OFF_HEATERS
CLEAR_PAUSE
CANCEL_PRINT_BASE
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
{% if printer.ercf.is_paused|int != 0 %}
M118 You can't resume the print without unlocking the ERCF first.
M118 Run ERCF_UNLOCK and solve any issue before hitting Resume again
{% else %}
{% if printer.ercf.clog_detection|int == 1 %}
SET_FILAMENT_SENSOR SENSOR=encoder_sensor ENABLE=1
{% endif %}
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
# Prime
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
G90
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
G90
BASE_RESUME
{% endif %}
# The end_print macro is also called from CANCEL_PRINT. Includes
# ejcting filament from ERCF if called for.
[gcode_macro END_PRINT]
description: End print procedure, use this in your Slicer.
gcode:
{% set unload = params.UNLOAD_AT_END|default(0)|int %}
M118 Ending print
SAVE_GCODE_STATE NAME=end_print_state
_END_PRINT_BEFORE_HEATERS_OFF
TURN_OFF_HEATERS
_END_PRINT_AFTER_HEATERS_OFF
_END_PRINT_PARK
# Clear skew profile if any was loaded.
{% if printer["gcode_macro RatOS"].skew_profile is defined %}
SET_SKEW CLEAR=1
{% endif %}
{% if unload|int == 1 %}
ERCF_EJECT
{% endif %}
# Steppers off
M84
# Part cooling fan off
M107
M117 Done :)
RESPOND MSG="Done :)"
RESTORE_GCODE_STATE NAME=end_print_state