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
8f3df9c2
Commit
8f3df9c2
authored
Nov 16, 2011
by
Kliment Yanev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified size of + button
parent
a0bf2c45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
42 deletions
+1
-42
blupload.py
blupload.py
+0
-41
pronterface.py
pronterface.py
+1
-1
No files found.
blupload.py
deleted
100644 → 0
View file @
a0bf2c45
import
printcore
,
time
,
sys
,
os
def
dosify
(
name
):
return
os
.
path
.
split
(
name
)[
1
]
.
split
(
"."
)[
0
][:
8
]
+
".g"
def
blupload
(
printer
,
filename
,
path
):
printer
.
send_now
(
"M28 "
+
dosify
(
filename
))
printer
.
startprint
([
i
.
replace
(
"
\n
"
,
""
)
for
i
in
open
(
path
)])
try
:
sys
.
stdout
.
write
(
"Progress: 00.0
%
"
)
sys
.
stdout
.
flush
()
while
(
printer
.
printing
):
time
.
sleep
(
1
)
sys
.
stdout
.
write
(
"
\b\b\b\b
%02.1
f
%%
"
%
(
100
*
float
(
printer
.
queueindex
)
/
len
(
printer
.
mainqueue
),)
)
sys
.
stdout
.
flush
()
printer
.
send_now
(
"M29 "
+
dosify
(
filename
))
print
"Done uploading, disconnecting with a 5 second timeout in case the printer has something important to say."
printer
.
disconnect
()
time
.
sleep
(
5
)
print
"Upload complete. Goodbye!"
except
:
print
"Abort, disconnecting with a 5 second timeout in case the printer has something important to say."
printer
.
disconnect
()
if
__name__
==
'__main__'
:
#print "Usage: python blupload.py filename.gcode"
filename
=
"../prusamendel/sellsx_export.gcode"
tfilename
=
filename
if
len
(
sys
.
argv
)
>
1
:
filename
=
sys
.
argv
[
1
]
tfilename
=
os
.
path
.
basename
(
sys
.
argv
[
1
])
print
"Uploading: "
+
filename
,
" as "
+
dosify
(
tfilename
)
p
=
printcore
.
printcore
(
'/dev/ttyUSB0'
,
115200
)
p
.
loud
=
False
time
.
sleep
(
2
)
blupload
(
p
,
tfilename
,
filename
)
else
:
print
"Usage: python blupload.py filename.gcode"
pronterface.py
View file @
8f3df9c2
...
@@ -724,7 +724,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -724,7 +724,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
b
.
SetForegroundColour
(
"#ffffff"
)
b
.
SetForegroundColour
(
"#ffffff"
)
except
:
except
:
if
i
==
newbuttonbuttonindex
:
if
i
==
newbuttonbuttonindex
:
self
.
newbuttonbutton
=
b
=
wx
.
Button
(
self
.
panel
,
-
1
,
"+"
,
size
=
(
1
6
,
16
))
self
.
newbuttonbutton
=
b
=
wx
.
Button
(
self
.
panel
,
-
1
,
"+"
,
size
=
(
1
9
,
18
))
#b.SetFont(wx.Font(12,wx.FONTFAMILY_SWISS,wx.FONTSTYLE_NORMAL,wx.FONTWEIGHT_BOLD))
#b.SetFont(wx.Font(12,wx.FONTFAMILY_SWISS,wx.FONTSTYLE_NORMAL,wx.FONTWEIGHT_BOLD))
b
.
SetForegroundColour
(
"#4444ff"
)
b
.
SetForegroundColour
(
"#4444ff"
)
b
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"click to add new custom button"
)))
b
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"click to add new custom button"
)))
...
...
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