Refactor and optimize Stepper/Planner
Better encapsulation and considerably reduce stepper jitter
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "temperature.h"
|
||||
#include "endstops.h"
|
||||
|
||||
#include "../Marlin.h"
|
||||
#include "../lcd/ultralcd.h"
|
||||
@ -1725,6 +1726,7 @@ void Temperature::set_current_temp_raw() {
|
||||
* - Step the babysteps value for each axis towards 0
|
||||
* - For PINS_DEBUGGING, monitor and report endstop pins
|
||||
* - For ENDSTOP_INTERRUPTS_FEATURE check endstops if flagged
|
||||
* - Call planner.tick to count down its "ignore" time
|
||||
*/
|
||||
HAL_TEMP_TIMER_ISR {
|
||||
HAL_timer_isr_prologue(TEMP_TIMER_NUM);
|
||||
@ -2249,15 +2251,19 @@ void Temperature::isr() {
|
||||
endstops.run_monitor(); // report changes in endstop status
|
||||
#endif
|
||||
|
||||
// Update endstops state, if enabled
|
||||
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
|
||||
|
||||
extern volatile uint8_t e_hit;
|
||||
|
||||
if (e_hit && ENDSTOPS_ENABLED) {
|
||||
endstops.update(); // call endstop update routine
|
||||
endstops.update();
|
||||
e_hit--;
|
||||
}
|
||||
#else
|
||||
if (ENDSTOPS_ENABLED) endstops.update();
|
||||
#endif
|
||||
|
||||
// Periodically call the planner timer
|
||||
planner.tick();
|
||||
}
|
||||
|
||||
#if HAS_TEMP_SENSOR
|
||||
|
Reference in New Issue
Block a user