mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-08-30 17:49:56 +02:00
Fixed logic error calculating homing cycles
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user