Skip to content

Commit

Permalink
feat: Add module to reset limits, speed & extrusion factor in END_PRINT
Browse files Browse the repository at this point in the history
Add a module (based on the new modular approach) to reset velocity limits,
speed factor and extrusion factor at the end of the print
  • Loading branch information
mjonuschat committed Dec 16, 2024
1 parent fb4a502 commit cc22588
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion macros/base/end_print.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Available actions: "retract_filament", "turn_off_heaters", "turn_off_fans", "turn_off_motors"
##
[gcode_macro _USER_VARIABLES]
variable_endprint_actions: "retract_filament", "turn_off_heaters", "turn_off_fans", "turn_off_motors"
variable_endprint_actions: "retract_filament", "turn_off_heaters", "turn_off_fans", "turn_off_motors", "reset_limits"
gcode: # do not remove this line

[gcode_macro END_PRINT]
Expand Down Expand Up @@ -46,6 +46,8 @@ gcode:
_MODULE_TURN_OFF_FANS
{% elif action == "turn_off_motors" %}
_MODULE_TURN_OFF_MOTORS
{% elif action == "reset_limits" %}
_MODULE_RESET_LIMITS
{% else %}
{% if "_END_PRINT_ACTION_%s" % (action|upper) in printer.gcode.commands %}
_MODULE_{action|upper} {rawparams}
Expand Down
9 changes: 9 additions & 0 deletions user_templates/variables.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ variable_disable_motors_in_end_print: False
## Automatically turn-off heaters in the END_PRINT macro
variable_turn_off_heaters_in_end_print: True

## Automatically reset velocity limits to configured values in the END_PRINT macro
variable_reset_velocity_limits_in_end_print: True

## Automatically reset extrude factor to 100% in the END_PRINT macro
variable_reset_extrude_factor_in_end_print: True

## Automatically reset speed factor to 100% in the END_PRINT macro
variable_reset_speed_factor_in_end_print: True


#########################################################
# Dockable probe variables (if available in the machine)
Expand Down

0 comments on commit cc22588

Please sign in to comment.