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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
ad4a9eb7
Unverified
Commit
ad4a9eb7
authored
5 years ago
by
jufimu12
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix G34 probing range/error bug (#17052)
parent
5aa52878
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Marlin/src/gcode/calibrate/G34_M422.cpp
+9
-3
9 additions, 3 deletions
Marlin/src/gcode/calibrate/G34_M422.cpp
with
9 additions
and
3 deletions
Marlin/src/gcode/calibrate/G34_M422.cpp
+
9
−
3
View file @
ad4a9eb7
...
@@ -153,7 +153,9 @@ void GcodeSuite::G34() {
...
@@ -153,7 +153,9 @@ void GcodeSuite::G34() {
if
(
!
all_axes_known
())
home_all_axes
();
if
(
!
all_axes_known
())
home_all_axes
();
// Move the Z coordinate realm towards the positive - dirty trick
// Move the Z coordinate realm towards the positive - dirty trick
current_position
.
z
-=
z_probe
*
0.5
f
;
current_position
.
z
+=
z_probe
*
0.5
f
;
sync_plan_position
();
// Now, the Z origin lies below the build plate. That allows to probe deeper, before run_z_probe throws an error.
#if DISABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
#if DISABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
float
last_z_align_move
[
NUM_Z_STEPPER_DRIVERS
]
=
ARRAY_N
(
NUM_Z_STEPPER_DRIVERS
,
10000.0
f
,
10000.0
f
,
10000.0
f
);
float
last_z_align_move
[
NUM_Z_STEPPER_DRIVERS
]
=
ARRAY_N
(
NUM_Z_STEPPER_DRIVERS
,
10000.0
f
,
10000.0
f
,
10000.0
f
);
...
@@ -171,7 +173,9 @@ void GcodeSuite::G34() {
...
@@ -171,7 +173,9 @@ void GcodeSuite::G34() {
bool
adjustment_reverse
=
false
;
bool
adjustment_reverse
=
false
;
#endif
#endif
LOOP_L_N
(
iteration
,
z_auto_align_iterations
)
{
// 'iteration' is declared above and is also used after the for-loop.
// *not* the same as LOOP_L_N(iteration, z_auto_align_iterations)
for
(
iteration
=
0
;
iteration
<
z_auto_align_iterations
;
++
iteration
)
{
if
(
DEBUGGING
(
LEVELING
))
DEBUG_ECHOLNPGM
(
"> probing all positions."
);
if
(
DEBUGGING
(
LEVELING
))
DEBUG_ECHOLNPGM
(
"> probing all positions."
);
SERIAL_ECHOLNPAIR
(
"
\n
ITERATION: "
,
int
(
iteration
+
1
));
SERIAL_ECHOLNPAIR
(
"
\n
ITERATION: "
,
int
(
iteration
+
1
));
...
@@ -192,7 +196,9 @@ void GcodeSuite::G34() {
...
@@ -192,7 +196,9 @@ void GcodeSuite::G34() {
DEBUG_ECHOLNPAIR_P
(
PSTR
(
"Probing X"
),
z_stepper_align
.
xy
[
iprobe
].
x
,
SP_Y_STR
,
z_stepper_align
.
xy
[
iprobe
].
y
);
DEBUG_ECHOLNPAIR_P
(
PSTR
(
"Probing X"
),
z_stepper_align
.
xy
[
iprobe
].
x
,
SP_Y_STR
,
z_stepper_align
.
xy
[
iprobe
].
y
);
// Probe a Z height for each stepper.
// Probe a Z height for each stepper.
const
float
z_probed_height
=
probe
.
probe_at_point
(
z_stepper_align
.
xy
[
iprobe
],
raise_after
,
0
,
true
);
// Probing sanity check is disabled, as it would trigger even in normal cases because
// current_position.z has been manually altered in the "dirty trick" above.
const
float
z_probed_height
=
probe
.
probe_at_point
(
z_stepper_align
.
xy
[
iprobe
],
raise_after
,
0
,
true
,
false
);
if
(
isnan
(
z_probed_height
))
{
if
(
isnan
(
z_probed_height
))
{
SERIAL_ECHOLNPGM
(
"Probing failed."
);
SERIAL_ECHOLNPGM
(
"Probing failed."
);
err_break
=
true
;
err_break
=
true
;
...
...
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