diff --git a/Grbl_Esp32/src/Limits.cpp b/Grbl_Esp32/src/Limits.cpp index 42d182fa..7a19a329 100644 --- a/Grbl_Esp32/src/Limits.cpp +++ b/Grbl_Esp32/src/Limits.cpp @@ -191,9 +191,8 @@ void limits_go_home(uint8_t cycle_mask, uint32_t n_locate_cycles) { // Scale the target array, currently in units of time, back to positions // Add a small fudge factor to ensure that the limit is reached for (int axis = 0; axis < n_axis; axis++) { - auto axisConfig = config->_axes->_axis[axis]; - auto homing = axisConfig->_homing; - auto scaler = approach ? homing->_search_scaler : 1.0; + auto homing = config->_axes->_axis[axis]->_homing; + auto scaler = approach ? homing->_search_scaler : homing->_locate_scaler; if (bitnum_istrue(axislock, axis)) { target[axis] *= limitingRate * scaler; } diff --git a/Grbl_Esp32/src/Machine/Homing.h b/Grbl_Esp32/src/Machine/Homing.h index 209efce8..d0a633e0 100644 --- a/Grbl_Esp32/src/Machine/Homing.h +++ b/Grbl_Esp32/src/Machine/Homing.h @@ -34,7 +34,7 @@ namespace Machine { float _pulloff = 1.0f; // mm int _debounce = 250; // ms settling time for homing switches after motion float _search_scaler = 1.1f; // multiplied by max travel for max homing distance on first touch - float _locate_scaler = 5.0f; + float _locate_scaler = 1.0f; // Configuration system helpers: void validate() const override { Assert(_cycle >= 1, "Cycle has to be defined as >= 1 for homing sequence."); }