Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MACRO: fix toolhead standby #321

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions macros/idex/idex.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -514,12 +514,17 @@ gcode:
# deactivate old toolhead
_DEACTIVATE_TOOLHEAD TOOLHEAD={old_toolhead}

# get extruder temperatures
{% set extruder_first_layer_temp = (printer["gcode_macro START_PRINT"].extruder_first_layer_temp|default("")).split(",") %}
{% set extruder_other_layer_temp = (printer["gcode_macro START_PRINT"].extruder_other_layer_temp|default("")).split(",") %}

# wait for new extruder to heat up
{% if printer["gcode_macro _ON_LAYER_CHANGE"].layer_number|int < 2 %}
{% set extruder_temp = printer["gcode_macro START_PRINT"].extruder_first_layer_temp[new_toolhead]|float %}
{% set extruder_temp = extruder_first_layer_temp[new_toolhead]|float %}
{% else %}
{% set extruder_temp = printer["gcode_macro START_PRINT"].extruder_other_layer_temp[new_toolhead]|float %}
{% set extruder_temp = extruder_other_layer_temp[new_toolhead]|float %}
{% endif %}
SET_HEATER_TEMPERATURE HEATER={'extruder' if new_toolhead == 0 else 'extruder1'} TARGET={extruder_temp}
TEMPERATURE_WAIT SENSOR={'extruder' if new_toolhead == 0 else 'extruder1'} MINIMUM={extruder_temp} MAXIMUM={extruder_temp + 5}

# preextrude filament
Expand Down
9 changes: 7 additions & 2 deletions macros/idex/toolheads.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,18 @@ gcode:
{% set square_corner_velocity = printer.toolhead.square_corner_velocity|float %}
SET_VELOCITY_LIMIT ACCEL={acceleration} MINIMUM_CRUISE_RATIO=0 SQUARE_CORNER_VELOCITY=20

# get extruder temperatures
{% set extruder_first_layer_temp = (printer["gcode_macro START_PRINT"].extruder_first_layer_temp|default("")).split(",") %}
{% set extruder_other_layer_temp = (printer["gcode_macro START_PRINT"].extruder_other_layer_temp|default("")).split(",") %}

# set new toolhead temperature
{% if needs_wakeup %}
{% if printer["gcode_macro _ON_LAYER_CHANGE"].layer_number|int < 2 %}
{% set temp = printer["gcode_macro START_PRINT"].extruder_first_layer_temp[toolhead]|float %}
{% set temp = extruder_first_layer_temp[toolhead]|float %}
{% else %}
{% set temp = printer["gcode_macro START_PRINT"].extruder_other_layer_temp[toolhead]|float %}
{% set temp = extruder_other_layer_temp[toolhead]|float %}
{% endif %}
SET_HEATER_TEMPERATURE HEATER={'extruder' if toolhead == 0 else 'extruder1'} TARGET={temp}
TEMPERATURE_WAIT SENSOR={'extruder' if toolhead == 0 else 'extruder1'} MINIMUM={temp} MAXIMUM={temp + 5}
{% endif %}

Expand Down
Loading