From f0f7ec88823318c7d778e42b4dc7604120943032 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 23 Apr 2023 00:47:44 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Stepper::se?= =?UTF-8?q?t=5Fdirections()=20=3D>=20apply=5Fdirections()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/bedlevel/bdl/bdl.cpp | 4 ++-- Marlin/src/module/motion.cpp | 6 +++--- Marlin/src/module/stepper.cpp | 2 +- Marlin/src/module/stepper.h | 4 ++-- Marlin/src/module/stepper/trinamic.cpp | 2 +- Marlin/src/module/tool_change.cpp | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Marlin/src/feature/bedlevel/bdl/bdl.cpp b/Marlin/src/feature/bedlevel/bdl/bdl.cpp index e729022f21..5ce5e894ca 100644 --- a/Marlin/src/feature/bedlevel/bdl/bdl.cpp +++ b/Marlin/src/feature/bedlevel/bdl/bdl.cpp @@ -110,7 +110,7 @@ void BDS_Leveling::process() { } else { babystep.set_mm(Z_AXIS, 0); //if (old_cur_z <= cur_z) Z_DIR_WRITE(INVERT_DIR(Z, HIGH)); - stepper.set_directions(); + stepper.apply_directions(); } #endif old_cur_z = cur_z; @@ -119,7 +119,7 @@ void BDS_Leveling::process() { //endstops.update(); } else - stepper.set_directions(); + stepper.apply_directions(); #if ENABLED(DEBUG_OUT_BD) SERIAL_ECHOLNPGM("BD:", tmp & 0x3FF, ", Z:", cur_z, "|", current_position.z); diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 589299f2f1..f7671e3135 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -1419,13 +1419,13 @@ float get_move_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool void idex_set_mirrored_mode(const bool mirr) { idex_mirrored_mode = mirr; - stepper.set_directions(); + stepper.apply_directions(); } void set_duplication_enabled(const bool dupe, const int8_t tool_index/*=-1*/) { extruder_duplication_enabled = dupe; if (tool_index >= 0) active_extruder = tool_index; - stepper.set_directions(); + stepper.apply_directions(); } void idex_set_parked(const bool park/*=true*/) { @@ -1471,7 +1471,7 @@ float get_move_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool line_to_current_position(fr_zfast); } } - stepper.set_directions(); + stepper.apply_directions(); idex_set_parked(false); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("idex_set_parked(false)"); diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 045df05981..f26e10a4bd 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -608,7 +608,7 @@ void Stepper::disable_all_steppers() { * COREXZ: X_AXIS=A_AXIS and Z_AXIS=C_AXIS * COREYZ: Y_AXIS=B_AXIS and Z_AXIS=C_AXIS */ -void Stepper::set_directions() { +void Stepper::apply_directions() { DIR_WAIT_BEFORE(); diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 4c54a5dbf9..63285398cd 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -814,12 +814,12 @@ class Stepper { static void disable_all_steppers(); // Update direction states for all steppers - static void set_directions(); + static void apply_directions(); // Set direction bits and update all stepper DIR states static void set_directions(const axis_bits_t bits) { last_direction_bits = bits; - set_directions(); + apply_directions(); } #if ENABLED(FT_MOTION) diff --git a/Marlin/src/module/stepper/trinamic.cpp b/Marlin/src/module/stepper/trinamic.cpp index 02ae9cb1e4..893ce3f8db 100644 --- a/Marlin/src/module/stepper/trinamic.cpp +++ b/Marlin/src/module/stepper/trinamic.cpp @@ -1010,7 +1010,7 @@ void reset_trinamic_drivers() { TMC_ADV() #endif - stepper.set_directions(); + stepper.apply_directions(); } // TMC Slave Address Conflict Detection diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index a91f6f742d..cce3669355 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -880,7 +880,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. } // Ensure X axis DIR pertains to the correct carriage - stepper.set_directions(); + stepper.apply_directions(); DEBUG_ECHOLNPGM("Active extruder parked: ", active_extruder_parked ? "yes" : "no"); DEBUG_POS("New extruder (parked)", current_position);