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
d21f4d0a
Commit
d21f4d0a
authored
Mar 16, 2012
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'experimental' of
https://github.com/kliment/Printrun
into experimental
parents
134704b7
a2285efd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
11 deletions
+20
-11
gviz.py
gviz.py
+12
-4
printcore.py
printcore.py
+4
-3
pronsole.py
pronsole.py
+3
-3
pronterface.py
pronterface.py
+1
-1
No files found.
gviz.py
View file @
d21f4d0a
...
...
@@ -47,13 +47,21 @@ class window(wx.Frame):
else
:
event
.
Skip
()
def
key
(
self
,
event
):
x
=
event
.
GetKeyCode
()
if
event
.
ShiftDown
():
cx
,
cy
=
self
.
p
.
translate
if
x
==
wx
.
WXK_UP
:
self
.
p
.
zoom
(
cx
,
cy
,
1.2
)
if
x
==
wx
.
WXK_DOWN
:
self
.
p
.
zoom
(
cx
,
cy
,
1
/
1.2
)
else
:
if
x
==
wx
.
WXK_UP
:
self
.
p
.
layerup
()
if
x
==
wx
.
WXK_DOWN
:
self
.
p
.
layerdown
()
#print x
if
x
==
wx
.
WXK_UP
:
self
.
p
.
layerup
()
if
x
==
wx
.
WXK_DOWN
:
self
.
p
.
layerdown
()
#print p.lines.keys()
def
zoom
(
self
,
event
):
...
...
printcore.py
View file @
d21f4d0a
...
...
@@ -47,6 +47,7 @@ class printcore():
self
.
endcb
=
None
#impl ()
self
.
onlinecb
=
None
#impl ()
self
.
loud
=
False
#emit sent and received lines to terminal
self
.
greetings
=
[
'start'
,
'Grbl '
]
if
port
is
not
None
and
baud
is
not
None
:
#print port, baud
self
.
connect
(
port
,
baud
)
...
...
@@ -115,10 +116,10 @@ class printcore():
print
"RECV: "
,
line
.
rstrip
()
if
(
line
.
startswith
(
'DEBUG_'
)):
continue
if
(
line
.
startswith
(
'start'
)
or
line
.
startswith
(
'ok'
)):
if
(
line
.
startswith
(
tuple
(
self
.
greetings
)
)
or
line
.
startswith
(
'ok'
)):
self
.
clear
=
True
if
(
line
.
startswith
(
'start'
)
or
line
.
startswith
(
'ok'
)
or
"T:"
in
line
):
if
(
not
self
.
online
or
line
.
startswith
(
'start'
))
and
self
.
onlinecb
is
not
None
:
if
(
line
.
startswith
(
tuple
(
self
.
greetings
)
)
or
line
.
startswith
(
'ok'
)
or
"T:"
in
line
):
if
(
not
self
.
online
or
line
.
startswith
(
tuple
(
self
.
greetings
)
))
and
self
.
onlinecb
is
not
None
:
try
:
self
.
onlinecb
()
except
:
...
...
pronsole.py
View file @
d21f4d0a
...
...
@@ -274,7 +274,7 @@ class pronsole(cmd.Cmd):
self
.
helpdict
[
"temperature_pla"
]
=
_
(
"Extruder temp for PLA (default: 185 deg C)"
)
self
.
helpdict
[
"xy_feedrate"
]
=
_
(
"Feedrate for Control Panel Moves in X and Y (default: 3000mm/min)"
)
self
.
helpdict
[
"z_feedrate"
]
=
_
(
"Feedrate for Control Panel Moves in Z (default: 200mm/min)"
)
self
.
commandprefixes
=
'MGT$'
def
set_temp_preset
(
self
,
key
,
value
):
if
not
key
.
startswith
(
"bed"
):
...
...
@@ -870,14 +870,14 @@ class pronsole(cmd.Cmd):
print
"! os.listdir('.')"
def
default
(
self
,
l
):
if
(
l
[
0
]
==
'M'
or
l
[
0
]
==
"G"
or
l
[
0
]
==
'T'
):
if
(
l
[
0
]
in
self
.
commandprefixes
.
upper
()
):
if
(
self
.
p
and
self
.
p
.
online
):
print
"SENDING:"
+
l
self
.
p
.
send_now
(
l
)
else
:
print
"Printer is not online."
return
if
(
l
[
0
]
==
'm'
or
l
[
0
]
==
"g"
or
l
[
0
]
==
't'
):
elif
(
l
[
0
]
in
self
.
commandprefixes
.
lower
()
):
if
(
self
.
p
and
self
.
p
.
online
):
print
"SENDING:"
+
l
.
upper
()
self
.
p
.
send_now
(
l
.
upper
())
...
...
pronterface.py
View file @
d21f4d0a
...
...
@@ -1368,7 +1368,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
except
:
pass
dlg
=
wx
.
FileDialog
(
self
,
_
(
"Open file to print"
),
basedir
,
style
=
wx
.
FD_OPEN
|
wx
.
FD_FILE_MUST_EXIST
)
dlg
.
SetWildcard
(
_
(
"OBJ, STL, and GCODE files (;*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ;)
"
))
dlg
.
SetWildcard
(
_
(
"OBJ, STL, and GCODE files (*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ)|*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ|All Files (*.*)|*.*
"
))
if
(
filename
is
not
None
or
dlg
.
ShowModal
()
==
wx
.
ID_OK
):
if
filename
is
not
None
:
name
=
filename
...
...
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