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
a198488d
Commit
a198488d
authored
Jun 28, 2012
by
kliment
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #250 from ajd4096/experimental
Check whether printer is online when calling send()
parents
510b7db6
a300fb8e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
printcore.py
printcore.py
+16
-13
No files found.
printcore.py
View file @
a198488d
...
...
@@ -198,6 +198,7 @@ class printcore():
"""Adds a command to the checksummed main command queue if printing, or sends the command immediately if not printing
"""
if
(
self
.
online
):
if
(
self
.
printing
):
self
.
mainqueue
+=
[
command
]
else
:
...
...
@@ -212,6 +213,8 @@ class printcore():
while
((
wait
>
0
)
and
not
self
.
clear
):
time
.
sleep
(
0.001
)
wait
-=
1
else
:
print
"Not connected to printer."
def
send_now
(
self
,
command
,
wait
=
0
):
...
...
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