Skip to content

Commit

Permalink
idex join spool and toolhead remapping
Browse files Browse the repository at this point in the history
  • Loading branch information
HelgeKeck committed Apr 16, 2024
1 parent 9fed3b4 commit 7d5102c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ gcode:

# swap toolheads if needed
{% if printer["dual_carriage"] is defined %}
{% set swap_toolheads = true if printer["gcode_macro _IDEX_SWAP_TOOLHEADS"].enabled|default(false)|lower == 'true' else false %}
{% set swap_toolheads = true if printer["gcode_macro _IDEX_REMAP_TOOLHEADS"].enabled|default(false)|lower == 'true' else false %}
{% if swap_toolheads %}
{% set initial_tool = 0 if initial_tool == 1 else 1 %}
{% endif %}
Expand Down Expand Up @@ -475,10 +475,10 @@ gcode:

# spool join
{% if printer["dual_carriage"] is defined %}
{% if printer["gcode_macro _IDEX_SPOOL_JOIN"].enabled|default(false)|lower == 'true' %}
{% if printer["gcode_macro _IDEX_JOIN_SPOOLS"].enabled|default(false)|lower == 'true' %}
{% if both_toolheads %}
RATOS_ECHO MSG="Spool join is not possible if both toolheads are in use!"
SET_GCODE_VARIABLE MACRO=_IDEX_SPOOL_JOIN VARIABLE=enabled VALUE=False
SET_GCODE_VARIABLE MACRO=_IDEX_JOIN_SPOOLS VARIABLE=enabled VALUE=False
{% endif %}
{% endif %}
{% endif %}
Expand Down Expand Up @@ -883,9 +883,9 @@ gcode:
# reset is_printing_gcode state
SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=is_printing_gcode VALUE=False
# reset swapped toolheads mode
SET_GCODE_VARIABLE MACRO=_IDEX_SWAP_TOOLHEADS VARIABLE=enabled VALUE=False
SET_GCODE_VARIABLE MACRO=_IDEX_REMAP_TOOLHEADS VARIABLE=enabled VALUE=False
# reset spool join mode
SET_GCODE_VARIABLE MACRO=_IDEX_SPOOL_JOIN VARIABLE=enabled VALUE=False
SET_GCODE_VARIABLE MACRO=_IDEX_JOIN_SPOOLS VARIABLE=enabled VALUE=False
# reset object xoffset
{% if printer["gcode_macro RatOS"].auto_center_subject|default(false)|lower == 'true' %}
{% set object_xoffset = printer["gcode_macro START_PRINT"].object_xoffset|default(0)|float %}
Expand Down
4 changes: 2 additions & 2 deletions macros/idex/overrides.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ gcode:
# reset pressure advance toolhead syncing
SET_GCODE_VARIABLE MACRO=SET_PRESSURE_ADVANCE VARIABLE=snyc_toolheads VALUE=False
# reset swapped toolheads mode
SET_GCODE_VARIABLE MACRO=_IDEX_SWAP_TOOLHEADS VARIABLE=enabled VALUE=False
SET_GCODE_VARIABLE MACRO=_IDEX_REMAP_TOOLHEADS VARIABLE=enabled VALUE=False
# reset spool join mode
SET_GCODE_VARIABLE MACRO=_IDEX_SPOOL_JOIN VARIABLE=enabled VALUE=False
SET_GCODE_VARIABLE MACRO=_IDEX_JOIN_SPOOLS VARIABLE=enabled VALUE=False
# reset offsets
# this is a temporarily safety measurement and very anoying
# to ensure we start the next print with known offsets
Expand Down
2 changes: 1 addition & 1 deletion macros/toolheads.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ gcode:

# swap toolheads if needed
{% set is_printing_gcode = true if printer["gcode_macro START_PRINT"].is_printing_gcode|default(true)|lower == 'true' else false %}
{% set swap_toolheads = true if printer["gcode_macro _IDEX_SWAP_TOOLHEADS"].enabled|default(false)|lower == 'true' else false %}
{% set swap_toolheads = true if printer["gcode_macro _IDEX_REMAP_TOOLHEADS"].enabled|default(false)|lower == 'true' else false %}
{% if swap_toolheads and is_printing_gcode %}
{% set new_t = 0 if new_t == 1 else 1 %}
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions macros/unload_filament.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ gcode:
{% endif %}
{% endif %}
{% if printer["dual_carriage"] is defined %}
{% if printer["gcode_macro _IDEX_SPOOL_JOIN"].enabled|default(false)|lower == 'true'%}
_SPOOL_JOIN TOOLHEAD={toolhead}
{% if printer["gcode_macro _IDEX_JOIN_SPOOLS"].enabled|default(false)|lower == 'true'%}
_JOIN_SPOOL TOOLHEAD={toolhead}
{% endif %}
{% endif %}
{% endif %}
Expand Down

0 comments on commit 7d5102c

Please sign in to comment.