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
f22c9a1a
Commit
f22c9a1a
authored
May 11, 2019
by
Giuliano Zaro
Committed by
Scott Lahteine
May 11, 2019
Browse files
Options
Downloads
Patches
Plain Diff
Fix G-code parser with MMU2 (#13951)
parent
746c38f4
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/parser.cpp
+7
-11
7 additions, 11 deletions
Marlin/src/gcode/parser.cpp
with
7 additions
and
11 deletions
Marlin/src/gcode/parser.cpp
+
7
−
11
View file @
f22c9a1a
...
@@ -142,27 +142,23 @@ void GCodeParser::parse(char *p) {
...
@@ -142,27 +142,23 @@ void GCodeParser::parse(char *p) {
// Skip spaces to get the numeric part
// Skip spaces to get the numeric part
while
(
*
p
==
' '
)
p
++
;
while
(
*
p
==
' '
)
p
++
;
// Bail if there's no command code number
// Prusa MMU2 has T?/Tx/Tc commands
#if DISABLED(PRUSA_MMU2)
if
(
!
NUMERIC
(
*
p
))
return
;
#endif
// Save the command letter at this point
// A '?' signifies an unknown command
command_letter
=
letter
;
#if ENABLED(PRUSA_MMU2)
#if ENABLED(PRUSA_MMU2)
if
(
letter
==
'T'
)
{
if
(
letter
==
'T'
)
{
// check for special MMU2 T?/Tx/Tc commands
// check for special MMU2 T?/Tx/Tc commands
if
(
*
p
==
'?'
||
*
p
==
'x'
||
*
p
==
'c'
)
{
if
(
*
p
==
'?'
||
*
p
==
'x'
||
*
p
==
'c'
)
{
command_letter
=
letter
;
string_arg
=
p
;
string_arg
=
p
;
return
;
return
;
}
}
}
}
#endif
#endif
// Bail if there's no command code number
if
(
!
NUMERIC
(
*
p
))
return
;
// Save the command letter at this point
// A '?' signifies an unknown command
command_letter
=
letter
;
// Get the code number - integer digits only
// Get the code number - integer digits only
codenum
=
0
;
codenum
=
0
;
...
...
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