Merge branch 'master' of https://git.briq.it/Emanuele/MarkoprintWiFi
commit
a30e5e78ce
|
|
@ -45,38 +45,38 @@ MKPcommands = {
|
|||
'begin': '\x02', #STX
|
||||
'end': '\x03', #ETX
|
||||
'command': 'TZ',
|
||||
'success': '\x06\x02[0-9]OK\x03',
|
||||
'error': '[0-9]E[0-9]',
|
||||
'success': '\x06\x02([0-9])OK\x03',
|
||||
'error': '([0-9])E([0-9])',
|
||||
'args': ['imageName', 'printMode']
|
||||
},
|
||||
'sendImage': {
|
||||
'defPrefix': True,
|
||||
'command': 'EW----',
|
||||
'command': 'EW----;',
|
||||
'success': None,
|
||||
'error': None,
|
||||
'args': ['imageName']
|
||||
},
|
||||
'sendImageEnd': {
|
||||
'defPrefix': True,
|
||||
'command': 'EX---',
|
||||
'command': 'EX----;',
|
||||
'success': 'OK\r',
|
||||
'error': None,
|
||||
},
|
||||
'receiveImage': {
|
||||
'defPrefix': True,
|
||||
'command': 'EL',
|
||||
'success': None,
|
||||
'command': 'EL----;',
|
||||
'success': True,
|
||||
'error': None
|
||||
},
|
||||
'receiveDir': {
|
||||
'defPrefix': True,
|
||||
'command': 'ED----',
|
||||
'success': None,
|
||||
'command': 'ED----;',
|
||||
'success': True,
|
||||
'error': None
|
||||
},
|
||||
'deleteImage': {
|
||||
'defPrefix': True,
|
||||
'command': 'EQ----',
|
||||
'command': 'EQ----;',
|
||||
'success': 'OK\r',
|
||||
'error': 'Err\r',
|
||||
'args': ['imageName']
|
||||
|
|
@ -91,26 +91,26 @@ MKPcommands = {
|
|||
'receiveDate': {
|
||||
'defPrefix': True,
|
||||
'command': '*GSTD',
|
||||
'success': '[0-9]{13}',
|
||||
'success': True,
|
||||
'error': None,
|
||||
'args': ['','']
|
||||
'args': ['dateTime']
|
||||
},
|
||||
'status': {
|
||||
'defPrefix': True,
|
||||
'command': 'SV',
|
||||
'success': None,
|
||||
'success': True,
|
||||
'error': None
|
||||
},
|
||||
'status1': {
|
||||
'defPrefix': True,
|
||||
'command': 'S1',
|
||||
'success': None,
|
||||
'success': True,
|
||||
'error': None
|
||||
},
|
||||
'status2': {
|
||||
'defPrefix': True,
|
||||
'command': 'S2',
|
||||
'success': None,
|
||||
'success': True,
|
||||
'error': None
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
'''
|
||||
Created on 27 set 2019
|
||||
|
||||
@author: Emanuele Trabattoni
|
||||
'''
|
||||
import time
|
||||
import sys
|
||||
import printer
|
||||
import commands
|
||||
|
||||
def main():
|
||||
printer = printer.MarkoPrinter('./conf.json')
|
||||
printer.connetti()
|
||||
|
||||
pass
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
pass
|
||||
|
|
@ -2,7 +2,6 @@ import socket
|
|||
import json
|
||||
import time
|
||||
|
||||
|
||||
class MarkoPrinter:
|
||||
def __init__(self, configFilePath):
|
||||
self.inkStatCounter = 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue