Reset LA state more carefully during stop conditions
This commit is contained in:
parent
1bed8cfa94
commit
cda9ed4a1d
|
|
@ -426,6 +426,13 @@ FORCE_INLINE void stepper_next_block()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_NEXT_ISR(2000); // 1kHz.
|
_NEXT_ISR(2000); // 1kHz.
|
||||||
|
|
||||||
|
#ifdef LIN_ADVANCE
|
||||||
|
// reset LA state and pressure when there's no block
|
||||||
|
nextAdvanceISR = ADV_NEVER;
|
||||||
|
e_steps = 0;
|
||||||
|
current_adv_steps = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
//WRITE_NC(LOGIC_ANALYZER_CH2, false);
|
//WRITE_NC(LOGIC_ANALYZER_CH2, false);
|
||||||
}
|
}
|
||||||
|
|
@ -982,6 +989,8 @@ FORCE_INLINE void advance_isr_scheduler() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void clear_current_adv_vars() {
|
void clear_current_adv_vars() {
|
||||||
|
nextAdvanceISR = ADV_NEVER;
|
||||||
|
e_steps = 0;
|
||||||
current_adv_steps = 0;
|
current_adv_steps = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1336,6 +1345,9 @@ void quickStop()
|
||||||
DISABLE_STEPPER_DRIVER_INTERRUPT();
|
DISABLE_STEPPER_DRIVER_INTERRUPT();
|
||||||
while (blocks_queued()) plan_discard_current_block();
|
while (blocks_queued()) plan_discard_current_block();
|
||||||
current_block = NULL;
|
current_block = NULL;
|
||||||
|
#ifdef LIN_ADVANCE
|
||||||
|
clear_current_adv_vars();
|
||||||
|
#endif
|
||||||
st_reset_timer();
|
st_reset_timer();
|
||||||
ENABLE_STEPPER_DRIVER_INTERRUPT();
|
ENABLE_STEPPER_DRIVER_INTERRUPT();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue