mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 11:43:47 +00:00
Fix cleaning_buffer_counter check (#21115)
This commit is contained in:
parent
241297b6d6
commit
a4c73860a1
@ -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
|
||||
) {
|
||||
|
||||
// If we are cleaning, do not accept queuing of movements
|
||||
if (cleaning_buffer_counter) return false;
|
||||
|
||||
// Wait for the next available block
|
||||
uint8_t 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
|
||||
if (!_populate_block(block, false, target
|
||||
#if HAS_POSITION_FLOAT
|
||||
|
Loading…
Reference in New Issue
Block a user