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
This commit is contained in:
Yuri D'Elia 2019-06-04 16:02:03 +02:00
parent 8ce1c04740
commit 1bed8cfa94

View File

@ -965,7 +965,7 @@ FORCE_INLINE void advance_isr_scheduler() {
while(--max_ticks); while(--max_ticks);
#ifdef FILAMENT_SENSOR #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_st_block_chunk(fsensor_counter);
fsensor_counter = 0; fsensor_counter = 0;