From 93461198f420e01379a9e7330de395fb70eb2c8e Mon Sep 17 00:00:00 2001 From: DrumClock <64655979+DrumClock@users.noreply.github.com> Date: Thu, 4 May 2023 20:04:33 +0200 Subject: [PATCH] 4.5.23 --- 4EX2/SYNC_SWITCHING_TOOL.cfg | 12 +++++++----- IDEX/M605_IDEX_mode.cfg | 8 ++++---- MULTI/MULTI_HOTEND.cfg | 4 ++-- save_variables_4ex2.cfg | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/4EX2/SYNC_SWITCHING_TOOL.cfg b/4EX2/SYNC_SWITCHING_TOOL.cfg index fae9485..84462e5 100644 --- a/4EX2/SYNC_SWITCHING_TOOL.cfg +++ b/4EX2/SYNC_SWITCHING_TOOL.cfg @@ -73,7 +73,9 @@ gcode: {% set target_tool = params.T|default(0)|int %} ; 0 {% if target_tool in [0,1] %} - {% set act_extruder = printer.toolhead.extruder %} + {% set act_extruder = printer.toolhead.extruder %} + {% set systems = 'TOOL' if 'gcode_macro SWITCHING_EXTRUDER' in printer or 'gcode_macro SWITCHING_HOTEND' in printer + else 'EXTRUDER' %} ### define sync tool carriage 0/1 {% set axis = printer.configfile.settings.dual_carriage.axis %} ;x @@ -89,7 +91,7 @@ gcode: #-------------------- SYNC MULTI HOTEND--------------------------------------------- ### filament insertion check for SYNC-MULTI hotend during printing - {% if 'gcode_macro MULTI_HOTEND' in printer and 'gcode_macro SYNC_MULTI_HOTEND' in printer %} #and printer['virtual_sdcard'].is_active == true %} + {% if 'gcode_macro MULTI_HOTEND' in printer and 'gcode_macro SYNC_MULTI_HOTEND' in printer and printer['virtual_sdcard'].is_active == true %} SYNC_MULTI_HOTEND EXTRUDERS={tool_0 + "," + tool_1} {% endif %} @@ -100,7 +102,7 @@ gcode: SET_GCODE_OFFSET {axis}={user_vars.hotend_offset.3[axis] if t_code == 'T0' else user_vars.hotend_offset.2[axis]} # 'extruder3' / 'extruder2' ### activate tool - ACTIVATE_TOOL EXTRUDER={tool_1} # params.T 0 ='extruder2' / params.T 1 ='extruder3' + ACTIVATE_{systems} EXTRUDER={tool_1} # params.T 0 ='extruder2' / params.T 1 ='extruder3' APPLY_AXIS_OFFSETS_TOOL T={2 if t_code == 'T0' else 3 } # 'extruder2' / 'extruder3' ### sets Hotends carriage 0 @@ -108,12 +110,12 @@ gcode: SET_GCODE_OFFSET {axis}={user_vars.hotend_offset.1[axis] if t_code == 'T0' else user_vars.hotend_offset.0[axis] } # 'extruder1' / # 'extruder' ### activate tool - ACTIVATE_TOOL EXTRUDER={tool_0} # params.T 0 ='extruder' / params.T 1 ='extruder1' + ACTIVATE_{systems} EXTRUDER={tool_0} # params.T 0 ='extruder' / params.T 1 ='extruder1' APPLY_AXIS_OFFSETS_TOOL T={0 if t_code == 'T0' else 1} # 'extruder' / 'extruder1' ### sync extruders SYNC_EXTRUDER_MOTION EXTRUDER={user_vars.toolhead[1][0]} MOTION_QUEUE={tool_0} # params.T 0 = 'extruder' / params.T 1 = 'extruder1' - ACTIVATE_EXTRUDER EXTRUDER={tool_0} # params.T 0 = 'extruder' / params.T 1 = 'extruder1' + ACTIVATE_{systems} EXTRUDER={tool_0} # params.T 0 = 'extruder' / params.T 1 = 'extruder1' ### re-activate mode {% if user_vars.idex_mode.active == 2 %} diff --git a/IDEX/M605_IDEX_mode.cfg b/IDEX/M605_IDEX_mode.cfg index d697ff4..b67c4c7 100644 --- a/IDEX/M605_IDEX_mode.cfg +++ b/IDEX/M605_IDEX_mode.cfg @@ -216,10 +216,10 @@ gcode: {% endif %} {% endfor %} -### Reset Switching extruder - {% if printer['gcode_macro SWITCHING_EXTRUDER'] is defined %} - SWITCHING_EXTRUDER E={user_vars.toolhead[0][0]} - SWITCHING_EXTRUDER E={user_vars.toolhead[1][0]} +### Reset Switching extruder / hotend + {% if 'gcode_macro SWITCHING_EXTRUDER' in printer or 'gcode_macro SWITCHING_HOTEND' in printer %} + ACTIVATE_TOOL EXTRUDER={user_vars.toolhead[0][0]} + ACTIVATE_TOOL EXTRUDER={user_vars.toolhead[1][0]} {% endif %} ##################################################################### diff --git a/MULTI/MULTI_HOTEND.cfg b/MULTI/MULTI_HOTEND.cfg index b5427b0..ed2bd36 100644 --- a/MULTI/MULTI_HOTEND.cfg +++ b/MULTI/MULTI_HOTEND.cfg @@ -182,8 +182,8 @@ gcode: {% set rest = user_vars.multi_hotend[action] % max_extrude|float %} ### only when printing and heated extruder - {% if printer[act_extruder].can_extrude | lower == 'true' %} - # and printer['virtual_sdcard'].is_active == true %} + {% if printer[act_extruder].can_extrude | lower == 'true' + and printer['virtual_sdcard'].is_active == true %} SAVE_GCODE_STATE NAME=MULTI_HOTEND ### load/unload activation for "max_extrude_only_distance" diff --git a/save_variables_4ex2.cfg b/save_variables_4ex2.cfg index b2a570e..9bacec7 100644 --- a/save_variables_4ex2.cfg +++ b/save_variables_4ex2.cfg @@ -13,7 +13,7 @@ filament_sensor = {'defined': True, 'count': 4, 'switch': ['extruder', 'extruder heater = {1: 'heater_1'} hotend_offset = {0: {'y': 0.0, 'x': 0.0, 'z': 0.0}, 1: {'y': 0.0, 'x': -10.0, 'z': 0.0}, 2: {'y': 0.0, 'x': 0.0, 'z': 0.0}, 3: {'y': 0.0, 'x': -10.0, 'z': 0.0}, 'change_T0': False} idex_mode = {'active': 1, 'movespeed': 500, 'feedrate': 30000, 'carriage_offset': 0, 'position': {'dupl_max': 120, 'dupl_min': 52, 'mirrored': 240}} -multi_hotend = {1: 'extruder2', 0: 'extruder', 'unload': 40, 'load': 60, 'speed': 25, 'parking': [-32, 278], 'feedrate': 30000, 'gcode_position': {'axis': 'x', 'pos_carr_0': 50.0, 'pos_carr_1': 170.0}} +multi_hotend = {1: 'extruder3', 0: 'extruder1', 'unload': 40, 'load': 60, 'speed': 25, 'parking': [-32, 278], 'feedrate': 30000, 'gcode_position': {'axis': 'x', 'pos_carr_0': 0.0, 'pos_carr_1': 120.0}} neopixel = {'index': {0: 'axis_X'}, 'RGB': {0: '0,0,0'}, 'enable': True, 'menu': {'active': 0}} offset_temp = {'extruder3': 0, 'extruder1': 0, 'extruder2': 0, 'extruder': 0} print_mode = {'active': 1, 'enable': False}