From b6bcb901f35a2558c349e468b28c9e3b04c8e022 Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Thu, 27 Jun 2019 12:50:53 +0200 Subject: [PATCH] Correct initialization of eISR_Err Further tweak the initial term to improve the linearity of the resulting speed after BW filtering. --- Firmware/stepper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/stepper.cpp b/Firmware/stepper.cpp index 1283675c..b30f77e6 100644 --- a/Firmware/stepper.cpp +++ b/Firmware/stepper.cpp @@ -846,7 +846,7 @@ FORCE_INLINE void isr() { #ifdef LIN_ADVANCE // avoid multiple instances or function calls to advance_spread - if (la_state & ADV_INIT) eISR_Rate = current_block->advance_rate / 2; + if (la_state & ADV_INIT) eISR_Err = current_block->advance_rate / 4; if (la_state & ADV_INIT || nextAdvanceISR != ADV_NEVER) { advance_spread(main_Rate); if (la_state & ADV_DECELERATE) {