clear_block_buffer, kill_current_block in quick_stop

This commit is contained in:
Scott Lahteine 2018-04-13 21:59:09 -05:00
parent a783caabac
commit 9769d799df
3 changed files with 9 additions and 6 deletions

View file

@ -296,6 +296,8 @@ class Planner {
*/
FORCE_INLINE static uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block_buffer_tail + BLOCK_BUFFER_SIZE); }
FORCE_INLINE static void clear_block_buffer() { block_buffer_head = block_buffer_tail = 0; }
FORCE_INLINE static bool is_full() { return block_buffer_tail == next_block_index(block_buffer_head); }
// Update multipliers based on new diameter measurements
@ -581,7 +583,7 @@ class Planner {
return bbru;
}
static void clear_block_buffer_runtime(){
static void clear_block_buffer_runtime() {
CRITICAL_SECTION_START
block_buffer_runtime_us = 0;
CRITICAL_SECTION_END