Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
053438a3
Unverified
Commit
053438a3
authored
Jun 27, 2018
by
Scott Lahteine
Committed by
GitHub
Jun 27, 2018
Browse files
Options
Downloads
Patches
Plain Diff
Poll all endstops, even when stationary (#11123)
parent
3b3029c4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Marlin/src/inc/SanityCheck.h
+2
-0
2 additions, 0 deletions
Marlin/src/inc/SanityCheck.h
Marlin/src/module/endstops.cpp
+78
-93
78 additions, 93 deletions
Marlin/src/module/endstops.cpp
with
80 additions
and
93 deletions
Marlin/src/inc/SanityCheck.h
+
2
−
0
View file @
053438a3
...
@@ -1528,6 +1528,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
...
@@ -1528,6 +1528,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING when homing to Y_MIN."
#error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING when homing to Y_MIN."
#elif Y_HOME_DIR == 1 && DISABLED(Y_MAX_ENDSTOP_INVERTING)
#elif Y_HOME_DIR == 1 && DISABLED(Y_MAX_ENDSTOP_INVERTING)
#error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING when homing to Y_MAX."
#error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING when homing to Y_MAX."
#elif ENABLED(ENDSTOP_NOISE_FILTER)
#error "SENSORLESS_HOMING is incompatible with ENDSTOP_NOISE_FILTER."
#endif
#endif
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
Marlin/src/module/endstops.cpp
+
78
−
93
View file @
053438a3
...
@@ -429,10 +429,8 @@ void Endstops::update() {
...
@@ -429,10 +429,8 @@ void Endstops::update() {
#endif
#endif
/**
/**
* Check and update endstops
according to conditions
* Check and update endstops
*/
*/
if
(
stepper
.
axis_is_moving
(
X_AXIS
))
{
if
(
stepper
.
motor_direction
(
X_AXIS_HEAD
))
{
// -direction
#if HAS_X_MIN
#if HAS_X_MIN
#if ENABLED(X_DUAL_ENDSTOPS) && X_HOME_DIR < 0
#if ENABLED(X_DUAL_ENDSTOPS) && X_HOME_DIR < 0
UPDATE_ENDSTOP_BIT
(
X
,
MIN
);
UPDATE_ENDSTOP_BIT
(
X
,
MIN
);
...
@@ -442,11 +440,10 @@ void Endstops::update() {
...
@@ -442,11 +440,10 @@ void Endstops::update() {
COPY_LIVE_STATE
(
X_MIN
,
X2_MIN
);
COPY_LIVE_STATE
(
X_MIN
,
X2_MIN
);
#endif
#endif
#else
#else
if
(
X_MIN_TEST
)
UPDATE_ENDSTOP_BIT
(
X
,
MIN
);
UPDATE_ENDSTOP_BIT
(
X
,
MIN
);
#endif
#endif
#endif
#endif
}
else
{
// +direction
#if HAS_X_MAX
#if HAS_X_MAX
#if ENABLED(X_DUAL_ENDSTOPS) && X_HOME_DIR > 0
#if ENABLED(X_DUAL_ENDSTOPS) && X_HOME_DIR > 0
UPDATE_ENDSTOP_BIT
(
X
,
MAX
);
UPDATE_ENDSTOP_BIT
(
X
,
MAX
);
...
@@ -456,14 +453,10 @@ void Endstops::update() {
...
@@ -456,14 +453,10 @@ void Endstops::update() {
COPY_LIVE_STATE
(
X_MAX
,
X2_MAX
);
COPY_LIVE_STATE
(
X_MAX
,
X2_MAX
);
#endif
#endif
#else
#else
if
(
X_MAX_TEST
)
UPDATE_ENDSTOP_BIT
(
X
,
MAX
);
UPDATE_ENDSTOP_BIT
(
X
,
MAX
);
#endif
#endif
#endif
#endif
}
}
if
(
stepper
.
axis_is_moving
(
Y_AXIS
))
{
if
(
stepper
.
motor_direction
(
Y_AXIS_HEAD
))
{
// -direction
#if HAS_Y_MIN && Y_HOME_DIR < 0
#if HAS_Y_MIN && Y_HOME_DIR < 0
#if ENABLED(Y_DUAL_ENDSTOPS)
#if ENABLED(Y_DUAL_ENDSTOPS)
UPDATE_ENDSTOP_BIT
(
Y
,
MIN
);
UPDATE_ENDSTOP_BIT
(
Y
,
MIN
);
...
@@ -476,8 +469,7 @@ void Endstops::update() {
...
@@ -476,8 +469,7 @@ void Endstops::update() {
UPDATE_ENDSTOP_BIT
(
Y
,
MIN
);
UPDATE_ENDSTOP_BIT
(
Y
,
MIN
);
#endif
#endif
#endif
#endif
}
else
{
// +direction
#if HAS_Y_MAX && Y_HOME_DIR > 0
#if HAS_Y_MAX && Y_HOME_DIR > 0
#if ENABLED(Y_DUAL_ENDSTOPS)
#if ENABLED(Y_DUAL_ENDSTOPS)
UPDATE_ENDSTOP_BIT
(
Y
,
MAX
);
UPDATE_ENDSTOP_BIT
(
Y
,
MAX
);
...
@@ -490,11 +482,7 @@ void Endstops::update() {
...
@@ -490,11 +482,7 @@ void Endstops::update() {
UPDATE_ENDSTOP_BIT
(
Y
,
MAX
);
UPDATE_ENDSTOP_BIT
(
Y
,
MAX
);
#endif
#endif
#endif
#endif
}
}
if
(
stepper
.
axis_is_moving
(
Z_AXIS
))
{
if
(
stepper
.
motor_direction
(
Z_AXIS_HEAD
))
{
// Z -direction. Gantry down, bed up.
#if HAS_Z_MIN
#if HAS_Z_MIN
#if ENABLED(Z_DUAL_ENDSTOPS) && Z_HOME_DIR < 0
#if ENABLED(Z_DUAL_ENDSTOPS) && Z_HOME_DIR < 0
UPDATE_ENDSTOP_BIT
(
Z
,
MIN
);
UPDATE_ENDSTOP_BIT
(
Z
,
MIN
);
...
@@ -504,7 +492,7 @@ void Endstops::update() {
...
@@ -504,7 +492,7 @@ void Endstops::update() {
COPY_LIVE_STATE
(
Z_MIN
,
Z2_MIN
);
COPY_LIVE_STATE
(
Z_MIN
,
Z2_MIN
);
#endif
#endif
#elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
#elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
if
(
z_probe_enabled
)
UPDATE_ENDSTOP_BIT
(
Z
,
MIN
);
UPDATE_ENDSTOP_BIT
(
Z
,
MIN
);
#elif Z_HOME_DIR < 0
#elif Z_HOME_DIR < 0
UPDATE_ENDSTOP_BIT
(
Z
,
MIN
);
UPDATE_ENDSTOP_BIT
(
Z
,
MIN
);
#endif
#endif
...
@@ -512,10 +500,9 @@ void Endstops::update() {
...
@@ -512,10 +500,9 @@ void Endstops::update() {
// When closing the gap check the enabled probe
// When closing the gap check the enabled probe
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
if
(
z_probe_enabled
)
UPDATE_ENDSTOP_BIT
(
Z
,
MIN_PROBE
);
UPDATE_ENDSTOP_BIT
(
Z
,
MIN_PROBE
);
#endif
#endif
}
else
{
// Z +direction. Gantry up, bed down.
#if HAS_Z_MAX && Z_HOME_DIR > 0
#if HAS_Z_MAX && Z_HOME_DIR > 0
// Check both Z dual endstops
// Check both Z dual endstops
#if ENABLED(Z_DUAL_ENDSTOPS)
#if ENABLED(Z_DUAL_ENDSTOPS)
...
@@ -530,8 +517,6 @@ void Endstops::update() {
...
@@ -530,8 +517,6 @@ void Endstops::update() {
UPDATE_ENDSTOP_BIT
(
Z
,
MAX
);
UPDATE_ENDSTOP_BIT
(
Z
,
MAX
);
#endif
#endif
#endif
#endif
}
}
#if ENABLED(ENDSTOP_NOISE_FILTER)
#if ENABLED(ENDSTOP_NOISE_FILTER)
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment