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
eaab2859
Commit
eaab2859
authored
Aug 03, 2012
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup in pronterface.py
parent
a63c310e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
21 deletions
+4
-21
pronterface.py
pronterface.py
+4
-21
No files found.
pronterface.py
View file @
eaab2859
...
...
@@ -31,7 +31,6 @@ import sys, glob, time, threading, traceback, cStringIO, subprocess
StringIO
=
cStringIO
thread
=
threading
.
Thread
winsize
=
(
800
,
500
)
layerindex
=
0
global
buttonSize
...
...
@@ -437,17 +436,11 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
Bind
(
wx
.
EVT_MENU
,
lambda
*
e
:
options
(
self
),
m
.
Append
(
-
1
,
_
(
"&Options"
),
_
(
" Options dialog"
)))
self
.
Bind
(
wx
.
EVT_MENU
,
lambda
x
:
threading
.
Thread
(
target
=
lambda
:
self
.
do_skein
(
"set"
))
.
start
(),
m
.
Append
(
-
1
,
_
(
"Slicing Settings"
),
_
(
" Adjust slicing settings"
)))
#try:
# from SkeinforgeQuickEditDialog import SkeinforgeQuickEditDialog
# self.Bind(wx.EVT_MENU, lambda *e:SkeinforgeQuickEditDialog(self), m.Append(-1,_("SFACT Quick Settings"),_(" Quickly adjust SFACT settings for active profile")))
#except:
# pass
self
.
menustrip
.
Append
(
m
,
_
(
"&Settings"
))
self
.
update_macros_menu
()
self
.
SetMenuBar
(
self
.
menustrip
)
def
doneediting
(
self
,
gcode
):
f
=
open
(
self
.
filename
,
"w"
)
f
.
write
(
"
\n
"
.
join
(
gcode
))
...
...
@@ -530,7 +523,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
except
:
pass
def
popwindow
(
self
):
# this list will contain all controls that should be only enabled
# when we're connected to a printer
...
...
@@ -643,7 +635,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
wx
.
CallAfter
(
self
.
xyb
.
SetFocus
)
lls
.
Add
(
szbuttons
,
pos
=
(
1
,
0
),
span
=
(
1
,
8
),
flag
=
wx
.
ALIGN_CENTER
)
for
i
in
self
.
cpbuttons
:
btn
=
wx
.
Button
(
self
.
panel
,
-
1
,
i
[
0
],
style
=
wx
.
BU_EXACTFIT
)
btn
.
SetToolTip
(
wx
.
ToolTip
(
i
[
5
]))
...
...
@@ -673,7 +664,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
lls
.
Add
(
self
.
monitorbox
,
pos
=
(
2
,
6
))
self
.
monitorbox
.
Bind
(
wx
.
EVT_CHECKBOX
,
self
.
setmonitor
)
lls
.
Add
(
wx
.
StaticText
(
self
.
panel
,
-
1
,
_
(
"Heat"
)),
pos
=
(
2
,
0
),
span
=
(
1
,
1
),
flag
=
wx
.
ALIGN_CENTER_VERTICAL
|
wx
.
ALIGN_RIGHT
)
htemp_choices
=
[
self
.
temps
[
i
]
+
" ("
+
i
+
")"
for
i
in
sorted
(
self
.
temps
.
keys
(),
key
=
lambda
x
:
self
.
temps
[
x
])]
...
...
@@ -898,7 +888,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
except
:
pass
def
toggleview
(
self
,
e
):
if
(
self
.
mini
):
self
.
mini
=
False
...
...
@@ -1009,7 +998,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
# print "Bad syntax for button definition, see 'help button'"
# print x
def
cbutton_save
(
self
,
n
,
bdef
,
new_n
=
None
):
if
new_n
is
None
:
new_n
=
n
if
bdef
is
None
or
bdef
==
""
:
...
...
@@ -1308,7 +1296,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
self
.
webInterface
:
self
.
webInterface
.
AddLog
(
"Done monitoring."
)
def
setmonitor
(
self
,
e
):
self
.
monitor
=
self
.
monitorbox
.
GetValue
()
if
self
.
monitor
:
...
...
@@ -1316,8 +1303,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
else
:
wx
.
CallAfter
(
self
.
graph
.
StopPlotting
)
def
sendline
(
self
,
e
):
command
=
self
.
commandbox
.
GetValue
()
if
not
len
(
command
):
...
...
@@ -1539,8 +1524,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
filename
=
filename
self
.
stopsf
=
0
self
.
skeining
=
1
thread
(
target
=
self
.
skein_func
)
.
start
()
thread
(
target
=
self
.
skein_monitor
)
.
start
()
thread
ing
.
Thread
(
target
=
self
.
skein_func
)
.
start
()
thread
ing
.
Thread
(
target
=
self
.
skein_monitor
)
.
start
()
def
loadfile
(
self
,
event
,
filename
=
None
):
if
self
.
skeining
and
self
.
skeinp
is
not
None
:
...
...
@@ -1658,7 +1643,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
p
.
send_now
(
"M21"
)
self
.
p
.
send_now
(
"M28 "
+
str
(
dlg
.
GetValue
()))
self
.
recvlisteners
+=
[
self
.
uploadtrigger
]
pass
def
pause
(
self
,
event
):
print
_
(
"Paused."
)
...
...
@@ -1684,7 +1668,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
sdprintfile
(
self
,
event
):
self
.
on_startprint
()
threading
.
Thread
(
target
=
self
.
getfiles
)
.
start
()
pass
def
connect
(
self
,
event
):
print
_
(
"Connecting..."
)
...
...
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