Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
e0747488
Commit
e0747488
authored
Nov 04, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start merging GCoder with GCodeAnalyzer
parent
0e24f2b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
GCodeAnalyzer.py
printrun/GCodeAnalyzer.py
+2
-3
No files found.
printrun/GCodeAnalyzer.py
View file @
e0747488
...
...
@@ -34,6 +34,7 @@ import gcoder
class
GCodeAnalyzer
():
def
__init__
(
self
):
self
.
gcoder
=
gcoder
.
GCode
([])
self
.
x
=
0
self
.
y
=
0
self
.
z
=
0
...
...
@@ -61,8 +62,7 @@ class GCodeAnalyzer():
self
.
hasHomeZ
=
False
def
Analyze
(
self
,
gcode
):
gline
=
gcoder
.
Line
(
gcode
)
split_raw
=
gcoder
.
split
(
gline
)
gline
=
self
.
gcoder
.
append
(
gcode
,
store
=
False
)
if
gline
.
command
.
startswith
(
";@"
):
return
# code is a host command
try
:
code_g
=
int
(
gline
.
command
[
1
:])
if
gline
.
command
.
startswith
(
"G"
)
else
None
...
...
@@ -71,7 +71,6 @@ class GCodeAnalyzer():
# If we fail to parse the code number, this is probably not a
# standard G-Code but rather a host command, so return immediately
return
gcoder
.
parse_coordinates
(
gline
,
split_raw
,
self
.
imperial
)
#get movement codes
if
gline
.
is_move
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment