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
31da9098
Commit
31da9098
authored
Jun 07, 2011
by
kliment
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pause command. Fix help for pause command.
parent
fd6eb8ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
20 deletions
+3
-20
printcore.py
printcore.py
+1
-0
pronsole.py
pronsole.py
+2
-20
No files found.
printcore.py
View file @
31da9098
...
@@ -185,6 +185,7 @@ class printcore():
...
@@ -185,6 +185,7 @@ class printcore():
time
.
sleep
(
0.001
)
time
.
sleep
(
0.001
)
self
.
clear
=
False
self
.
clear
=
False
if
not
(
self
.
printing
and
self
.
printer
and
self
.
online
):
if
not
(
self
.
printing
and
self
.
printer
and
self
.
online
):
self
.
clear
=
True
return
return
if
(
self
.
resendfrom
<
self
.
lineno
and
self
.
resendfrom
>-
1
):
if
(
self
.
resendfrom
<
self
.
lineno
and
self
.
resendfrom
>-
1
):
self
.
_send
(
self
.
sentlines
[
self
.
resendfrom
],
self
.
resendfrom
,
False
)
self
.
_send
(
self
.
sentlines
[
self
.
resendfrom
],
self
.
resendfrom
,
False
)
...
...
pronsole.py
View file @
31da9098
...
@@ -305,12 +305,12 @@ class pronsole(cmd.Cmd):
...
@@ -305,12 +305,12 @@ class pronsole(cmd.Cmd):
print
"Not printing, cannot pause."
print
"Not printing, cannot pause."
return
return
self
.
p
.
pause
()
self
.
p
.
pause
()
self
.
p
.
connect
()
# This seems to work, but is not a good solution.
#
self.p.connect()# This seems to work, but is not a good solution.
self
.
paused
=
True
self
.
paused
=
True
#self.do_resume(None)
#self.do_resume(None)
def
help_pause
(
self
,
l
):
def
help_pause
(
self
):
print
"Pauses a running print"
print
"Pauses a running print"
def
do_resume
(
self
,
l
):
def
do_resume
(
self
,
l
):
...
@@ -323,24 +323,6 @@ class pronsole(cmd.Cmd):
...
@@ -323,24 +323,6 @@ class pronsole(cmd.Cmd):
return
return
else
:
else
:
self
.
p
.
resume
()
self
.
p
.
resume
()
return
try
:
self
.
p
.
resume
()
#print self.p.printing
sys
.
stdout
.
write
(
"Progress: 00.0
%
"
)
sys
.
stdout
.
flush
()
time
.
sleep
(
1
)
while
self
.
p
.
printing
:
time
.
sleep
(
1
)
sys
.
stdout
.
write
(
"
\b\b\b\b\b
%04.1
f
%%
"
%
(
100
*
float
(
self
.
p
.
queueindex
)
/
len
(
self
.
p
.
mainqueue
),)
)
sys
.
stdout
.
flush
()
print
"
\b\b\b\b\b
100
%
. Print completed."
return
except
:
print
"...interrupted!"
self
.
paused
=
True
self
.
p
.
pause
()
print
"Use the resume command to resume this print"
def
help_resume
(
self
):
def
help_resume
(
self
):
print
"Resumes a paused print."
print
"Resumes a paused print."
...
...
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