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
ae7b6f5c
Commit
ae7b6f5c
authored
Mar 18, 2012
by
Kliment Yanev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'experimental' of github.com:kliment/Printrun into experimental
parents
91312466
7a178733
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
277 additions
and
268 deletions
+277
-268
pronterface.mo
locale/fr/LC_MESSAGES/pronterface.mo
+0
-0
pronterface.po
locale/fr/LC_MESSAGES/pronterface.po
+138
-135
pronterface.pot
locale/pronterface.pot
+130
-130
printcore.py
printcore.py
+3
-0
pronterface.py
pronterface.py
+6
-3
No files found.
locale/fr/LC_MESSAGES/pronterface.mo
View file @
ae7b6f5c
No preview for this file type
locale/fr/LC_MESSAGES/pronterface.po
View file @
ae7b6f5c
This diff is collapsed.
Click to expand it.
locale/pronterface.pot
View file @
ae7b6f5c
This diff is collapsed.
Click to expand it.
printcore.py
View file @
ae7b6f5c
...
@@ -104,6 +104,9 @@ class printcore():
...
@@ -104,6 +104,9 @@ class printcore():
except
SerialException
,
e
:
except
SerialException
,
e
:
print
"Can't read from printer (disconnected?)."
print
"Can't read from printer (disconnected?)."
break
break
except
OSError
,
e
:
print
"Can't read from printer (disconnected?)."
break
if
(
len
(
line
)
>
1
):
if
(
len
(
line
)
>
1
):
self
.
log
+=
[
line
]
self
.
log
+=
[
line
]
...
...
pronterface.py
View file @
ae7b6f5c
...
@@ -147,6 +147,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -147,6 +147,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
p
.
startcb
=
self
.
startcb
self
.
p
.
startcb
=
self
.
startcb
self
.
p
.
endcb
=
self
.
endcb
self
.
p
.
endcb
=
self
.
endcb
self
.
starttime
=
0
self
.
starttime
=
0
self
.
extra_print_time
=
0
self
.
curlayer
=
0
self
.
curlayer
=
0
self
.
cur_button
=
None
self
.
cur_button
=
None
self
.
hsetpoint
=
0.0
self
.
hsetpoint
=
0.0
...
@@ -159,7 +160,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -159,7 +160,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
endcb
(
self
):
def
endcb
(
self
):
if
(
self
.
p
.
queueindex
==
0
):
if
(
self
.
p
.
queueindex
==
0
):
print
"Print ended at: "
+
time
.
strftime
(
'
%
H:
%
M:
%
S'
,
time
.
localtime
(
time
.
time
()))
print
"Print ended at: "
+
time
.
strftime
(
'
%
H:
%
M:
%
S'
,
time
.
localtime
(
time
.
time
()))
print
"and took: "
+
time
.
strftime
(
'
%
H:
%
M:
%
S'
,
time
.
gmtime
(
int
(
time
.
time
()
-
self
.
starttime
)))
#+str(int(time.time()-self.starttime)/60)+" minutes "+str(int(time.time()-self.starttime)%60)+" seconds."
print
"and took: "
+
time
.
strftime
(
'
%
H:
%
M:
%
S'
,
time
.
gmtime
(
int
(
time
.
time
()
-
self
.
starttime
+
self
.
extra_print_time
)))
#+str(int(time.time()-self.starttime)/60)+" minutes "+str(int(time.time()-self.starttime)%60)+" seconds."
wx
.
CallAfter
(
self
.
pausebtn
.
Disable
)
wx
.
CallAfter
(
self
.
pausebtn
.
Disable
)
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
_
(
"Print"
))
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
_
(
"Print"
))
...
@@ -1177,7 +1178,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -1177,7 +1178,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
string
+=
_
(
" Printing:
%04.2
f
%%
|"
)
%
(
100
*
float
(
self
.
p
.
queueindex
)
/
len
(
self
.
p
.
mainqueue
),)
string
+=
_
(
" Printing:
%04.2
f
%%
|"
)
%
(
100
*
float
(
self
.
p
.
queueindex
)
/
len
(
self
.
p
.
mainqueue
),)
string
+=
_
(
" Line#
%
d of
%
d lines |"
)
%
(
self
.
p
.
queueindex
,
len
(
self
.
p
.
mainqueue
))
string
+=
_
(
" Line#
%
d of
%
d lines |"
)
%
(
self
.
p
.
queueindex
,
len
(
self
.
p
.
mainqueue
))
if
fractioncomplete
>
0.0
:
if
fractioncomplete
>
0.0
:
secondselapsed
=
int
(
time
.
time
()
-
self
.
starttime
)
secondselapsed
=
int
(
time
.
time
()
-
self
.
starttime
+
self
.
extra_print_time
)
secondsestimate
=
secondselapsed
/
fractioncomplete
secondsestimate
=
secondselapsed
/
fractioncomplete
secondsremain
=
secondsestimate
-
secondselapsed
secondsremain
=
secondsestimate
-
secondselapsed
string
+=
_
(
" Est:
%
s of
%
s remaining | "
)
%
(
time
.
strftime
(
'
%
H:
%
M:
%
S'
,
time
.
gmtime
(
secondsremain
)),
string
+=
_
(
" Est:
%
s of
%
s remaining | "
)
%
(
time
.
strftime
(
'
%
H:
%
M:
%
S'
,
time
.
gmtime
(
secondsremain
)),
...
@@ -1368,7 +1369,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -1368,7 +1369,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
except
:
except
:
pass
pass
dlg
=
wx
.
FileDialog
(
self
,
_
(
"Open file to print"
),
basedir
,
style
=
wx
.
FD_OPEN
|
wx
.
FD_FILE_MUST_EXIST
)
dlg
=
wx
.
FileDialog
(
self
,
_
(
"Open file to print"
),
basedir
,
style
=
wx
.
FD_OPEN
|
wx
.
FD_FILE_MUST_EXIST
)
dlg
.
SetWildcard
(
_
(
"OBJ, STL, and GCODE files (;*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ;)
"
))
dlg
.
SetWildcard
(
_
(
"OBJ, STL, and GCODE files (*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ)|*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ|All Files (*.*)|*.*
"
))
if
(
filename
is
not
None
or
dlg
.
ShowModal
()
==
wx
.
ID_OK
):
if
(
filename
is
not
None
or
dlg
.
ShowModal
()
==
wx
.
ID_OK
):
if
filename
is
not
None
:
if
filename
is
not
None
:
name
=
filename
name
=
filename
...
@@ -1417,6 +1418,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -1417,6 +1418,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
wx
.
CallAfter
(
self
.
gviz
.
Refresh
)
wx
.
CallAfter
(
self
.
gviz
.
Refresh
)
def
printfile
(
self
,
event
):
def
printfile
(
self
,
event
):
self
.
extra_print_time
=
0
if
self
.
paused
:
if
self
.
paused
:
self
.
p
.
paused
=
0
self
.
p
.
paused
=
0
self
.
paused
=
0
self
.
paused
=
0
...
@@ -1479,6 +1481,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -1479,6 +1481,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
return
return
self
.
p
.
pause
()
self
.
p
.
pause
()
self
.
paused
=
True
self
.
paused
=
True
self
.
extra_print_time
+=
int
(
time
.
time
()
-
self
.
starttime
)
wx
.
CallAfter
(
self
.
pausebtn
.
SetLabel
,
_
(
"Resume"
))
wx
.
CallAfter
(
self
.
pausebtn
.
SetLabel
,
_
(
"Resume"
))
else
:
else
:
self
.
paused
=
False
self
.
paused
=
False
...
...
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