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
76cd27bc
Commit
76cd27bc
authored
Jun 25, 2013
by
D1plo1d
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing prontserve estop so that the print command isn't broken after a stop.
parent
51653eb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
prontserve.py
prontserve.py
+5
-1
No files found.
prontserve.py
View file @
76cd27bc
...
@@ -379,6 +379,7 @@ class Prontserve(pronsole.pronsole, EventEmitter):
...
@@ -379,6 +379,7 @@ class Prontserve(pronsole.pronsole, EventEmitter):
def
do_print
(
self
):
def
do_print
(
self
):
if
not
self
.
p
.
online
:
raise
Exception
(
"not online"
)
if
not
self
.
p
.
online
:
raise
Exception
(
"not online"
)
if
self
.
printing_jobs
:
raise
Exception
(
"already printing"
)
self
.
printing_jobs
=
True
self
.
printing_jobs
=
True
def
do_home
(
self
,
*
args
,
**
kwargs
):
def
do_home
(
self
,
*
args
,
**
kwargs
):
...
@@ -412,6 +413,8 @@ class Prontserve(pronsole.pronsole, EventEmitter):
...
@@ -412,6 +413,8 @@ class Prontserve(pronsole.pronsole, EventEmitter):
raise
Exception
(
"Continuous movement not supported"
)
raise
Exception
(
"Continuous movement not supported"
)
def
do_estop
(
self
):
def
do_estop
(
self
):
self
.
printing_jobs
=
False
self
.
current_job
=
None
pronsole
.
pronsole
.
do_pause
(
self
,
""
)
pronsole
.
pronsole
.
do_pause
(
self
,
""
)
# self.p.reset()
# self.p.reset()
print
"Emergency Stop!"
print
"Emergency Stop!"
...
@@ -486,7 +489,7 @@ class Prontserve(pronsole.pronsole, EventEmitter):
...
@@ -486,7 +489,7 @@ class Prontserve(pronsole.pronsole, EventEmitter):
# A better solution would be one in which a print_finised event could be
# A better solution would be one in which a print_finised event could be
# listend for asynchronously without polling.
# listend for asynchronously without polling.
p
=
self
.
p
p
=
self
.
p
if
self
.
printing_jobs
and
p
.
printing
==
False
and
p
.
paused
==
False
and
p
.
online
:
if
self
.
printing_jobs
and
p
.
printing
==
False
and
p
.
online
:
if
self
.
current_job
!=
None
:
if
self
.
current_job
!=
None
:
self
.
update_job_progress
(
100
)
self
.
update_job_progress
(
100
)
self
.
fire
(
"job_finished"
,
self
.
jobs
.
sanitize
(
self
.
current_job
))
self
.
fire
(
"job_finished"
,
self
.
jobs
.
sanitize
(
self
.
current_job
))
...
@@ -500,6 +503,7 @@ class Prontserve(pronsole.pronsole, EventEmitter):
...
@@ -500,6 +503,7 @@ class Prontserve(pronsole.pronsole, EventEmitter):
self
.
current_job
=
self
.
jobs
.
list
.
pop
(
0
)
self
.
current_job
=
self
.
jobs
.
list
.
pop
(
0
)
gc
=
gcoder
.
GCode
(
self
.
current_job
[
'body'
]
.
split
(
"
\n
"
))
gc
=
gcoder
.
GCode
(
self
.
current_job
[
'body'
]
.
split
(
"
\n
"
))
self
.
p
.
startprint
(
gc
)
self
.
p
.
startprint
(
gc
)
self
.
p
.
paused
=
False
self
.
fire
(
"job_started"
,
self
.
jobs
.
sanitize
(
self
.
current_job
))
self
.
fire
(
"job_started"
,
self
.
jobs
.
sanitize
(
self
.
current_job
))
else
:
else
:
print
"Finished all print jobs"
print
"Finished all print jobs"
...
...
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