This commit is contained in:
邹宗楠
2022-07-26 14:30:23 +08:00
parent 89581a69b4
commit 53ef22f8e7

View File

@@ -68,6 +68,7 @@ const (
hexSignQr = "1b5a000106" // "1b5a000106" 0600 : 后面二维码的字节数
hexSignQrEnd = "000a1b40" // 000a0a0a1b40
hexSignSound = "1d6b40" // 音频指令
hexSignSoundOld = "1B594155" // 音频指令(老指令)
//起始标签 -- 自定义标签utf8转码为gbk字符集
byteSignBR = "3c62723e" // 换行
@@ -516,7 +517,7 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) {
//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+hexPrefixStr)
result = strings.ReplaceAll(result, byteSignSound, hexSignSoundOld+hexPrefixStr)
result = strings.ReplaceAll(result, byteSignSoundE, "")
//}
}