Cleanup in misc-macros.cfg. Adjusted calibration.cfg to work dynamically.

This commit is contained in:
Bassam Husain
2023-07-01 00:05:00 -04:00
parent f5c533a35d
commit 28ba80dd29
2 changed files with 9 additions and 7 deletions

View File

@@ -31,6 +31,7 @@ variable_beeping_enabled: 1 # NOTE Enable(1) or disable(0) beeping everywhere ex
variable_bed_temp_over: 10 # NOTE Start print if bed temperature is over by this amount, otherwise wait for temperature drop
variable_pre_purge_prime_length: 1.40
gcode:
# DELETEME This section is unnecessary
SET_GCODE_VARIABLE MACRO=_globals VARIABLE=pre_purge_prime_length VALUE={ variable_pre_purge_prime_length }
SET_GCODE_VARIABLE MACRO=_globals VARIABLE=filament_sensor_enabled VALUE={ variable_filament_sensor_enabled }
SET_GCODE_VARIABLE MACRO=_globals VARIABLE=beeping_enabled VALUE={ variable_beeping_enabled }
@@ -87,10 +88,7 @@ gcode:
{% set PRE_PURGE_PRIME_LENGTH=printer["gcode_macro _globals"].pre_purge_prime_length|default(1.40)|float %}
ADJUST_FILAMENT_SENSOR_STATUS ENABLE=1
# Get Boundaries
{% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %}
{% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %}
{% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
# Misc variables
{% set extrudeAmount = 26.6 %}
{% set movementLength = 100.0 %}
{% set movementSpeed = 15 * 60 %}
@@ -108,7 +106,7 @@ gcode:
M83 ; Relative extrusion mode
G1 E{PRE_PURGE_PRIME_LENGTH} F500 ; pre-purge prime LENGTH SHOULD MATCH YOUR PRINT_END RETRACT
G1 X{xStart + movementLength} E{extrudeAmount} F{movementSpeed} ; intro line 1
#G1 E-.5 F2100 # Retract
G92 E0.0 ; reset extruder
M82 ; Absolute extrusion mode
G1 Z5.0 ; move nozzle to prevent scratch