roba non importante
parent
206bb29334
commit
d87eb7a22b
|
|
@ -1,33 +1,33 @@
|
|||
{
|
||||
"ip": "192.168.40.30",
|
||||
"port": 8899,
|
||||
"name": "MKPsouplesse",
|
||||
"autoconnect": true,
|
||||
"keepalive": 5000,
|
||||
"timeout": 0.5,
|
||||
"inkstat": 2,
|
||||
"printcmd": {
|
||||
"filename": "TM1.00I",
|
||||
"dateformat": "%d%m%y-",
|
||||
"handshake": "*",
|
||||
"printmode": "11",
|
||||
"headstatus": [
|
||||
"ink",
|
||||
"htmr",
|
||||
"iuse",
|
||||
"xclk",
|
||||
"bat",
|
||||
"txt",
|
||||
"pause",
|
||||
"headOk",
|
||||
"headTyp",
|
||||
"labelCnt",
|
||||
"ztv",
|
||||
"cp",
|
||||
"lx",
|
||||
"exInk",
|
||||
"scStat",
|
||||
"inkStat"
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
"ip": "192.168.40.30",
|
||||
"port": 8899,
|
||||
"name": "MKPsouplesse",
|
||||
"autoconnect": true,
|
||||
"keepalive": 5.0,
|
||||
"timeout": 0.5,
|
||||
"inkstat": 2,
|
||||
"printcmd": {
|
||||
"filename": "TM1.00I",
|
||||
"dateformat": "%d%m%y-",
|
||||
"handshake": "*",
|
||||
"printmode": "11",
|
||||
"headstatus": [
|
||||
"ink",
|
||||
"htmr",
|
||||
"iuse",
|
||||
"xclk",
|
||||
"bat",
|
||||
"txt",
|
||||
"pause",
|
||||
"headOk",
|
||||
"headTyp",
|
||||
"labelCnt",
|
||||
"ztv",
|
||||
"cp",
|
||||
"lx",
|
||||
"exInk",
|
||||
"scStat",
|
||||
"inkStat"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,29 @@ Created on Sat Sep 28 11:41:21 2019
|
|||
@author: Guido Longoni - guidolongoni@gmail.com
|
||||
"""
|
||||
|
||||
import protocol as p
|
||||
#import protocol as p
|
||||
|
||||
testala=p.callPrintImage(imageName='Pippus',printMode='10',fieldContent='qualcosa\rqualcosaltro\rciao')
|
||||
#testala=p.callPrintImage(imageName='Pippus',printMode='10',fieldContent='qualcosa\rqualcosaltro\rciao')
|
||||
|
||||
def subChars(s):
|
||||
subDict = {'\x02': " #STX ",
|
||||
'\x03': " #ETX ",
|
||||
'\x1B': " #ESC ",
|
||||
'\r': " #CR ",
|
||||
'\f': " #LF ",
|
||||
'\t': " #TAB ",
|
||||
'\x06': " #ACK ",
|
||||
'\x15': " #NACK "
|
||||
}
|
||||
out = ""
|
||||
for c in s:
|
||||
if c in subDict.keys():
|
||||
out += subDict[c]
|
||||
else:
|
||||
out += c
|
||||
return out
|
||||
|
||||
|
||||
t="\x06\x02OK\x03\r\n\t"
|
||||
|
||||
print(subChars(t))
|
||||
93394
MkpWIFI/log/dimelog.log
93394
MkpWIFI/log/dimelog.log
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue