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
be00e421
Commit
be00e421
authored
7 years ago
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Patch up M290, M851
parent
d29cb646
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Marlin/src/core/language.h
+1
-0
1 addition, 0 deletions
Marlin/src/core/language.h
Marlin/src/gcode/motion/M290.cpp
+9
-1
9 additions, 1 deletion
Marlin/src/gcode/motion/M290.cpp
Marlin/src/gcode/probe/M851.cpp
+6
-10
6 additions, 10 deletions
Marlin/src/gcode/probe/M851.cpp
with
16 additions
and
11 deletions
Marlin/src/core/language.h
+
1
−
0
View file @
be00e421
...
@@ -162,6 +162,7 @@
...
@@ -162,6 +162,7 @@
#define MSG_Z2_MIN "z2_min: "
#define MSG_Z2_MIN "z2_min: "
#define MSG_Z2_MAX "z2_max: "
#define MSG_Z2_MAX "z2_max: "
#define MSG_Z_PROBE "z_probe: "
#define MSG_Z_PROBE "z_probe: "
#define MSG_PROBE_Z_OFFSET "Probe Z Offset"
#define MSG_FILAMENT_RUNOUT_SENSOR "filament: "
#define MSG_FILAMENT_RUNOUT_SENSOR "filament: "
#define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)"
#define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)"
#define MSG_ERR_M355_NONE "No case light"
#define MSG_ERR_M355_NONE "No case light"
...
...
This diff is collapsed.
Click to expand it.
Marlin/src/gcode/motion/M290.cpp
+
9
−
1
View file @
be00e421
...
@@ -29,6 +29,10 @@
...
@@ -29,6 +29,10 @@
#include
"../../module/temperature.h"
#include
"../../module/temperature.h"
#include
"../../module/planner.h"
#include
"../../module/planner.h"
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
#include
"../../core/serial.h"
#endif
/**
/**
* M290: Babystepping
* M290: Babystepping
*/
*/
...
@@ -39,7 +43,7 @@ void GcodeSuite::M290() {
...
@@ -39,7 +43,7 @@ void GcodeSuite::M290() {
const
float
offs
=
constrain
(
parser
.
value_axis_units
((
AxisEnum
)
a
),
-
2
,
2
);
const
float
offs
=
constrain
(
parser
.
value_axis_units
((
AxisEnum
)
a
),
-
2
,
2
);
thermalManager
.
babystep_axis
((
AxisEnum
)
a
,
offs
*
planner
.
axis_steps_per_mm
[
a
]);
thermalManager
.
babystep_axis
((
AxisEnum
)
a
,
offs
*
planner
.
axis_steps_per_mm
[
a
]);
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
zprobe_zoffset
+=
offs
;
if
(
a
==
Z_AXIS
)
zprobe_zoffset
+=
offs
;
#endif
#endif
}
}
#else
#else
...
@@ -51,6 +55,10 @@ void GcodeSuite::M290() {
...
@@ -51,6 +55,10 @@ void GcodeSuite::M290() {
#endif
#endif
}
}
#endif
#endif
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
SERIAL_ECHO_START
();
SERIAL_ECHOLNPAIR
(
MSG_PROBE_Z_OFFSET
": "
,
zprobe_zoffset
);
#endif
}
}
#endif // BABYSTEPPING
#endif // BABYSTEPPING
This diff is collapsed.
Click to expand it.
Marlin/src/gcode/probe/M851.cpp
+
6
−
10
View file @
be00e421
...
@@ -30,20 +30,16 @@
...
@@ -30,20 +30,16 @@
void
GcodeSuite
::
M851
()
{
void
GcodeSuite
::
M851
()
{
SERIAL_ECHO_START
();
SERIAL_ECHO_START
();
SERIAL_ECHOPGM
(
MSG_
Z
PROBE_ZOFFSET
" "
);
SERIAL_ECHOPGM
(
MSG_PROBE_Z
_
OFFSET
);
if
(
parser
.
seen
(
'Z'
))
{
if
(
parser
.
seen
(
'Z'
))
{
const
float
value
=
parser
.
value_linear_units
();
const
float
value
=
parser
.
value_linear_units
();
if
(
WITHIN
(
value
,
Z_PROBE_OFFSET_RANGE_MIN
,
Z_PROBE_OFFSET_RANGE_MAX
))
{
if
(
!
WITHIN
(
value
,
Z_PROBE_OFFSET_RANGE_MIN
,
Z_PROBE_OFFSET_RANGE_MAX
))
{
zprobe_zoffset
=
value
;
SERIAL_ECHOLNPGM
(
" "
MSG_Z_MIN
" "
STRINGIFY
(
Z_PROBE_OFFSET_RANGE_MIN
)
" "
MSG_Z_MAX
" "
STRINGIFY
(
Z_PROBE_OFFSET_RANGE_MAX
))
;
SERIAL_ECHO
(
zprobe_zoffset
)
;
return
;
}
}
else
zprobe_zoffset
=
value
;
SERIAL_ECHOPGM
(
MSG_Z_MIN
" "
STRINGIFY
(
Z_PROBE_OFFSET_RANGE_MIN
)
" "
MSG_Z_MAX
" "
STRINGIFY
(
Z_PROBE_OFFSET_RANGE_MAX
));
}
}
else
SERIAL_ECHOLNPAIR
(
": "
,
zprobe_zoffset
);
SERIAL_ECHOPAIR
(
": "
,
zprobe_zoffset
);
SERIAL_EOL
();
}
}
#endif // HAS_BED_PROBE
#endif // HAS_BED_PROBE
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