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
5c8bc44f
Commit
5c8bc44f
authored
Jun 27, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove (now useless ?) capture mechanisms from pronterface
parent
c298d1be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
31 deletions
+1
-31
pronterface.py
pronterface.py
+1
-31
No files found.
pronterface.py
View file @
5c8bc44f
...
@@ -560,15 +560,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -560,15 +560,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
pronsole
.
pronsole
.
start_macro
(
self
,
macro_name
,
old_macro_definition
)
pronsole
.
pronsole
.
start_macro
(
self
,
macro_name
,
old_macro_definition
)
def
catchprint
(
self
,
l
):
def
catchprint
(
self
,
l
):
if
self
.
capture_skip_newline
and
len
(
l
)
and
not
len
(
l
.
strip
(
"
\n\r
"
)):
wx
.
CallAfter
(
self
.
addtexttolog
,
l
)
self
.
capture_skip_newline
=
False
return
for
pat
in
self
.
capture_skip
.
keys
():
if
self
.
capture_skip
[
pat
]
>
0
and
pat
.
match
(
l
):
self
.
capture_skip
[
pat
]
-=
1
self
.
capture_skip_newline
=
True
return
wx
.
CallAfter
(
self
.
addtexttolog
,
l
);
def
project
(
self
,
event
):
def
project
(
self
,
event
):
from
printrun
import
projectlayer
from
printrun
import
projectlayer
...
@@ -1313,9 +1305,6 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -1313,9 +1305,6 @@ class PronterWindow(MainWindow, pronsole.pronsole):
if
self
.
monitor
and
self
.
p
.
online
:
if
self
.
monitor
and
self
.
p
.
online
:
if
self
.
sdprinting
:
if
self
.
sdprinting
:
self
.
p
.
send_now
(
"M27"
)
self
.
p
.
send_now
(
"M27"
)
if
not
hasattr
(
self
,
"auto_monitor_pattern"
):
self
.
auto_monitor_pattern
=
re
.
compile
(
r"(ok\s+)?T:[\d\.]+(\s+B:[\d\.]+)?(\s+@:[\d\.]+)?\s*"
)
self
.
capture_skip
[
self
.
auto_monitor_pattern
]
=
self
.
capture_skip
.
setdefault
(
self
.
auto_monitor_pattern
,
0
)
+
1
self
.
p
.
send_now
(
"M105"
)
self
.
p
.
send_now
(
"M105"
)
cur_time
=
time
.
time
()
cur_time
=
time
.
time
()
while
time
.
time
()
<
cur_time
+
self
.
monitor_interval
:
while
time
.
time
()
<
cur_time
+
self
.
monitor_interval
:
...
@@ -1331,25 +1320,6 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -1331,25 +1320,6 @@ class PronterWindow(MainWindow, pronsole.pronsole):
pass
pass
wx
.
CallAfter
(
self
.
statusbar
.
SetStatusText
,
_
(
"Not connected to printer."
))
wx
.
CallAfter
(
self
.
statusbar
.
SetStatusText
,
_
(
"Not connected to printer."
))
def
capture
(
self
,
func
,
*
args
,
**
kwargs
):
stdout
=
sys
.
stdout
cout
=
None
try
:
cout
=
self
.
cout
except
:
pass
if
cout
is
None
:
cout
=
cStringIO
.
StringIO
()
sys
.
stdout
=
cout
retval
=
None
try
:
retval
=
func
(
*
args
,
**
kwargs
)
except
:
traceback
.
print_exc
()
sys
.
stdout
=
stdout
return
retval
def
recvcb
(
self
,
l
):
def
recvcb
(
self
,
l
):
isreport
=
False
isreport
=
False
if
"ok C:"
in
l
or
"Count"
in
l
:
if
"ok C:"
in
l
or
"Count"
in
l
:
...
...
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