Skip to content

Commit

Permalink
Ignore soft limit on axes with zero max-travel
Browse files Browse the repository at this point in the history
Useful for rotary tables and the like
  • Loading branch information
electrokean committed Feb 14, 2015
1 parent b3e6d6a commit bdc784c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions limits.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ void limits_soft_check(float *target)
uint8_t idx;
uint8_t soft_limit_error = false;
for (idx=0; idx<N_AXIS; idx++) {
// allow disabling soft limit per axis by setting max travel to zero
if (settings.max_travel[idx]) {

#ifdef HOMING_FORCE_SET_ORIGIN
// When homing forced set origin is enabled, soft limits checks need to account for directionality.
Expand All @@ -322,6 +324,7 @@ void limits_soft_check(float *target)
// NOTE: max_travel is stored as negative
if (target[idx] > 0 || target[idx] < settings.max_travel[idx]) { soft_limit_error = true; }
#endif
}

if (soft_limit_error) {
// Force feed hold if cycle is active. All buffered blocks are guaranteed to be within
Expand Down

0 comments on commit bdc784c

Please sign in to comment.