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
ee16eeba
Commit
ee16eeba
authored
Nov 05, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Buffer GCode duration
parent
1d6157c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
gcoder.py
printrun/gcoder.py
+4
-0
No files found.
printrun/gcoder.py
View file @
ee16eeba
...
@@ -137,6 +137,7 @@ class GCode(object):
...
@@ -137,6 +137,7 @@ class GCode(object):
# current abs X in machine current coordinate system: current_x - offset_x
# current abs X in machine current coordinate system: current_x - offset_x
filament_length
=
None
filament_length
=
None
duration
=
None
xmin
=
None
xmin
=
None
xmax
=
None
xmax
=
None
ymin
=
None
ymin
=
None
...
@@ -464,6 +465,8 @@ class GCode(object):
...
@@ -464,6 +465,8 @@ class GCode(object):
self
.
height
=
self
.
zmax
-
self
.
zmin
self
.
height
=
self
.
zmax
-
self
.
zmin
def
estimate_duration
(
self
):
def
estimate_duration
(
self
):
if
self
.
duration
is
not
None
:
return
self
.
duration
lastx
=
lasty
=
lastz
=
laste
=
lastf
=
0.0
lastx
=
lasty
=
lastz
=
laste
=
lastf
=
0.0
lastdx
=
0
lastdx
=
0
lastdy
=
0
lastdy
=
0
...
@@ -552,6 +555,7 @@ class GCode(object):
...
@@ -552,6 +555,7 @@ class GCode(object):
layerbeginduration
=
totalduration
layerbeginduration
=
totalduration
totaltime
=
datetime
.
timedelta
(
seconds
=
int
(
totalduration
))
totaltime
=
datetime
.
timedelta
(
seconds
=
int
(
totalduration
))
self
.
duration
=
totaltime
return
"
%
d layers,
%
s"
%
(
len
(
self
.
layers
),
str
(
totaltime
))
return
"
%
d layers,
%
s"
%
(
len
(
self
.
layers
),
str
(
totaltime
))
def
main
():
def
main
():
...
...
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