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
90e5d226
Commit
90e5d226
authored
Jun 15, 2012
by
kliment
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #242 from logxen/experimental
make send_now check that the printer is online before talking to it
parents
b5dbecc8
97cad4e0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
printcore.py
printcore.py
+10
-7
No files found.
printcore.py
View file @
90e5d226
...
...
@@ -209,6 +209,7 @@ class printcore():
def
send_now
(
self
,
command
):
"""Sends a command to the printer ahead of the command queue, without a checksum
"""
if
(
self
.
online
):
if
(
self
.
printing
):
self
.
priqueue
+=
[
command
]
else
:
...
...
@@ -216,6 +217,8 @@ class printcore():
time
.
sleep
(
0.001
)
self
.
_send
(
command
)
#callback for command sent
else
print
"Not connected to printer."
def
_print
(
self
):
#callback for printing started
...
...
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