refactoring that improved compartmentalization between stepper and stepper_plan modules
This commit is contained in:
parent
52dda8713e
commit
ba13ddadd0
3 changed files with 22 additions and 9 deletions
|
|
@ -351,6 +351,17 @@ int plan_is_acceleration_manager_enabled() {
|
|||
return(acceleration_manager_enabled);
|
||||
}
|
||||
|
||||
inline void plan_discard_current_block() {
|
||||
if (block_buffer_head != block_buffer_tail) {
|
||||
block_buffer_tail = (block_buffer_tail + 1) % BLOCK_BUFFER_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
inline block_t *plan_get_current_block() {
|
||||
if (block_buffer_head == block_buffer_tail) { return(NULL); }
|
||||
return(&block_buffer[block_buffer_tail]);
|
||||
}
|
||||
|
||||
// Add a new linear movement to the buffer. steps_x, _y and _z is the absolute position in
|
||||
// mm. Microseconds specify how many microseconds the move should take to perform. To aid acceleration
|
||||
// calculation the caller must also provide the physical length of the line in millimeters.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue