Fix cleaning_buffer_counter check (#21115)
This commit is contained in:
parent
c4fcf8bfd7
commit
bdb67b4397
|
@ -1690,13 +1690,15 @@ bool Planner::_buffer_steps(const xyze_long_t &target
|
||||||
, feedRate_t fr_mm_s, const uint8_t extruder, const float &millimeters
|
, feedRate_t fr_mm_s, const uint8_t extruder, const float &millimeters
|
||||||
) {
|
) {
|
||||||
|
|
||||||
// If we are cleaning, do not accept queuing of movements
|
|
||||||
if (cleaning_buffer_counter) return false;
|
|
||||||
|
|
||||||
// Wait for the next available block
|
// Wait for the next available block
|
||||||
uint8_t next_buffer_head;
|
uint8_t next_buffer_head;
|
||||||
block_t * const block = get_next_free_block(next_buffer_head);
|
block_t * const block = get_next_free_block(next_buffer_head);
|
||||||
|
|
||||||
|
// If we are cleaning, do not accept queuing of movements
|
||||||
|
// This must be after get_next_free_block() because it calls idle()
|
||||||
|
// where cleaning_buffer_counter can be changed
|
||||||
|
if (cleaning_buffer_counter) return false;
|
||||||
|
|
||||||
// Fill the block with the specified movement
|
// Fill the block with the specified movement
|
||||||
if (!_populate_block(block, false, target
|
if (!_populate_block(block, false, target
|
||||||
#if HAS_POSITION_FLOAT
|
#if HAS_POSITION_FLOAT
|
||||||
|
|
Loading…
Reference in a new issue