Introduce endstop interrupts#5184
Conversation
|
I tested this on my RAMPS 1.4 last night. |
c1282ce to
e5cc02e
Compare
|
Sorry. Mainly forgot to commit the initialization in Marlin_main.cpp. |
|
Same problem. |
|
How do you compile? |
|
Compile using Arduino IDE 1.6.11. |
If ENDSTOP_INTERRUPTS_FEATURE is enabled this tries to set up interrupt routines for all used endstop pins. If this worked without errors, `endstops.update()` is called only if one of the endstops changed its state. The new interrupt routines do not really check the endstops and react upon them. All what they do, is to set a flag if it makes sense to call the endstop test we are used to. This can be used on: * ARM (DUE) based boards - all pins can raise interrupts, * RAMPS - all 6 endstop pins plus some other on EXT-2 can raise interrupts, * RAMPS based boards - as long the designers did not change the pins for the endstops or at least left enough, * all boards, if there are enough pins that can raise interrupts, and you are willing/able to swap with pins dedicated to other purpose.
e5cc02e to
f3eee02
Compare
|
@oysteinkrog Any other testers? |
|
I am currently using Arduino IDE to compile/upload. |
|
Great work! I will review this and merge it soon. It's very nice that you included a test .ino.
More would be good! But then, this is pretty straightforward. |
|
|
||
| void setup() { | ||
| Serial.begin(9600); | ||
| Serial.println("PINs causing interrups are:"); |
There was a problem hiding this comment.
Merged too soon. But no biggie.
|
This seems to only work if the endstops aren't already triggered. Not a pretty sound when all 3 endstops get ignored simultaneously. |
|
Fixed but not merged yet 4h ago (Endstop interrupt refinement #5256) |
|
Thanks. I really can't test. Please test thoroughly. |
If
ENDSTOP_INTERRUPTS_FEATUREis enabled this tries to set up interrupt routinesfor all used endstop pins. If this worked without errors,
endstops.update()is calledonly if one of the endstops changed its state.
The new interrupt routines do not really check the endstops and react upon them. All what they
do, is to set a flag if it makes sense to call the endstop test we are used to.
This can be used on:
Tested only with RAMPS 1.4
#5102