From 1bd58f4aeadbe6d153b3f42e4910d485a559c7f8 Mon Sep 17 00:00:00 2001 From: bdring Date: Mon, 5 Jul 2021 14:05:57 -0500 Subject: [PATCH] Fixed logic error calculating homing cycles --- Grbl_Esp32/src/Limits.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Grbl_Esp32/src/Limits.cpp b/Grbl_Esp32/src/Limits.cpp index 383947a9..26cdb633 100644 --- a/Grbl_Esp32/src/Limits.cpp +++ b/Grbl_Esp32/src/Limits.cpp @@ -284,7 +284,7 @@ static void limits_go_home(uint8_t cycle_mask, uint32_t n_locate_cycles) { // set up pull-off maneuver from axes limit switches that have been homed. This provides // some initial clearance off the switches and should also help prevent them from falsely // triggering when hard limits are enabled or when more than one axes shares a limit pin. - + // Set machine positions for homed limit switches. Don't update non-homed axes. for (int axis = 0; axis < n_axis; axis++) { Machine::Axis* axisConf = config->_axes->_axis[axis]; @@ -393,7 +393,7 @@ void limits_run_homing_cycles(AxisMask axis_mask) { auto axisConfig = config->_axes->_axis[axis]; auto homing = axisConfig->_homing; if (homing && homing->_cycle == cycle) { - bitnum_istrue(axis_mask, axis); + bitnum_true(axis_mask, axis); } } @@ -590,7 +590,7 @@ bool WEAK_LINK limitsCheckTravel(float* target) { auto axes = config->_axes; auto n_axis = axes->_numberAxis; for (int axis = 0; axis < n_axis; axis++) { - auto axisSetting = axes->_axis[axis]; + auto axisSetting = axes->_axis[axis]; if ((target[axis] < limitsMinPosition(axis) || target[axis] > limitsMaxPosition(axis)) && axisSetting->_maxTravel > 0) { return true; }