Minor bug fixes: Homing travel calculations. Cycle resuming after spindle and dwell commands.

- Homing travel calculations fixed. It was computing the min travel
rather than max.

- Auto-start disable and pausing after spindle or dwell commands.
Related to plan_synchronize() function call. Now fixed, but still need
to work on the system state.

- Pushed a fix to make this branch more Arduino IDE compatible. Removed
extern call in nuts_bolts.c

- Updated the stepper configuration option of enabling or disabling the
new Adaptive Multi-Axis Step Smoothing Algorithm. Now works either way.

- Updated some copyright info.
This commit is contained in:
Sonny Jeon
2013-12-30 22:02:05 -07:00
parent 47cd40c8dc
commit f10bad43b2
30 changed files with 102 additions and 98 deletions

View File

@ -2,8 +2,8 @@
limits.c - code pertaining to limit-switches and performing the homing cycle
Part of Grbl
Copyright (c) 2012-2014 Sungeun K. Jeon
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2012-2013 Sungeun K. Jeon
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -132,12 +132,13 @@ void limits_go_home(uint8_t cycle_mask, bool approach, float homing_rate)
else { invert_pin = !approach; }
// Determine travel distance to the furthest homing switch based on user max travel settings.
// NOTE: settings.max_travel[] is stored as a negative value.
float max_travel = settings.max_travel[X_AXIS];
if (max_travel < settings.max_travel[Y_AXIS]) { max_travel = settings.max_travel[Y_AXIS]; }
if (max_travel < settings.max_travel[Z_AXIS]) { max_travel = settings.max_travel[Z_AXIS]; }
max_travel *= 1.25; // Ensure homing switches engaged by over-estimating max travel.
if (approach) { max_travel = -max_travel; }
if (max_travel > settings.max_travel[Y_AXIS]) { max_travel = settings.max_travel[Y_AXIS]; }
if (max_travel > settings.max_travel[Z_AXIS]) { max_travel = settings.max_travel[Z_AXIS]; }
max_travel *= -1.25; // Ensure homing switches engaged by over-estimating max travel.
if (!approach) { max_travel = -max_travel; }
// Set target location and rate for active axes.
float target[N_AXIS];
uint8_t n_active_axis = 0;