Initialize current_adv_steps correctly

Initialize at 0 both on startup and on reset on regular (non-LA)
segments to avoid cumulating errors.
This commit is contained in:
Yuri D'Elia 2019-05-19 14:26:23 +02:00
parent 707849e6c4
commit a1be8b6784

View file

@ -361,6 +361,7 @@ FORCE_INLINE void stepper_next_block()
eISR_Rate = ADV_NEVER;
e_step_loops = 1;
LA_phase = -1;
current_adv_steps = 0;
}
#endif
@ -1165,6 +1166,7 @@ void st_init()
e_steps = 0;
e_step_loops = 1;
LA_phase = -1;
current_adv_steps = 0;
#endif
enable_endstops(true); // Start with endstops active. After homing they can be disabled