Tweaks and minor bug fixes. Added purge buffer command.

- Added a purge buffer (and lock) command. This is an advanced option
to clear any queued blocks in the buffer in the event of system
position being lost or homed. These queued blocks will likely not move
correctly if not purged. In typical use, the purging command releases
the homing axes lock in case a user need to move the axes off their
hard limit switches, but position is not guaranteed. Homing is advised
immediately after.

- Created a system-wide sync current position function. Cleans up some
of the repetitive tasks in various places in the code that do the same
thing.

- Removed the clear all switches command '$S'. Not really needed and
helped clean up a sync call.

- Other minor tweaks. Readme updated slightly..
This commit is contained in:
Sonny Jeon
2012-11-04 08:44:54 -07:00
parent 4c711a4af7
commit 8c0106c247
12 changed files with 59 additions and 52 deletions

View File

@ -482,12 +482,6 @@ void plan_set_current_position(int32_t x, int32_t y, int32_t z)
pl.position[Z_AXIS] = z;
}
// Clear planner position vector. Called by homing routine.
void plan_clear_position()
{
clear_vector(pl.position);
}
// Re-initialize buffer plan with a partially completed block, assumed to exist at the buffer tail.
// Called after a steppers have come to a complete stop for a feed hold and the cycle is stopped.
void plan_cycle_reinitialize(int32_t step_events_remaining)