From 1bed8cfa941a29ec304f0cbc19677c24338fbc78 Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Tue, 4 Jun 2019 16:02:03 +0200 Subject: [PATCH] Don't call fsensor_st_next_block repeatedly during the last step Rely on st_block_begin to perform a single call instead of calling block_chunk for each advance tick in the last step --- Firmware/stepper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/stepper.cpp b/Firmware/stepper.cpp index 111d1fa7..68f36342 100644 --- a/Firmware/stepper.cpp +++ b/Firmware/stepper.cpp @@ -965,7 +965,7 @@ FORCE_INLINE void advance_isr_scheduler() { while(--max_ticks); #ifdef FILAMENT_SENSOR - if (!current_block || (abs(fsensor_counter) >= fsensor_chunk_len)) + if (abs(fsensor_counter) >= fsensor_chunk_len) { fsensor_st_block_chunk(fsensor_counter); fsensor_counter = 0;