File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1582,7 +1582,9 @@ void Planner::quick_stop() {
1582
1582
const bool was_enabled = stepper.suspend ();
1583
1583
1584
1584
// Drop all queue entries
1585
- block_buffer_nonbusy = block_buffer_head = block_buffer_tail;
1585
+ const uint8_t tail_value = block_buffer_tail; // Read tail value once
1586
+ block_buffer_head = tail_value;
1587
+ block_buffer_nonbusy = tail_value;
1586
1588
1587
1589
// Restart the block delay for the first movement - As the queue was
1588
1590
// forced to empty, there's no risk the ISR will touch this.
Original file line number Diff line number Diff line change @@ -816,7 +816,11 @@ class Planner {
816
816
FORCE_INLINE static uint8_t nonbusy_movesplanned () { return block_dec_mod (block_buffer_head, block_buffer_nonbusy); }
817
817
818
818
// Remove all blocks from the buffer
819
- FORCE_INLINE static void clear_block_buffer () { block_buffer_nonbusy = block_buffer_head = block_buffer_tail = 0 ; }
819
+ FORCE_INLINE static void clear_block_buffer () {
820
+ block_buffer_tail = 0 ;
821
+ block_buffer_head = 0 ;
822
+ block_buffer_nonbusy = 0 ;
823
+ }
820
824
821
825
// Check if movement queue is full
822
826
FORCE_INLINE static bool is_full () { return block_buffer_tail == next_block_index (block_buffer_head); }
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ build_flags = -std=gnu++23
21
21
-DADC_RESOLUTION =12
22
22
-DCORE_DEBUG
23
23
-Wno-deprecated-declarations
24
- -Wno-volatile
25
24
extra_scripts = ${common.extra_scripts}
26
25
27
26
#
You can’t perform that action at this time.
0 commit comments