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
55dd4239
Commit
55dd4239
authored
Oct 11, 2011
by
Keegi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote branch 'kliment/master' into experimental
parents
e9e721bd
567c1d23
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
9 deletions
+36
-9
README.md
README.md
+5
-4
pronterface.py
pronterface.py
+31
-5
No files found.
README.md
View file @
55dd4239
...
...
@@ -12,8 +12,7 @@ Download the following, and install in this order:
1.
http://python.org/ftp/python/2.7.2/python-2.7.2.msi
2.
http://pypi.python.org/packages/any/p/pyserial/pyserial-2.5.win32.exe
3.
http://downloads.sourceforge.net/wxpython/wxPython2.8-win32-unicode-2.8.12.0-py27.exe
4.
http://launchpad.net/pyreadline/trunk/1.7/+download/pyreadline-1.7.win32.exe
4.
http://launchpad.net/pyreadline/1.7/1.7/+download/pyreadline-1.7.zip
## Ubuntu/Debian
`sudo apt-get install python-serial python-wxgtk2.8`
...
...
@@ -27,8 +26,10 @@ Download the following, and install in this order:
3.
Download and unpack pyserial from http://pypi.python.org/packages/source/p/pyserial/pyserial-2.5.tar.gz
4.
In a terminal, change to the folder you unzipped to, then type in:
`sudo python setup.py install`
The tools will run just fine in 64bit on Lion, you don't need to mess
with any of the 32bit settings.
The tools will probably run just fine in 64bit on Lion, you don't need to mess
with any of the 32bit settings. In case they don't, try
5.
export VERSIONER_PYTHON_PREFER_32_BIT=yes
in a terminal before running Pronterface
## Mac OS X (pre Lion)
1.
Download and install http://downloads.sourceforge.net/wxpython/wxPython2.8-osx-unicode-2.8.12.0-universal-py2.6.dmg
...
...
pronterface.py
View file @
55dd4239
...
...
@@ -146,13 +146,13 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
endcb
(
self
):
if
(
self
.
p
.
queueindex
==
0
):
print
"Print took "
+
str
(
int
(
time
.
time
()
-
self
.
starttime
)
/
60
)
+
" minutes "
+
str
(
int
(
time
.
time
()
-
self
.
starttime
)
%
60
)
+
" seconds"
print
"Print took "
+
str
(
int
(
time
.
time
()
-
self
.
starttime
)
/
60
)
+
" minutes "
+
str
(
int
(
time
.
time
()
-
self
.
starttime
)
%
60
)
+
" seconds
.
"
wx
.
CallAfter
(
self
.
pausebtn
.
Disable
)
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
_
(
"Print"
))
def
online
(
self
):
print
_
(
"Printer is now online"
)
print
_
(
"Printer is now online
.
"
)
wx
.
CallAfter
(
self
.
connectbtn
.
Disable
)
for
i
in
self
.
printerControls
:
wx
.
CallAfter
(
i
.
Enable
)
...
...
@@ -491,23 +491,45 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
lls
.
Add
(
wx
.
StaticText
(
self
.
panel
,
-
1
,
_
(
"Heater:"
),
pos
=
(
0
,
343
)),
pos
=
(
11
,
0
),
span
=
(
1
,
1
))
htemp_choices
=
[
self
.
temps
[
i
]
+
" ("
+
i
+
")"
for
i
in
sorted
(
self
.
temps
.
keys
(),
key
=
lambda
x
:
self
.
temps
[
x
])]
if
self
.
settings
.
last_temperature
not
in
map
(
float
,
self
.
temps
.
values
()):
htemp_choices
=
[
str
(
self
.
settings
.
last_temperature
)]
+
htemp_choices
self
.
htemp
=
wx
.
ComboBox
(
self
.
panel
,
-
1
,
choices
=
htemp_choices
,
style
=
wx
.
CB_DROPDOWN
,
size
=
(
90
,
25
),
pos
=
(
45
,
337
))
self
.
htemp
.
SetValue
(
"0"
)
lls
.
Add
(
self
.
htemp
,
pos
=
(
11
,
1
),
span
=
(
1
,
3
))
self
.
settbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Set"
),
size
=
(
38
,
-
1
),
pos
=
(
135
,
335
))
self
.
settbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
do_settemp
)
self
.
printerControls
.
append
(
self
.
settbtn
)
lls
.
Add
(
self
.
settbtn
,
pos
=
(
11
,
4
),
span
=
(
1
,
2
))
lls
.
Add
(
wx
.
StaticText
(
self
.
panel
,
-
1
,
_
(
"Bed:"
),
pos
=
(
0
,
343
)),
pos
=
(
12
,
0
),
span
=
(
1
,
1
))
btemp_choices
=
[
self
.
bedtemps
[
i
]
+
" ("
+
i
+
")"
for
i
in
sorted
(
self
.
bedtemps
.
keys
(),
key
=
lambda
x
:
self
.
bed
temps
[
x
])]
btemp_choices
=
[
self
.
bedtemps
[
i
]
+
" ("
+
i
+
")"
for
i
in
sorted
(
self
.
bedtemps
.
keys
(),
key
=
lambda
x
:
self
.
temps
[
x
])]
if
self
.
settings
.
last_bed_temperature
not
in
map
(
float
,
self
.
bedtemps
.
values
()):
btemp_choices
=
[
str
(
self
.
settings
.
last_bed_temperature
)]
+
btemp_choices
self
.
btemp
=
wx
.
ComboBox
(
self
.
panel
,
-
1
,
choices
=
btemp_choices
,
style
=
wx
.
CB_DROPDOWN
,
size
=
(
90
,
25
),
pos
=
(
45
,
367
))
self
.
btemp
.
SetValue
(
"0"
)
self
.
btemp
.
SetValue
(
str
(
self
.
settings
.
last_bed_temperature
))
self
.
htemp
.
SetValue
(
str
(
self
.
settings
.
last_temperature
))
## added for an error where only the bed would get (pla) or (abs).
#This ensures, if last temp is a default pla or abs, it will be marked so.
# if it is not, then a (user) remark is added. This denotes a manual entry
for
i
in
btemp_choices
:
if
i
.
split
()[
0
]
==
str
(
self
.
settings
.
last_bed_temperature
)
.
split
(
'.'
)[
0
]
or
i
.
split
()[
0
]
==
str
(
self
.
settings
.
last_bed_temperature
):
self
.
btemp
.
SetValue
(
i
)
for
i
in
htemp_choices
:
if
i
.
split
()[
0
]
==
str
(
self
.
settings
.
last_temperature
)
.
split
(
'.'
)[
0
]
or
i
.
split
()[
0
]
==
str
(
self
.
settings
.
last_temperature
)
:
self
.
htemp
.
SetValue
(
i
)
if
(
'('
not
in
self
.
btemp
.
Value
):
self
.
btemp
.
SetValue
(
self
.
btemp
.
Value
+
' (user)'
)
if
(
'('
not
in
self
.
htemp
.
Value
):
self
.
htemp
.
SetValue
(
self
.
htemp
.
Value
+
' (user)'
)
lls
.
Add
(
self
.
btemp
,
pos
=
(
12
,
1
),
span
=
(
1
,
3
))
self
.
setbbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Set"
),
size
=
(
38
,
-
1
),
pos
=
(
135
,
365
))
self
.
setbbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
do_bedtemp
)
...
...
@@ -1192,6 +1214,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
pass
def
pause
(
self
,
event
):
print
_
(
"Paused."
)
if
not
self
.
paused
:
if
self
.
sdprinting
:
self
.
p
.
send_now
(
"M25"
)
...
...
@@ -1217,6 +1240,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
pass
def
connect
(
self
,
event
):
print
_
(
"Connecting..."
)
port
=
None
try
:
port
=
self
.
scanserial
()[
0
]
...
...
@@ -1247,6 +1271,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
disconnect
(
self
,
event
):
print
_
(
"Disconnected."
)
self
.
p
.
disconnect
()
self
.
statuscheck
=
False
...
...
@@ -1267,6 +1292,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
reset
(
self
,
event
):
print
_
(
"Reset."
)
dlg
=
wx
.
MessageDialog
(
self
,
_
(
"Are you sure you want to reset the printer?"
),
_
(
"Reset?"
),
wx
.
YES
|
wx
.
NO
)
if
dlg
.
ShowModal
()
==
wx
.
ID_YES
:
self
.
p
.
reset
()
...
...
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