Fix interrupt-based endstop detection
This commit is contained in:
parent
d2f8971045
commit
3a4a229721
9 changed files with 332 additions and 283 deletions
|
|
@ -32,6 +32,7 @@
|
|||
#include "language.h"
|
||||
#include "printcounter.h"
|
||||
#include "delay.h"
|
||||
#include "endstops.h"
|
||||
|
||||
#if ENABLED(HEATER_0_USES_MAX6675)
|
||||
#include "MarlinSPI.h"
|
||||
|
|
@ -41,10 +42,6 @@
|
|||
#include "stepper.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
|
||||
#include "endstops.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(USE_WATCHDOG)
|
||||
#include "watchdog.h"
|
||||
#endif
|
||||
|
|
@ -2301,20 +2298,8 @@ void Temperature::isr() {
|
|||
}
|
||||
#endif // BABYSTEPPING
|
||||
|
||||
#if ENABLED(PINS_DEBUGGING)
|
||||
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();
|
||||
e_hit--;
|
||||
}
|
||||
#else
|
||||
if (ENDSTOPS_ENABLED) endstops.update();
|
||||
#endif
|
||||
// Poll endstops state, if required
|
||||
endstops.poll();
|
||||
|
||||
// Periodically call the planner timer
|
||||
planner.tick();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue