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
97cad4e0
Commit
97cad4e0
authored
Jun 15, 2012
by
Logxen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make send_now check that the printer is online before talking to it
parent
b5dbecc8
Changes
1
Hide 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 @
97cad4e0
...
...
@@ -209,13 +209,16 @@ class printcore():
def
send_now
(
self
,
command
):
"""Sends a command to the printer ahead of the command queue, without a checksum
"""
if
(
self
.
printing
):
self
.
priqueue
+=
[
command
]
else
:
while
not
self
.
clear
:
time
.
sleep
(
0.001
)
self
.
_send
(
command
)
#callback for command sent
if
(
self
.
online
):
if
(
self
.
printing
):
self
.
priqueue
+=
[
command
]
else
:
while
not
self
.
clear
:
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