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
07a0822e
Commit
07a0822e
authored
Nov 5, 2018
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
M420 support in MARLIN_DEV_MODE
parent
b2ad2c87
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Marlin/src/gcode/bedlevel/M420.cpp
+25
-2
25 additions, 2 deletions
Marlin/src/gcode/bedlevel/M420.cpp
with
25 additions
and
2 deletions
Marlin/src/gcode/bedlevel/M420.cpp
+
25
−
2
View file @
07a0822e
...
@@ -49,10 +49,33 @@
...
@@ -49,10 +49,33 @@
* With mesh-based leveling only:
* With mesh-based leveling only:
*
*
* C Center mesh on the mean of the lowest and highest
* C Center mesh on the mean of the lowest and highest
*
* With MARLIN_DEV_MODE:
* S2 Create a simple random mesh and enable
*/
*/
void
GcodeSuite
::
M420
()
{
void
GcodeSuite
::
M420
()
{
const
bool
seen_S
=
parser
.
seen
(
'S'
);
const
bool
seen_S
=
parser
.
seen
(
'S'
),
bool
to_enable
=
seen_S
?
parser
.
value_bool
()
:
planner
.
leveling_active
;
to_enable
=
seen_S
?
parser
.
value_bool
()
:
planner
.
leveling_active
;
#if ENABLED(MARLIN_DEV_MODE)
if
(
parser
.
intval
(
'S'
)
==
2
)
{
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
bilinear_start
[
X_AXIS
]
=
MIN_PROBE_X
;
bilinear_start
[
Y_AXIS
]
=
MIN_PROBE_Y
;
bilinear_grid_spacing
[
X_AXIS
]
=
(
MAX_PROBE_X
-
(
MIN_PROBE_X
))
/
(
GRID_MAX_POINTS_X
-
1
);
bilinear_grid_spacing
[
Y_AXIS
]
=
(
MAX_PROBE_Y
-
(
MIN_PROBE_Y
))
/
(
GRID_MAX_POINTS_Y
-
1
);
#endif
for
(
uint8_t
x
=
0
;
x
<
GRID_MAX_POINTS_X
;
x
++
)
for
(
uint8_t
y
=
0
;
y
<
GRID_MAX_POINTS_Y
;
y
++
)
Z_VALUES
(
x
,
y
)
=
0.001
*
random
(
-
200
,
200
);
SERIAL_ECHOPGM
(
"Simulated "
STRINGIFY
(
GRID_MAX_POINTS_X
)
"x"
STRINGIFY
(
GRID_MAX_POINTS_X
)
" mesh "
);
SERIAL_ECHOPAIR
(
" ("
,
MIN_PROBE_X
);
SERIAL_CHAR
(
','
);
SERIAL_ECHO
(
MIN_PROBE_Y
);
SERIAL_ECHOPAIR
(
")-("
,
MAX_PROBE_X
);
SERIAL_CHAR
(
','
);
SERIAL_ECHO
(
MAX_PROBE_Y
);
SERIAL_ECHOLNPGM
(
")"
);
}
#endif
// If disabling leveling do it right away
// If disabling leveling do it right away
// (Don't disable for just M420 or M420 V)
// (Don't disable for just M420 or M420 V)
...
...
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