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
b77e4460
Commit
b77e4460
authored
Jun 30, 2011
by
Jordan Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'kliment_master' into AudioBot
parents
9b3acd78
e830702b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
gviz.py
gviz.py
+0
-1
printcore.py
printcore.py
+1
-1
pronterface.py
pronterface.py
+18
-9
No files found.
gviz.py
View file @
b77e4460
...
@@ -55,7 +55,6 @@ class gviz(wx.Panel):
...
@@ -55,7 +55,6 @@ class gviz(wx.Panel):
def
clear
(
self
):
def
clear
(
self
):
self
.
lastpos
=
[
0
,
0
,
0
,
0
,
0
]
self
.
lastpos
=
[
0
,
0
,
0
,
0
,
0
]
self
.
Bind
(
wx
.
EVT_PAINT
,
self
.
paint
)
self
.
lines
=
{}
self
.
lines
=
{}
self
.
pens
=
{}
self
.
pens
=
{}
self
.
layers
=
[]
self
.
layers
=
[]
...
...
printcore.py
View file @
b77e4460
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
from
serial
import
Serial
from
serial
import
Serial
from
threading
import
Thread
from
threading
import
Thread
import
time
import
time
import
getopt
,
sys
import
sys
class
printcore
():
class
printcore
():
def
__init__
(
self
,
port
=
None
,
baud
=
None
):
def
__init__
(
self
,
port
=
None
,
baud
=
None
):
...
...
pronterface.py
View file @
b77e4460
...
@@ -37,6 +37,7 @@ class Tee(object):
...
@@ -37,6 +37,7 @@ class Tee(object):
class
PronterWindow
(
wx
.
Frame
,
pronsole
.
pronsole
):
class
PronterWindow
(
wx
.
Frame
,
pronsole
.
pronsole
):
def
__init__
(
self
,
filename
=
None
,
size
=
winsize
):
def
__init__
(
self
,
filename
=
None
,
size
=
winsize
):
pronsole
.
pronsole
.
__init__
(
self
)
pronsole
.
pronsole
.
__init__
(
self
)
self
.
settings
.
last_file_path
=
""
self
.
filename
=
filename
self
.
filename
=
filename
os
.
putenv
(
"UBUNTU_MENUPROXY"
,
"0"
)
os
.
putenv
(
"UBUNTU_MENUPROXY"
,
"0"
)
wx
.
Frame
.
__init__
(
self
,
None
,
title
=
"Printer Interface"
,
size
=
size
);
wx
.
Frame
.
__init__
(
self
,
None
,
title
=
"Printer Interface"
,
size
=
size
);
...
@@ -395,6 +396,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -395,6 +396,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
gwindow
.
Show
()
self
.
gwindow
.
Show
()
def
setfeeds
(
self
,
e
):
def
setfeeds
(
self
,
e
):
self
.
feedrates_changed
=
True
try
:
try
:
self
.
settings
.
_set
(
"e_feedrate"
,
self
.
efeedc
.
GetValue
())
self
.
settings
.
_set
(
"e_feedrate"
,
self
.
efeedc
.
GetValue
())
except
:
except
:
...
@@ -436,9 +438,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -436,9 +438,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
statuscheck
=
0
self
.
statuscheck
=
0
self
.
p
.
recvcb
=
None
self
.
p
.
recvcb
=
None
self
.
p
.
disconnect
()
self
.
p
.
disconnect
()
self
.
save_in_rc
(
"set xy_feedrate"
,
"set xy_feedrate
%
d"
%
self
.
settings
.
xy_feedrate
)
if
hasattr
(
self
,
"feedrates_changed"
):
self
.
save_in_rc
(
"set z_feedrate"
,
"set z_feedrate
%
d"
%
self
.
settings
.
z_feedrate
)
self
.
save_in_rc
(
"set xy_feedrate"
,
"set xy_feedrate
%
d"
%
self
.
settings
.
xy_feedrate
)
self
.
save_in_rc
(
"set e_feedrate"
,
"set e_feedrate
%
d"
%
self
.
settings
.
e_feedrate
)
self
.
save_in_rc
(
"set z_feedrate"
,
"set z_feedrate
%
d"
%
self
.
settings
.
z_feedrate
)
self
.
save_in_rc
(
"set e_feedrate"
,
"set e_feedrate
%
d"
%
self
.
settings
.
e_feedrate
)
try
:
try
:
self
.
gwindow
.
Destroy
()
self
.
gwindow
.
Destroy
()
except
:
except
:
...
@@ -614,11 +617,13 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -614,11 +617,13 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
thread
(
target
=
self
.
skein_monitor
)
.
start
()
thread
(
target
=
self
.
skein_monitor
)
.
start
()
def
loadfile
(
self
,
event
):
def
loadfile
(
self
,
event
):
basedir
=
"."
basedir
=
self
.
settings
.
last_file_path
try
:
if
not
os
.
path
.
exists
(
basedir
):
basedir
=
os
.
path
.
split
(
self
.
filename
)[
0
]
basedir
=
"."
except
:
try
:
pass
basedir
=
os
.
path
.
split
(
self
.
filename
)[
0
]
except
:
pass
dlg
=
wx
.
FileDialog
(
self
,
"Open file to print"
,
basedir
,
style
=
wx
.
FD_OPEN
|
wx
.
FD_FILE_MUST_EXIST
)
dlg
=
wx
.
FileDialog
(
self
,
"Open file to print"
,
basedir
,
style
=
wx
.
FD_OPEN
|
wx
.
FD_FILE_MUST_EXIST
)
dlg
.
SetWildcard
(
"STL and GCODE files (;*.gcode;*.g;*.stl;)"
)
dlg
.
SetWildcard
(
"STL and GCODE files (;*.gcode;*.g;*.stl;)"
)
if
(
dlg
.
ShowModal
()
==
wx
.
ID_OK
):
if
(
dlg
.
ShowModal
()
==
wx
.
ID_OK
):
...
@@ -626,7 +631,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -626,7 +631,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
not
(
os
.
path
.
exists
(
name
)):
if
not
(
os
.
path
.
exists
(
name
)):
self
.
status
.
SetStatusText
(
"File not found!"
)
self
.
status
.
SetStatusText
(
"File not found!"
)
return
return
if
name
.
endswith
(
".stl"
):
path
=
os
.
path
.
split
(
name
)[
0
]
if
path
!=
self
.
settings
.
last_file_path
:
self
.
set
(
"last_file_path"
,
path
)
if
name
.
lower
()
.
endswith
(
".stl"
):
self
.
skein
(
name
)
self
.
skein
(
name
)
else
:
else
:
self
.
f
=
[
i
.
replace
(
"
\n
"
,
""
)
.
replace
(
"
\r
"
,
""
)
for
i
in
open
(
name
)]
self
.
f
=
[
i
.
replace
(
"
\n
"
,
""
)
.
replace
(
"
\r
"
,
""
)
for
i
in
open
(
name
)]
...
@@ -636,6 +644,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -636,6 +644,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
loadviz
(
self
):
def
loadviz
(
self
):
self
.
gviz
.
clear
()
self
.
gviz
.
clear
()
self
.
gwindow
.
p
.
clear
()
for
i
in
self
.
f
:
for
i
in
self
.
f
:
self
.
gviz
.
addgcode
(
i
)
self
.
gviz
.
addgcode
(
i
)
self
.
gwindow
.
p
.
addgcode
(
i
)
self
.
gwindow
.
p
.
addgcode
(
i
)
...
...
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