blocks_queued => has_blocks_queued
This commit is contained in:
parent
647c04def8
commit
c57545ee08
4 changed files with 11 additions and 11 deletions
|
|
@ -508,14 +508,14 @@ class Planner {
|
|||
/**
|
||||
* Does the buffer have any blocks queued?
|
||||
*/
|
||||
static inline bool blocks_queued() { return (block_buffer_head != block_buffer_tail); }
|
||||
static inline bool has_blocks_queued() { return (block_buffer_head != block_buffer_tail); }
|
||||
|
||||
/**
|
||||
* "Discard" the block and "release" the memory.
|
||||
* Called when the current block is no longer needed.
|
||||
*/
|
||||
FORCE_INLINE static void discard_current_block() {
|
||||
if (blocks_queued())
|
||||
if (has_blocks_queued())
|
||||
block_buffer_tail = BLOCK_MOD(block_buffer_tail + 1);
|
||||
}
|
||||
|
||||
|
|
@ -524,7 +524,7 @@ class Planner {
|
|||
* Called after an interrupted move to throw away the rest of the move.
|
||||
*/
|
||||
FORCE_INLINE static bool discard_continued_block() {
|
||||
const bool discard = blocks_queued() && TEST(block_buffer[block_buffer_tail].flag, BLOCK_BIT_CONTINUED);
|
||||
const bool discard = has_blocks_queued() && TEST(block_buffer[block_buffer_tail].flag, BLOCK_BIT_CONTINUED);
|
||||
if (discard) discard_current_block();
|
||||
return discard;
|
||||
}
|
||||
|
|
@ -535,7 +535,7 @@ class Planner {
|
|||
* WARNING: Called from Stepper ISR context!
|
||||
*/
|
||||
static block_t* get_current_block() {
|
||||
if (blocks_queued()) {
|
||||
if (has_blocks_queued()) {
|
||||
block_t * const block = &block_buffer[block_buffer_tail];
|
||||
|
||||
// If the block has no trapezoid calculated, it's unsafe to execute.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue