Hard limits code minor updates.

- Fixed a bug that would not disable the steppers if a user issues a
system abort during a homing cycle.

- Updated the hard limit interrupt to be more correct and to issue a
shutdown for the right situations when the switch has been triggered.

- Added a status message to indicate to the user what happened and what
to do upon a hard limit trigger.
This commit is contained in:
Sonny Jeon
2012-10-18 21:29:07 -06:00
parent df5bb70b25
commit 39e11b696f
7 changed files with 26 additions and 17 deletions

View File

@ -217,7 +217,7 @@ void mc_go_home()
if (bit_istrue(settings.homing_dir_mask,bit(Z_DIRECTION_BIT))) { z_dir = -1; }
mc_line(x_dir*settings.homing_pulloff, y_dir*settings.homing_pulloff,
z_dir*settings.homing_pulloff, settings.homing_feed_rate, false);
st_cycle_start(); // Nothing should be in the buffer except this motion.
st_cycle_start(); // Move it. Nothing should be in the buffer except this motion.
plan_synchronize(); // Make sure the motion completes.
gc_set_current_position(sys.position[X_AXIS],sys.position[Y_AXIS],sys.position[Z_AXIS]);
PCICR |= (1 << LIMIT_INT); // Re-enable hard limits.