Browse Source

Fix cleaning_buffer_counter check (#21115)

vanilla_fb_2.0.x
espr14 3 years ago
committed by GitHub
parent
commit
a4c73860a1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      Marlin/src/module/planner.cpp

8
Marlin/src/module/planner.cpp

@ -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…
Cancel
Save