Fix interrupt-based endstop detection

- Also implemented real endstop reading on interrupt.
This commit is contained in:
etagle
2018-05-16 04:08:43 -03:00
committed by Scott Lahteine
parent a4af975873
commit 569df3fc0c
14 changed files with 319 additions and 324 deletions

View File

@ -95,10 +95,6 @@
#include "feature/I2CPositionEncoder.h"
#endif
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
#include HAL_PATH(HAL, endstop_interrupts.h)
#endif
#if HAS_TRINAMIC
#include "feature/tmc_util.h"
#endif
@ -748,7 +744,9 @@ void setup() {
print_job_timer.init(); // Initial setup of print job timer
stepper.init(); // Initialize stepper, this enables interrupts!
endstops.init(); // Init endstops and pullups
stepper.init(); // Init stepper. This enables interrupts!
#if HAS_SERVOS
servo_init();
@ -860,10 +858,6 @@ void setup() {
i2c.onRequest(i2c_on_request);
#endif
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
setup_endstop_interrupts();
#endif
#if DO_SWITCH_EXTRUDER
move_extruder_servo(0); // Initialize extruder servo
#endif