1
This commit is contained in:
@@ -54,20 +54,21 @@ const (
|
|||||||
signSound, signSoundEnd = "<sound>", "</sound>" // 声音结束标签
|
signSound, signSoundEnd = "<sound>", "</sound>" // 声音结束标签
|
||||||
|
|
||||||
// GPRS通讯说明,打印机识别二进制码
|
// GPRS通讯说明,打印机识别二进制码
|
||||||
hexSignBROrEXE = "0a" // 换行
|
hexSignBROrEXE = "0a" // 换行
|
||||||
hexSignCenter = "1b6101" // 居中打印
|
hexSignCenter = "1b6101" // 居中打印
|
||||||
hexSignLeft = "1b6100" // 恢复居左打印
|
hexSignLeft = "1b6100" // 恢复居左打印
|
||||||
hexSignRight = "1b6102" // 居右打印
|
hexSignRight = "1b6102" // 居右打印
|
||||||
hexSignNormal = "1b2100"
|
hexSignNormal = "1b2100"
|
||||||
hexSignBig = "1b2130" // 横向及纵向都放大
|
hexSignBig = "1b2130" // 横向及纵向都放大
|
||||||
hexSignHighBig = "1b2110" // 倍高
|
hexSignHighBig = "1b2110" // 倍高
|
||||||
hexSignWideBig = "1b2120" // 倍宽
|
hexSignWideBig = "1b2120" // 倍宽
|
||||||
hexSignQrCenter = "1d5802" // 二维码居中
|
hexSignQrCenter = "1d5802" // 二维码居中
|
||||||
hexSignQrLeft = "1d5800" // 二维码居左
|
hexSignQrLeft = "1d5800" // 二维码居左
|
||||||
hexSignQrRight = "1d5804" // 二维码居右
|
hexSignQrRight = "1d5804" // 二维码居右
|
||||||
hexSignQr = "1b5a000106" // "1b5a000106" 0600 : 后面二维码的字节数
|
hexSignQr = "1b5a000106" // "1b5a000106" 0600 : 后面二维码的字节数
|
||||||
hexSignQrEnd = "000a1b40" // 000a0a0a1b40
|
hexSignQrEnd = "000a1b40" // 000a0a0a1b40
|
||||||
hexSignSound = "1d6b40" // 音频指令
|
hexSignSound = "1d6b40" // 音频指令(自定义语音指令)
|
||||||
|
hexSignSoundSolidification = "1B594155" // 音频指令(固化指令)
|
||||||
|
|
||||||
//起始标签 -- 自定义标签utf8转码为gbk字符集
|
//起始标签 -- 自定义标签utf8转码为gbk字符集
|
||||||
byteSignBR = "3c62723e" // 换行
|
byteSignBR = "3c62723e" // 换行
|
||||||
@@ -520,7 +521,7 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) {
|
|||||||
//soundLenH, soundLenX := int2h8l8(int64((len(realSound) + len("0101")) / 2))
|
//soundLenH, soundLenX := int2h8l8(int64((len(realSound) + len("0101")) / 2))
|
||||||
//result = strings.ReplaceAll(result, byteSignSound, hexSignSound+allLen+"fd"+soundLenH+soundLenX+"0100"+hexPrefixStr)
|
//result = strings.ReplaceAll(result, byteSignSound, hexSignSound+allLen+"fd"+soundLenH+soundLenX+"0100"+hexPrefixStr)
|
||||||
result = strings.ReplaceAll(result, sound, "")
|
result = strings.ReplaceAll(result, sound, "")
|
||||||
result = strings.ReplaceAll(result, byteSignSound, hexSignSound+"01"+voice)
|
result = strings.ReplaceAll(result, byteSignSound, hexSignSoundSolidification+"14")
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user