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
6d78deea
Commit
6d78deea
authored
Jul 09, 2011
by
Alessandro Ranellucci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Leave Reset enabled and allow loading a GCode file without connecting to the printer.
parent
cac5f9bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
pronterface.py
pronterface.py
+13
-6
No files found.
pronterface.py
View file @
6d78deea
...
...
@@ -103,6 +103,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
connectbtn
.
Disable
();
for
i
in
self
.
printerControls
:
i
.
Enable
()
if
self
.
filename
:
self
.
printbtn
.
Enable
()
def
sentcb
(
self
,
line
):
...
...
@@ -248,7 +250,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
uts
.
Add
(
self
.
disconnectbtn
)
self
.
resetbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
"Reset"
,
pos
=
(
560
,
0
))
self
.
resetbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
reset
)
self
.
printerControls
.
append
(
self
.
resetbtn
)
uts
.
Add
(
self
.
resetbtn
)
self
.
minibtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
"Mini mode"
,
pos
=
(
690
,
0
))
self
.
minibtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
toggleview
)
...
...
@@ -267,7 +268,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
loadbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
"Load file"
,
pos
=
(
0
,
40
))
self
.
loadbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
loadfile
)
self
.
printerControls
.
append
(
self
.
loadbtn
)
ubs
.
Add
(
self
.
loadbtn
)
self
.
uploadbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
"SD Upload"
,
pos
=
(
90
,
40
))
self
.
uploadbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
upload
)
...
...
@@ -675,7 +675,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
status
.
SetStatusText
(
"Loaded "
+
name
+
",
%
d lines"
%
(
len
(
self
.
f
),))
self
.
printbtn
.
SetLabel
(
"Print"
)
self
.
pausebtn
.
SetLabel
(
"Pause"
)
self
.
printbtn
.
Enable
()
if
self
.
p
.
online
:
self
.
printbtn
.
Enable
()
threading
.
Thread
(
target
=
self
.
loadviz
)
.
start
()
def
loadviz
(
self
):
...
...
@@ -690,9 +691,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
printfile
(
self
,
event
):
if
self
.
paused
:
self
.
p
.
paused
=
0
self
.
pausebtn
.
SetLabel
(
"Pause"
)
self
.
printbtn
.
SetLabel
(
"Print"
)
self
.
paused
=
0
self
.
on_startprint
()
if
self
.
sdprinting
:
self
.
p
.
send_now
(
"M26 S0"
)
self
.
p
.
send_now
(
"M24"
)
...
...
@@ -707,7 +707,11 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
pausebtn
.
Enable
()
self
.
printbtn
.
SetLabel
(
"Restart"
)
self
.
p
.
startprint
(
self
.
f
)
def
on_startprint
(
self
):
self
.
pausebtn
.
SetLabel
(
"Pause"
)
self
.
printbtn
.
SetLabel
(
"Print"
)
def
endupload
(
self
):
self
.
p
.
send_now
(
"M29 "
)
wx
.
CallAfter
(
self
.
status
.
SetStatusText
,
"File upload complete"
)
...
...
@@ -756,6 +760,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
sdprintfile
(
self
,
event
):
self
.
on_startprint
()
threading
.
Thread
(
target
=
self
.
getfiles
)
.
start
()
pass
...
...
@@ -794,6 +799,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
statuscheck
=
False
self
.
connectbtn
.
Enable
();
self
.
printbtn
.
Disable
();
self
.
pausebtn
.
Disable
();
for
i
in
self
.
printerControls
:
i
.
Disable
()
...
...
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