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
76fafca3
Commit
76fafca3
authored
Jul 28, 2011
by
kliment
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git@github.com:kliment/Printrun
parents
9c531f56
fbe76b6d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
7 deletions
+24
-7
gviz.py
gviz.py
+3
-3
pronsole.py
pronsole.py
+2
-2
pronterface.py
pronterface.py
+19
-2
No files found.
gviz.py
View file @
76fafca3
...
...
@@ -146,10 +146,10 @@ class gviz(wx.Panel):
dc
.
DrawLineList
(
l
,
self
.
pens
[
i
])
return
if
self
.
layerindex
<
len
(
self
.
layers
)
and
self
.
layers
[
self
.
layerindex
]
in
self
.
lines
.
keys
():
for
i
in
range
(
min
(
self
.
layerindex
,
6
))[
-
6
:]
:
for
layer_i
in
xrange
(
max
(
0
,
self
.
layerindex
-
6
),
self
.
layerindex
)
:
#print i, self.layerindex, self.layerindex-i
l
=
map
(
scaler
,
self
.
lines
[
self
.
layers
[
self
.
layerindex
-
i
-
1
]])
dc
.
DrawLineList
(
l
,
self
.
fades
[
i
])
l
=
map
(
scaler
,
self
.
lines
[
self
.
layers
[
layer_i
]])
dc
.
DrawLineList
(
l
,
self
.
fades
[
self
.
layerindex
-
layer_i
-
1
])
l
=
map
(
scaler
,
self
.
lines
[
self
.
layers
[
self
.
layerindex
]])
dc
.
DrawLineList
(
l
,
self
.
pens
[
self
.
layers
[
self
.
layerindex
]])
l
=
map
(
scaler
,
self
.
hilight
)
...
...
pronsole.py
View file @
76fafca3
...
...
@@ -260,7 +260,7 @@ class pronsole(cmd.Cmd):
self
.
save_in_rc
(
"set "
+
var
,
"set
%
s
%
s"
%
(
var
,
value
))
except
AttributeError
:
print
"Unknown variable '
%
s'"
%
var
except
ValueError
as
ve
:
except
ValueError
,
ve
:
print
"Bad value for variable '
%
s', expecting
%
s (
%
s)"
%
(
var
,
repr
(
t
)[
1
:
-
1
],
ve
.
args
[
0
])
def
do_set
(
self
,
argl
):
...
...
@@ -364,7 +364,7 @@ class pronsole(cmd.Cmd):
rco
.
close
()
os
.
rename
(
rco
.
name
,
self
.
rc_filename
)
print
"Saved '"
+
key
+
"' to '"
+
self
.
rc_filename
+
"'"
except
Exception
as
e
:
except
Exception
,
e
:
print
"Saving failed for"
,
key
+
":"
,
str
(
e
)
finally
:
del
rci
,
rco
...
...
pronterface.py
View file @
76fafca3
...
...
@@ -52,6 +52,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
statuscheck
=
False
self
.
tempreport
=
""
self
.
monitor
=
0
self
.
monitor_interval
=
3
self
.
paused
=
False
xcol
=
(
245
,
245
,
108
)
ycol
=
(
180
,
180
,
255
)
...
...
@@ -156,7 +157,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
except
:
pass
def
do_settemp
(
self
,
l
=
""
):
try
:
if
not
(
l
.
__class__
==
""
.
__class__
or
l
.
__class__
==
u""
.
__class__
)
or
(
not
len
(
l
)):
...
...
@@ -592,6 +592,23 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
pass
self
.
Destroy
()
def
do_monitor
(
self
,
l
=
""
):
if
l
.
strip
()
==
""
:
self
.
monitorbox
.
SetValue
(
not
self
.
monitorbox
.
GetValue
())
elif
l
.
strip
()
==
"off"
:
self
.
monitorbox
.
SetValue
(
False
)
else
:
try
:
self
.
monitor_interval
=
float
(
l
)
self
.
monitorbox
.
SetValue
(
self
.
monitor_interval
>
0
)
except
:
print
"Invalid period given."
self
.
setmonitor
(
None
)
if
self
.
monitor
:
print
"Monitoring printer."
else
:
print
"Done monitoring."
def
setmonitor
(
self
,
e
):
self
.
monitor
=
self
.
monitorbox
.
GetValue
()
...
...
@@ -626,7 +643,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
self
.
sdprinting
:
self
.
p
.
send_now
(
"M27"
)
self
.
p
.
send_now
(
"M105"
)
time
.
sleep
(
3
)
time
.
sleep
(
self
.
monitor_interval
)
wx
.
CallAfter
(
self
.
status
.
SetStatusText
,
"Not connected to printer."
)
except
:
pass
#if window has been closed
...
...
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