make send_now check that the printer is online before talking to it
parent
b5dbecc8ac
commit
97cad4e003
17
printcore.py
17
printcore.py
|
@ -209,13 +209,16 @@ class printcore():
|
||||||
def send_now(self,command):
|
def send_now(self,command):
|
||||||
"""Sends a command to the printer ahead of the command queue, without a checksum
|
"""Sends a command to the printer ahead of the command queue, without a checksum
|
||||||
"""
|
"""
|
||||||
if(self.printing):
|
if(self.online):
|
||||||
self.priqueue+=[command]
|
if(self.printing):
|
||||||
else:
|
self.priqueue+=[command]
|
||||||
while not self.clear:
|
else:
|
||||||
time.sleep(0.001)
|
while not self.clear:
|
||||||
self._send(command)
|
time.sleep(0.001)
|
||||||
#callback for command sent
|
self._send(command)
|
||||||
|
#callback for command sent
|
||||||
|
else
|
||||||
|
print "Not connected to printer."
|
||||||
|
|
||||||
def _print(self):
|
def _print(self):
|
||||||
#callback for printing started
|
#callback for printing started
|
||||||
|
|
Loading…
Reference in New Issue