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
a20c1fe4
Commit
a20c1fe4
authored
Jul 11, 2012
by
Kliment Yanev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
POtential fix for wx unicode decode errors
parent
d73709ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
printcore.py
printcore.py
+2
-2
pronterface.py
pronterface.py
+5
-2
No files found.
printcore.py
View file @
a20c1fe4
...
@@ -91,7 +91,7 @@ class printcore():
...
@@ -91,7 +91,7 @@ class printcore():
self
.
clear
=
True
self
.
clear
=
True
time
.
sleep
(
1.0
)
time
.
sleep
(
1.0
)
if
(
not
self
.
online
and
not
self
.
printing
):
if
(
not
self
.
online
and
not
self
.
printing
):
self
.
_send
(
"M105"
)
self
.
_send
(
"M105"
)
while
(
True
):
while
(
True
):
if
(
not
self
.
printer
or
not
self
.
printer
.
isOpen
):
if
(
not
self
.
printer
or
not
self
.
printer
.
isOpen
):
break
break
...
@@ -221,7 +221,7 @@ class printcore():
...
@@ -221,7 +221,7 @@ class printcore():
def
send_now
(
self
,
command
,
wait
=
0
):
def
send_now
(
self
,
command
,
wait
=
0
):
"""Sends a command to the printer ahead of the command queue, without a checksum
"""Sends a command to the printer ahead of the command queue, without a checksum
"""
"""
if
(
self
.
online
):
if
(
self
.
online
or
force
):
if
(
self
.
printing
):
if
(
self
.
printing
):
self
.
priqueue
+=
[
command
]
self
.
priqueue
+=
[
command
]
else
:
else
:
...
...
pronterface.py
View file @
a20c1fe4
...
@@ -74,7 +74,10 @@ class Tee(object):
...
@@ -74,7 +74,10 @@ class Tee(object):
def
__del__
(
self
):
def
__del__
(
self
):
sys
.
stdout
=
self
.
stdout
sys
.
stdout
=
self
.
stdout
def
write
(
self
,
data
):
def
write
(
self
,
data
):
self
.
target
(
data
)
try
:
self
.
target
(
data
)
except
:
pass
self
.
stdout
.
write
(
data
.
encode
(
"utf-8"
))
self
.
stdout
.
write
(
data
.
encode
(
"utf-8"
))
def
flush
(
self
):
def
flush
(
self
):
self
.
stdout
.
flush
()
self
.
stdout
.
flush
()
...
@@ -1546,7 +1549,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -1546,7 +1549,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
print
pronsole
.
totalelength
(
self
.
f
),
_
(
"mm of filament used in this print
\n
"
)
print
pronsole
.
totalelength
(
self
.
f
),
_
(
"mm of filament used in this print
\n
"
)
print
_
(
"the print goes from
%
f mm to
%
f mm in X
\n
and is
%
f mm wide
\n
"
)
%
(
Xmin
,
Xmax
,
Xtot
)
print
_
(
"the print goes from
%
f mm to
%
f mm in X
\n
and is
%
f mm wide
\n
"
)
%
(
Xmin
,
Xmax
,
Xtot
)
if
webavail
:
if
webavail
:
self
.
webInterface
.
AddLog
(
"the print goes from
%
f mm to
%
f mm in X
\n
and is
%
f mm wide
\n
"
)
%
(
Xmin
,
Xmax
,
Xtot
)
self
.
webInterface
.
AddLog
(
_
(
"the print goes from
%
f mm to
%
f mm in X
\n
and is
%
f mm wide
\n
"
)
%
(
Xmin
,
Xmax
,
Xtot
)
)
print
_
(
"the print goes from
%
f mm to
%
f mm in Y
\n
and is
%
f mm wide
\n
"
)
%
(
Ymin
,
Ymax
,
Ytot
)
print
_
(
"the print goes from
%
f mm to
%
f mm in Y
\n
and is
%
f mm wide
\n
"
)
%
(
Ymin
,
Ymax
,
Ytot
)
print
_
(
"the print goes from
%
f mm to
%
f mm in Z
\n
and is
%
f mm high
\n
"
)
%
(
Zmin
,
Zmax
,
Ztot
)
print
_
(
"the print goes from
%
f mm to
%
f mm in Z
\n
and is
%
f mm high
\n
"
)
%
(
Zmin
,
Zmax
,
Ztot
)
print
_
(
"Estimated duration (pessimistic): "
),
pronsole
.
estimate_duration
(
self
.
f
)
print
_
(
"Estimated duration (pessimistic): "
),
pronsole
.
estimate_duration
(
self
.
f
)
...
...
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