Skip to content

Commit

Permalink
馃帹 Misc. 6-axis cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jul 29, 2022
1 parent 34f9c28 commit cea45d4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*/
#define __DECL_DATA_IF_INCLUDED(CLASS) struct CLASS ## Data CLASS ;
#define _DECL_DATA_IF_INCLUDED(CLASS) __DECL_DATA_IF_INCLUDED(CLASS)
#define DECL_DATA_IF_INCLUDED(HEADER) TERN(HEADER, _DECL_DATA_IF_INCLUDED(HEADER ## _CLASS), )
#define DECL_DATA_IF_INCLUDED(HEADER) TERN_(HEADER, _DECL_DATA_IF_INCLUDED(HEADER ## _CLASS))

union screen_data_t {
DECL_DATA_IF_INCLUDED(FTDI_INTERFACE_SETTINGS_SCREEN)
Expand Down
14 changes: 14 additions & 0 deletions Marlin/src/module/tool_change.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,13 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
if (ok) {
IF_DISABLED(TOOLCHANGE_PARK_Y_ONLY, current_position.x = toolchange_settings.change_point.x);
IF_DISABLED(TOOLCHANGE_PARK_X_ONLY, current_position.y = toolchange_settings.change_point.y);
#if NONE(TOOLCHANGE_PARK_X_ONLY, TOOLCHANGE_PARK_Y_ONLY)
SECONDARY_AXIS_CODE(
current_position.i = toolchange_settings.change_point.i,
current_position.j = toolchange_settings.change_point.j,
current_position.k = toolchange_settings.change_point.k
);
#endif
planner.buffer_line(current_position, MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE), active_extruder);
planner.synchronize();
}
Expand Down Expand Up @@ -1227,6 +1234,13 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
if (can_move_away && toolchange_settings.enable_park) {
IF_DISABLED(TOOLCHANGE_PARK_Y_ONLY, current_position.x = toolchange_settings.change_point.x);
IF_DISABLED(TOOLCHANGE_PARK_X_ONLY, current_position.y = toolchange_settings.change_point.y);
#if NONE(TOOLCHANGE_PARK_X_ONLY, TOOLCHANGE_PARK_Y_ONLY)
SECONDARY_AXIS_CODE(
current_position.i = toolchange_settings.change_point.i,
current_position.j = toolchange_settings.change_point.j,
current_position.k = toolchange_settings.change_point.k
);
#endif
planner.buffer_line(current_position, MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE), old_tool);
planner.synchronize();
}
Expand Down

0 comments on commit cea45d4

Please sign in to comment.