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
8125f893
Commit
8125f893
authored
Jul 17, 2011
by
kliment
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print elapsed time after print is done.
parent
bfe99db5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
pronterface.py
pronterface.py
+14
-0
No files found.
pronterface.py
View file @
8125f893
...
...
@@ -96,8 +96,20 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
stdout
=
sys
.
stdout
self
.
mini
=
False
self
.
p
.
sendcb
=
self
.
sentcb
self
.
p
.
startcb
=
self
.
startcb
self
.
p
.
endcb
=
self
.
endcb
self
.
starttime
=
0
self
.
curlayer
=
0
def
startcb
(
self
):
self
.
starttime
=
time
.
time
()
def
endcb
(
self
):
print
"Print took "
+
str
(
int
(
time
.
time
()
-
self
.
starttime
))
+
" seconds."
wx
.
CallAfter
(
self
.
pausebtn
.
Hide
)
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
"Print"
)
def
online
(
self
):
print
"Printer is now online"
self
.
connectbtn
.
Disable
();
...
...
@@ -592,11 +604,13 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
wx
.
CallAfter
(
self
.
status
.
SetStatusText
,
"Starting print"
)
self
.
sdprinting
=
1
self
.
p
.
send_now
(
"M24"
)
self
.
startcb
()
return
if
"Done printing file"
in
l
:
wx
.
CallAfter
(
self
.
status
.
SetStatusText
,
l
)
self
.
sdprinting
=
0
self
.
recvlisteners
.
remove
(
self
.
waitforsdresponse
)
self
.
endcb
()
return
if
"SD printing byte"
in
l
:
#M27 handler
...
...
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