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
65cbd3b3
Commit
65cbd3b3
authored
Mar 29, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store total filament length used during successful prints (#453)
parent
c414b38b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
pronsole.py
printrun/pronsole.py
+7
-2
No files found.
printrun/pronsole.py
View file @
65cbd3b3
...
@@ -330,6 +330,7 @@ class Settings(object):
...
@@ -330,6 +330,7 @@ class Settings(object):
self
.
_add
(
HiddenSetting
(
"pause_between_prints"
,
True
))
self
.
_add
(
HiddenSetting
(
"pause_between_prints"
,
True
))
self
.
_add
(
HiddenSetting
(
"default_extrusion"
,
5.0
))
self
.
_add
(
HiddenSetting
(
"default_extrusion"
,
5.0
))
self
.
_add
(
HiddenSetting
(
"last_extrusion"
,
5.0
))
self
.
_add
(
HiddenSetting
(
"last_extrusion"
,
5.0
))
self
.
_add
(
HiddenSetting
(
"total_filament_used"
,
0.0
))
_settings
=
[]
_settings
=
[]
...
@@ -1391,8 +1392,12 @@ class pronsole(cmd.Cmd):
...
@@ -1391,8 +1392,12 @@ class pronsole(cmd.Cmd):
traceback
.
print_exc
(
file
=
sys
.
stdout
)
traceback
.
print_exc
(
file
=
sys
.
stdout
)
if
self
.
p
.
queueindex
==
0
:
if
self
.
p
.
queueindex
==
0
:
print_duration
=
int
(
time
.
time
()
-
self
.
starttime
+
self
.
extra_print_time
)
print_duration
=
int
(
time
.
time
()
-
self
.
starttime
+
self
.
extra_print_time
)
print
_
(
"Print ended at:
%(end_time)
s and took
%(duration)
s"
)
%
{
"end_time"
:
format_time
(
time
.
time
()),
self
.
log
(
_
(
"Print ended at:
%(end_time)
s and took
%(duration)
s"
)
%
{
"end_time"
:
format_time
(
time
.
time
()),
"duration"
:
format_duration
(
print_duration
)}
"duration"
:
format_duration
(
print_duration
)})
# Update total filament length used
new_total
=
self
.
settings
.
total_filament_used
+
self
.
fgcode
.
filament_length
self
.
set
(
"total_filament_used"
,
new_total
)
if
not
self
.
settings
.
final_command
:
if
not
self
.
settings
.
final_command
:
return
return
...
...
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