Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Stepper::set_directions() => apply_directions()
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 23, 2023
1 parent 921591d commit f0f7ec8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Marlin/src/feature/bedlevel/bdl/bdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/module/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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*/) {
Expand Down Expand Up @@ -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)");
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/module/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/module/stepper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/module/stepper/trinamic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ void reset_trinamic_drivers() {
TMC_ADV()
#endif

stepper.set_directions();
stepper.apply_directions();
}

// TMC Slave Address Conflict Detection
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/module/tool_change.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f0f7ec8

Please sign in to comment.